From 3bf45dc4ad851d97231066f586b34da3e993e28b Mon Sep 17 00:00:00 2001 From: GoldBr1987 Date: Tue, 5 Oct 2021 17:34:41 +0800 Subject: [PATCH 1/2] modify set uart clk bug --- bsp/hc32f4a0/drivers/drv_usart.c | 53 +- bsp/hc32f4a0/project.uvoptx | 856 ++++++++++++++++++++++++++++++- bsp/hc32f4a0/project.uvprojx | 636 ++++++++--------------- 3 files changed, 1131 insertions(+), 414 deletions(-) diff --git a/bsp/hc32f4a0/drivers/drv_usart.c b/bsp/hc32f4a0/drivers/drv_usart.c index b6b75cd281..9e150d154b 100644 --- a/bsp/hc32f4a0/drivers/drv_usart.c +++ b/bsp/hc32f4a0/drivers/drv_usart.c @@ -6,6 +6,7 @@ * Change Logs: * Date Author Notes * 2020-10-30 CDT first version + * 2021-10-05 lizhengyang fix set uart clk bug */ /******************************************************************************* @@ -289,6 +290,39 @@ static struct hc32_uart uart_obj[] = UART_CONFIG("uart10", USART10), #endif }; +static const struct uart_index uart_clock_map[] = +{ +#ifdef BSP_USING_UART1 + {0, M4_USART1}, +#endif +#ifdef BSP_USING_UART2 + {1, M4_USART2}, +#endif +#ifdef BSP_USING_UART3 + {2, M4_USART3}, +#endif +#ifdef BSP_USING_UART4 + {3, M4_USART4}, +#endif +#ifdef BSP_USING_UART5 + {4, M4_USART5}, +#endif +#ifdef BSP_USING_UART6 + {5, M4_USART6}, +#endif +#ifdef BSP_USING_UART7 + {6, M4_USART7}, +#endif +#ifdef BSP_USING_UART8 + {7, M4_USART8}, +#endif +#ifdef BSP_USING_UART9 + {8, M4_USART9}, +#endif +#ifdef BSP_USING_UART10 + {9, M4_USART10}, +#endif +}; static const struct uart_irq_handler uart_irq_handlers[sizeof(uart_obj) / sizeof(uart_obj[0])]; @@ -313,9 +347,26 @@ static uint32_t hc32_get_uart_index(M4_USART_TypeDef *Instance) return index; } +static uint32_t hc32_get_uart_clock_index(M4_USART_TypeDef *Instance) +{ + uint32_t index = 10; + + for (uint8_t i = 0U; i < ARRAY_SZ(uart_clock_map); i++) + { + if (uart_clock_map[i].Instance == Instance) + { + index = uart_clock_map[i].index; + RT_ASSERT(index < 10) + break; + } + } + + return index; +} + static uint32_t hc32_get_usart_fcg(M4_USART_TypeDef *Instance) { - return (PWC_FCG3_USART1 << hc32_get_uart_index(Instance)); + return (PWC_FCG3_USART1 << hc32_get_uart_clock_index(Instance)); } static rt_err_t hc32_configure(struct rt_serial_device *serial, diff --git a/bsp/hc32f4a0/project.uvoptx b/bsp/hc32f4a0/project.uvoptx index 916421140c..49ea5116fe 100644 --- a/bsp/hc32f4a0/project.uvoptx +++ b/bsp/hc32f4a0/project.uvoptx @@ -100,7 +100,10 @@ 1 0 0 - 6 + 1 + 0 + 0 + 3 @@ -158,8 +161,19 @@ 0 + 0 + 0 + + + + + + + + 1 + 0 0 2 1000000 @@ -167,4 +181,844 @@ + + Applications + 0 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + applications\main.c + main.c + 0 + 0 + + + + + CPU + 0 + 0 + 0 + 0 + + 2 + 2 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\common\div0.c + div0.c + 0 + 0 + + + 2 + 3 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\common\showmem.c + showmem.c + 0 + 0 + + + 2 + 4 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\common\backtrace.c + backtrace.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\cortex-m4\cpuport.c + cpuport.c + 0 + 0 + + + 2 + 6 + 2 + 0 + 0 + 0 + ..\..\libcpu\arm\cortex-m4\context_rvds.S + context_rvds.S + 0 + 0 + + + + + DeviceDrivers + 0 + 0 + 0 + 0 + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\components\drivers\misc\pin.c + pin.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\components\drivers\serial\serial.c + serial.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\ringbuffer.c + ringbuffer.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\ringblk_buf.c + ringblk_buf.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\dataqueue.c + dataqueue.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\waitqueue.c + waitqueue.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\workqueue.c + workqueue.c + 0 + 0 + + + 3 + 14 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\pipe.c + pipe.c + 0 + 0 + + + 3 + 15 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\completion.c + completion.c + 0 + 0 + + + + + Drivers + 0 + 0 + 0 + 0 + + 4 + 16 + 1 + 0 + 0 + 0 + board\board_config.c + board_config.c + 0 + 0 + + + 4 + 17 + 1 + 0 + 0 + 0 + board\board.c + board.c + 0 + 0 + + + 4 + 18 + 1 + 0 + 0 + 0 + drivers\drv_gpio.c + drv_gpio.c + 0 + 0 + + + 4 + 19 + 1 + 0 + 0 + 0 + drivers\drv_irq.c + drv_irq.c + 0 + 0 + + + 4 + 20 + 1 + 0 + 0 + 0 + drivers\drv_usart.c + drv_usart.c + 0 + 0 + + + + + Filesystem + 0 + 0 + 0 + 0 + + 5 + 21 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_posix.c + dfs_posix.c + 0 + 0 + + + 5 + 22 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_poll.c + dfs_poll.c + 0 + 0 + + + 5 + 23 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_file.c + dfs_file.c + 0 + 0 + + + 5 + 24 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs.c + dfs.c + 0 + 0 + + + 5 + 25 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_fs.c + dfs_fs.c + 0 + 0 + + + 5 + 26 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_select.c + dfs_select.c + 0 + 0 + + + 5 + 27 + 1 + 0 + 0 + 0 + ..\..\components\dfs\filesystems\devfs\devfs.c + devfs.c + 0 + 0 + + + + + Finsh + 0 + 0 + 0 + 0 + + 6 + 28 + 1 + 0 + 0 + 0 + ..\..\components\finsh\shell.c + shell.c + 0 + 0 + + + 6 + 29 + 1 + 0 + 0 + 0 + ..\..\components\finsh\msh.c + msh.c + 0 + 0 + + + 6 + 30 + 1 + 0 + 0 + 0 + ..\..\components\finsh\msh_file.c + msh_file.c + 0 + 0 + + + + + HC32_StdPeriph + 0 + 0 + 0 + 0 + + 7 + 31 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_icg.c + hc32f4a0_icg.c + 0 + 0 + + + 7 + 32 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_dma.c + hc32f4a0_dma.c + 0 + 0 + + + 7 + 33 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_clk.c + hc32f4a0_clk.c + 0 + 0 + + + 7 + 34 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_sram.c + hc32f4a0_sram.c + 0 + 0 + + + 7 + 35 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_pwc.c + hc32f4a0_pwc.c + 0 + 0 + + + 7 + 36 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_gpio.c + hc32f4a0_gpio.c + 0 + 0 + + + 7 + 37 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_tmr0.c + hc32f4a0_tmr0.c + 0 + 0 + + + 7 + 38 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_interrupts.c + hc32f4a0_interrupts.c + 0 + 0 + + + 7 + 39 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_efm.c + hc32f4a0_efm.c + 0 + 0 + + + 7 + 40 + 2 + 0 + 0 + 0 + Libraries\CMSIS\Device\HDSC\HC32F4A0\Source\ARM\startup_hc32f4a0.s + startup_hc32f4a0.s + 0 + 0 + + + 7 + 41 + 1 + 0 + 0 + 0 + Libraries\CMSIS\Device\HDSC\HC32F4A0\Source\system_hc32f4a0.c + system_hc32f4a0.c + 0 + 0 + + + 7 + 42 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_usart.c + hc32f4a0_usart.c + 0 + 0 + + + 7 + 43 + 1 + 0 + 0 + 0 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_utility.c + hc32f4a0_utility.c + 0 + 0 + + + + + Kernel + 0 + 0 + 0 + 0 + + 8 + 44 + 1 + 0 + 0 + 0 + ..\..\src\thread.c + thread.c + 0 + 0 + + + 8 + 45 + 1 + 0 + 0 + 0 + ..\..\src\scheduler.c + scheduler.c + 0 + 0 + + + 8 + 46 + 1 + 0 + 0 + 0 + ..\..\src\mem.c + mem.c + 0 + 0 + + + 8 + 47 + 1 + 0 + 0 + 0 + ..\..\src\ipc.c + ipc.c + 0 + 0 + + + 8 + 48 + 1 + 0 + 0 + 0 + ..\..\src\idle.c + idle.c + 0 + 0 + + + 8 + 49 + 1 + 0 + 0 + 0 + ..\..\src\timer.c + timer.c + 0 + 0 + + + 8 + 50 + 1 + 0 + 0 + 0 + ..\..\src\irq.c + irq.c + 0 + 0 + + + 8 + 51 + 1 + 0 + 0 + 0 + ..\..\src\mempool.c + mempool.c + 0 + 0 + + + 8 + 52 + 1 + 0 + 0 + 0 + ..\..\src\object.c + object.c + 0 + 0 + + + 8 + 53 + 1 + 0 + 0 + 0 + ..\..\src\device.c + device.c + 0 + 0 + + + 8 + 54 + 1 + 0 + 0 + 0 + ..\..\src\components.c + components.c + 0 + 0 + + + 8 + 55 + 1 + 0 + 0 + 0 + ..\..\src\clock.c + clock.c + 0 + 0 + + + 8 + 56 + 1 + 0 + 0 + 0 + ..\..\src\kservice.c + kservice.c + 0 + 0 + + + + + libc + 0 + 0 + 0 + 0 + + 9 + 57 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\libc.c + libc.c + 0 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\syscalls.c + syscalls.c + 0 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\mem_std.c + mem_std.c + 0 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\stdio.c + stdio.c + 0 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\common\unistd.c + unistd.c + 0 + 0 + + + 9 + 62 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\common\time.c + time.c + 0 + 0 + + + 9 + 63 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\common\stdlib.c + stdlib.c + 0 + 0 + + + 9 + 64 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\common\delay.c + delay.c + 0 + 0 + + + diff --git a/bsp/hc32f4a0/project.uvprojx b/bsp/hc32f4a0/project.uvprojx index 1717d8b352..171a602125 100644 --- a/bsp/hc32f4a0/project.uvprojx +++ b/bsp/hc32f4a0/project.uvprojx @@ -1,42 +1,46 @@ + 2.1 +
### uVision Project, (C) Keil Software
+ rt-thread 0x4 ARM-ADS - 5060020::V5.06 (build 20)::ARMCC + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 HC32F4A0SITB HDSC - HDSC.HC32F4A0.1.0.0 + HDSC.HC32F4A0.1.0.4 https://raw.githubusercontent.com/hdscmcu/pack/master/ IROM(0x00000000,0x200000) IRAM(0x1FFE0000,0x80000) IRAM2(0X200F0000,0x1000) CPUTYPE("Cortex-M4") FPU2 CLOCK(240000000) ESEL ELITTLE - - + + UL2CM3(-S0 -C0 -P0 -FD1FFE0000 -FC1000 -FN1 -FF0HC32F4A0 -FS00 -FL0200000 -FP0($$Device:HC32F4A0SITB$FlashARM\HC32F4A0_2M.FLM)) 0 $$Device:HC32F4A0SITB$Device\Include\HC32F4A0SITB.h - - - - - - - - - + + + + + + + + + $$Device:HC32F4A0SITB$CMSIS\SVD\hdsc_hc32f4a0.SFR 1 0 - - - - - + + + + + 0 0 @@ -50,7 +54,7 @@ 0 0 1 - 0 + 1 .\build\ 1 0 @@ -58,8 +62,8 @@ 0 0 - - + + 0 0 0 @@ -68,8 +72,8 @@ 0 0 - - + + 0 0 0 @@ -79,14 +83,14 @@ 1 0 fromelf --bin !L --output rtthread.bin - + 0 0 0 0 0 - + 0 @@ -100,8 +104,8 @@ 0 0 3 - - + + 1 @@ -122,47 +126,6 @@ 0 16 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - - 0 - 6 - - - - - - - - - - - - - - Segger\JL2CM3.dll - @@ -176,10 +139,10 @@ 1 BIN\UL2CM3.DLL "" () - - - - + + + + 0 @@ -212,7 +175,7 @@ 0 0 "Cortex-M4" - + 0 0 0 @@ -221,11 +184,13 @@ 0 0 1 + 0 + 0 1 0 8 0 - 0 + 1 0 0 3 @@ -280,13 +245,13 @@ 0 - 0x1fff8000 - 0x8000 + 0x1ffe0000 + 0x80000 1 0x0 - 0x80000 + 0x200000 0 @@ -344,7 +309,7 @@ 0x10000 - + 1 @@ -361,16 +326,20 @@ 0 0 1 + 0 0 0 0 0 0 + 0 + 0 + 0 --diag_suppress=186,66 - RT_USING_ARM_LIBC, USE_DDL_DRIVER, __DEBUG, HC32F4A0, __RTTHREAD__ - - applications;.;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m4;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;board;drivers;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\finsh;Libraries\CMSIS\Include;Libraries\CMSIS\Device\HDSC\HC32F4A0\Include;Libraries\HC32F4A0_StdPeriph_Driver\inc;.;..\..\include;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common + __CLK_TCK=RT_TICK_PER_SECOND, USE_DDL_DRIVER, HC32F4A0, __RTTHREAD__, __DEBUG, RT_USING_ARM_LIBC + + applications;.;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m4;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;board;drivers;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\finsh;Libraries\CMSIS\Include;Libraries\CMSIS\Device\HDSC\HC32F4A0\Include;Libraries\HC32F4A0_StdPeriph_Driver\inc;.;..\..\include;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common;..\..\components\libc\compilers\common\nogcc;..\..\examples\utest\testcases\kernel @@ -383,11 +352,12 @@ 0 0 0 + 1 - - - - + + + + @@ -399,13 +369,13 @@ 0 0x00000000 0x1FFF8000 - + .\board\linker_scripts\link.sct - - - - - + + + + + @@ -421,36 +391,28 @@ - cpu - - - backtrace.c - 1 - ..\..\libcpu\arm\common\backtrace.c - - + CPU div0.c 1 ..\..\libcpu\arm\common\div0.c - - showmem.c 1 ..\..\libcpu\arm\common\showmem.c - - + + backtrace.c + 1 + ..\..\libcpu\arm\common\backtrace.c + cpuport.c 1 ..\..\libcpu\arm\cortex-m4\cpuport.c - - context_rvds.S 2 @@ -466,95 +428,71 @@ 1 ..\..\components\drivers\misc\pin.c - - serial.c 1 ..\..\components\drivers\serial\serial.c - - - - completion.c - 1 - ..\..\components\drivers\src\completion.c - - - - - dataqueue.c - 1 - ..\..\components\drivers\src\dataqueue.c - - - - - pipe.c - 1 - ..\..\components\drivers\src\pipe.c - - - - - ringblk_buf.c - 1 - ..\..\components\drivers\src\ringblk_buf.c - - - ringbuffer.c 1 ..\..\components\drivers\src\ringbuffer.c - - + + ringblk_buf.c + 1 + ..\..\components\drivers\src\ringblk_buf.c + + + dataqueue.c + 1 + ..\..\components\drivers\src\dataqueue.c + waitqueue.c 1 ..\..\components\drivers\src\waitqueue.c - - workqueue.c 1 ..\..\components\drivers\src\workqueue.c + + pipe.c + 1 + ..\..\components\drivers\src\pipe.c + + + completion.c + 1 + ..\..\components\drivers\src\completion.c + Drivers - - - board.c - 1 - board\board.c - - board_config.c 1 board\board_config.c - - - drv_irq.c + board.c 1 - drivers\drv_irq.c + board\board.c - - drv_gpio.c 1 drivers\drv_gpio.c - - + + drv_irq.c + 1 + drivers\drv_irq.c + drv_usart.c 1 @@ -566,47 +504,35 @@ Filesystem - dfs.c + dfs_posix.c 1 - ..\..\components\dfs\src\dfs.c + ..\..\components\dfs\src\dfs_posix.c + + + dfs_poll.c + 1 + ..\..\components\dfs\src\dfs_poll.c - - dfs_file.c 1 ..\..\components\dfs\src\dfs_file.c - - + + dfs.c + 1 + ..\..\components\dfs\src\dfs.c + dfs_fs.c 1 ..\..\components\dfs\src\dfs_fs.c - - - dfs_posix.c + dfs_select.c 1 - ..\..\components\dfs\src\dfs_posix.c + ..\..\components\dfs\src\dfs_select.c - - - - poll.c - 1 - ..\..\components\dfs\src\poll.c - - - - - select.c - 1 - ..\..\components\dfs\src\select.c - - - devfs.c 1 @@ -615,299 +541,163 @@ - finsh + Finsh shell.c 1 ..\..\components\finsh\shell.c - - - - cmd.c - 1 - ..\..\components\finsh\cmd.c - - - msh.c 1 ..\..\components\finsh\msh.c - - msh_file.c 1 ..\..\components\finsh\msh_file.c - - - finsh_compiler.c - 1 - ..\..\components\finsh\finsh_compiler.c - - - - - finsh_error.c - 1 - ..\..\components\finsh\finsh_error.c - - - - - finsh_heap.c - 1 - ..\..\components\finsh\finsh_heap.c - - - - - finsh_init.c - 1 - ..\..\components\finsh\finsh_init.c - - - - - finsh_node.c - 1 - ..\..\components\finsh\finsh_node.c - - - - - finsh_ops.c - 1 - ..\..\components\finsh\finsh_ops.c - - - - - finsh_parser.c - 1 - ..\..\components\finsh\finsh_parser.c - - - - - finsh_var.c - 1 - ..\..\components\finsh\finsh_var.c - - - - - finsh_vm.c - 1 - ..\..\components\finsh\finsh_vm.c - - - - - finsh_token.c - 1 - ..\..\components\finsh\finsh_token.c - - HC32_StdPeriph - system_hc32f4a0.c + hc32f4a0_icg.c 1 - Libraries\CMSIS\Device\HDSC\HC32F4A0\Source\system_hc32f4a0.c + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_icg.c - - - - hc32f4a0_clk.c - 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_clk.c - - - hc32f4a0_dma.c 1 Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_dma.c - - - hc32f4a0_efm.c + hc32f4a0_clk.c 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_efm.c + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_clk.c - - - - hc32f4a0_gpio.c - 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_gpio.c - - - - - hc32f4a0_icg.c - 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_icg.c - - - - - hc32f4a0_interrupts.c - 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_interrupts.c - - - - - hc32f4a0_pwc.c - 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_pwc.c - - - hc32f4a0_sram.c 1 Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_sram.c - - - hc32f4a0_utility.c + hc32f4a0_pwc.c 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_utility.c + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_pwc.c - - - hc32f4a0_usart.c + hc32f4a0_gpio.c 1 - Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_usart.c + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_gpio.c - - hc32f4a0_tmr0.c 1 Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_tmr0.c - - + + hc32f4a0_interrupts.c + 1 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_interrupts.c + + + hc32f4a0_efm.c + 1 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_efm.c + startup_hc32f4a0.s 2 Libraries\CMSIS\Device\HDSC\HC32F4A0\Source\ARM\startup_hc32f4a0.s + + system_hc32f4a0.c + 1 + Libraries\CMSIS\Device\HDSC\HC32F4A0\Source\system_hc32f4a0.c + + + hc32f4a0_usart.c + 1 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_usart.c + + + hc32f4a0_utility.c + 1 + Libraries\HC32F4A0_StdPeriph_Driver\src\hc32f4a0_utility.c + Kernel - clock.c + thread.c 1 - ..\..\src\clock.c + ..\..\src\thread.c - - - - components.c - 1 - ..\..\src\components.c - - - - - device.c - 1 - ..\..\src\device.c - - - - - idle.c - 1 - ..\..\src\idle.c - - - - - ipc.c - 1 - ..\..\src\ipc.c - - - - - irq.c - 1 - ..\..\src\irq.c - - - - - kservice.c - 1 - ..\..\src\kservice.c - - - - - mem.c - 1 - ..\..\src\mem.c - - - - - mempool.c - 1 - ..\..\src\mempool.c - - - - - object.c - 1 - ..\..\src\object.c - - - scheduler.c 1 ..\..\src\scheduler.c - - - signal.c + mem.c 1 - ..\..\src\signal.c + ..\..\src\mem.c - - - thread.c + ipc.c 1 - ..\..\src\thread.c + ..\..\src\ipc.c + + + idle.c + 1 + ..\..\src\idle.c - - timer.c 1 ..\..\src\timer.c + + irq.c + 1 + ..\..\src\irq.c + + + mempool.c + 1 + ..\..\src\mempool.c + + + object.c + 1 + ..\..\src\object.c + + + device.c + 1 + ..\..\src\device.c + + + components.c + 1 + ..\..\src\components.c + + + clock.c + 1 + ..\..\src\clock.c + + + kservice.c + 1 + ..\..\src\kservice.c + @@ -918,44 +708,66 @@ 1 ..\..\components\libc\compilers\armlibc\libc.c - - + + syscalls.c + 1 + ..\..\components\libc\compilers\armlibc\syscalls.c + mem_std.c 1 ..\..\components\libc\compilers\armlibc\mem_std.c - - stdio.c 1 ..\..\components\libc\compilers\armlibc\stdio.c - - - stubs.c + unistd.c 1 - ..\..\components\libc\compilers\armlibc\stubs.c + ..\..\components\libc\compilers\common\unistd.c - - time.c 1 ..\..\components\libc\compilers\common\time.c - - - unistd.c + stdlib.c 1 - ..\..\components\libc\compilers\common\unistd.c + ..\..\components\libc\compilers\common\stdlib.c + + + delay.c + 1 + ..\..\components\libc\compilers\common\delay.c + + + + + + + + + + + <Project Info> + + + + + + 0 + 1 + + + +
From 65f52257f98b43fd76b1a82be87d5df3bda00e18 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Wed, 6 Oct 2021 04:52:02 +0800 Subject: [PATCH 2/2] Update drv_usart.c remove the end space of line:324. --- bsp/hc32f4a0/drivers/drv_usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/hc32f4a0/drivers/drv_usart.c b/bsp/hc32f4a0/drivers/drv_usart.c index 9e150d154b..92eea82507 100644 --- a/bsp/hc32f4a0/drivers/drv_usart.c +++ b/bsp/hc32f4a0/drivers/drv_usart.c @@ -321,7 +321,7 @@ static const struct uart_index uart_clock_map[] = #endif #ifdef BSP_USING_UART10 {9, M4_USART10}, -#endif +#endif }; static const struct uart_irq_handler uart_irq_handlers[sizeof(uart_obj) / sizeof(uart_obj[0])];