From c00507f49d5885bcddfff394baf41371bed09aee Mon Sep 17 00:00:00 2001 From: GoldBr1987 Date: Mon, 6 Sep 2021 19:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/hc32f460/.ignore_format.yml | 2 +- bsp/hc32f460/applications/main.c | 6 +- bsp/hc32f460/board/board.c | 2 +- bsp/hc32f460/board/board.h | 2 +- bsp/hc32f460/board/board_config.c | 2 +- bsp/hc32f460/board/board_config.h | 2 +- bsp/hc32f460/drivers/drv_gpio.c | 4 +- bsp/hc32f460/drivers/drv_gpio.h | 5 +- bsp/hc32f460/drivers/drv_irq.c | 2 +- bsp/hc32f460/drivers/drv_irq.h | 2 +- bsp/hc32f460/drivers/drv_usart.c | 2 +- bsp/hc32f460/drivers/drv_usart.h | 2 +- bsp/hc32f460/project.uvoptx | 546 +++++++++++------------------- bsp/hc32f460/project.uvprojx | 153 +++------ 14 files changed, 272 insertions(+), 460 deletions(-) diff --git a/bsp/hc32f460/.ignore_format.yml b/bsp/hc32f460/.ignore_format.yml index 13a5e1985b..d570c52faf 100644 --- a/bsp/hc32f460/.ignore_format.yml +++ b/bsp/hc32f460/.ignore_format.yml @@ -5,4 +5,4 @@ file_path: dir_path: -- Libraries \ No newline at end of file +- Libraries diff --git a/bsp/hc32f460/applications/main.c b/bsp/hc32f460/applications/main.c index dfe9725fd1..617e1e8039 100644 --- a/bsp/hc32f460/applications/main.c +++ b/bsp/hc32f460/applications/main.c @@ -5,12 +5,12 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ -#include "hc32_ddl.h" +#include "board.h" #include #include -#include "drv_gpio.h" + /* defined the LED1 pin: PE0 */ #define LED1_PIN GET_PIN(E,0) diff --git a/bsp/hc32f460/board/board.c b/bsp/hc32f460/board/board.c index 0d4c619539..6eb57a4cdc 100644 --- a/bsp/hc32f460/board/board.c +++ b/bsp/hc32f460/board/board.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #include #include diff --git a/bsp/hc32f460/board/board.h b/bsp/hc32f460/board/board.h index c686b7e37b..8530ee7221 100644 --- a/bsp/hc32f460/board/board.h +++ b/bsp/hc32f460/board/board.h @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #ifndef __BOARD_H__ #define __BOARD_H__ diff --git a/bsp/hc32f460/board/board_config.c b/bsp/hc32f460/board/board_config.c index 022f8ec787..4ad881d010 100644 --- a/bsp/hc32f460/board/board_config.c +++ b/bsp/hc32f460/board/board_config.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #include #include "board_config.h" diff --git a/bsp/hc32f460/board/board_config.h b/bsp/hc32f460/board/board_config.h index 54556aba49..0b3c73dda2 100644 --- a/bsp/hc32f460/board/board_config.h +++ b/bsp/hc32f460/board/board_config.h @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #ifndef __BOARD_CONFIG_H__ #define __BOARD_CONFIG_H__ diff --git a/bsp/hc32f460/drivers/drv_gpio.c b/bsp/hc32f460/drivers/drv_gpio.c index 6ab3c25ada..cb647e3de8 100644 --- a/bsp/hc32f460/drivers/drv_gpio.c +++ b/bsp/hc32f460/drivers/drv_gpio.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #include @@ -484,5 +484,5 @@ int rt_hw_pin_init(void) INIT_BOARD_EXPORT(rt_hw_pin_init); #endif /* RT_USING_PIN */ -#include "drv_gpio.h" + diff --git a/bsp/hc32f460/drivers/drv_gpio.h b/bsp/hc32f460/drivers/drv_gpio.h index ee13fb719b..9aa988fc4d 100644 --- a/bsp/hc32f460/drivers/drv_gpio.h +++ b/bsp/hc32f460/drivers/drv_gpio.h @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #ifndef __DRV_GPIO_H__ #define __DRV_GPIO_H__ @@ -146,6 +146,5 @@ #endif /* EXINT15_IRQ_CONFIG */ #endif - -extern void Led_Init(void); #endif + diff --git a/bsp/hc32f460/drivers/drv_irq.c b/bsp/hc32f460/drivers/drv_irq.c index c873ab61ef..84c5242780 100644 --- a/bsp/hc32f460/drivers/drv_irq.c +++ b/bsp/hc32f460/drivers/drv_irq.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #include #include "drv_irq.h" diff --git a/bsp/hc32f460/drivers/drv_irq.h b/bsp/hc32f460/drivers/drv_irq.h index f8e0bb8517..54267b9d97 100644 --- a/bsp/hc32f460/drivers/drv_irq.h +++ b/bsp/hc32f460/drivers/drv_irq.h @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #ifndef __DRV_IRQ_H__ diff --git a/bsp/hc32f460/drivers/drv_usart.c b/bsp/hc32f460/drivers/drv_usart.c index 176aa6a7c4..01a856c1dc 100644 --- a/bsp/hc32f460/drivers/drv_usart.c +++ b/bsp/hc32f460/drivers/drv_usart.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #include #include diff --git a/bsp/hc32f460/drivers/drv_usart.h b/bsp/hc32f460/drivers/drv_usart.h index 1bb200b8e0..2de8929a69 100644 --- a/bsp/hc32f460/drivers/drv_usart.h +++ b/bsp/hc32f460/drivers/drv_usart.h @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2021-09-2 lizhengyang first version + * 2021-09-02 lizhengyang first version */ #ifndef __DRV_USART_H__ #define __DRV_USART_H__ diff --git a/bsp/hc32f460/project.uvoptx b/bsp/hc32f460/project.uvoptx index 6be8fd8b72..d107bd32eb 100644 --- a/bsp/hc32f460/project.uvoptx +++ b/bsp/hc32f460/project.uvoptx @@ -188,7 +188,7 @@ Applications - 1 + 0 0 0 0 @@ -231,8 +231,8 @@ 0 0 0 - ..\..\libcpu\arm\common\backtrace.c - backtrace.c + ..\..\libcpu\arm\common\showmem.c + showmem.c 0 0 @@ -243,8 +243,8 @@ 0 0 0 - ..\..\libcpu\arm\common\showmem.c - showmem.c + ..\..\libcpu\arm\common\backtrace.c + backtrace.c 0 0 @@ -323,30 +323,6 @@ 0 0 0 - ..\..\components\drivers\src\dataqueue.c - dataqueue.c - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\pipe.c - pipe.c - 0 - 0 - - - 3 - 12 - 1 - 0 - 0 - 0 ..\..\components\drivers\src\workqueue.c workqueue.c 0 @@ -354,7 +330,7 @@ 3 - 13 + 11 1 0 0 @@ -366,7 +342,19 @@ 3 - 14 + 12 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\pipe.c + pipe.c + 0 + 0 + + + 3 + 13 1 0 0 @@ -378,7 +366,7 @@ 3 - 15 + 14 1 0 0 @@ -388,11 +376,23 @@ 0 0 + + 3 + 15 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\dataqueue.c + dataqueue.c + 0 + 0 + Drivers - 1 + 0 0 0 0 @@ -551,7 +551,7 @@ - finsh + Finsh 0 0 0 @@ -563,66 +563,6 @@ 0 0 0 - ..\..\components\finsh\finsh_node.c - finsh_node.c - 0 - 0 - - - 6 - 29 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_parser.c - finsh_parser.c - 0 - 0 - - - 6 - 30 - 1 - 0 - 0 - 0 - ..\..\components\finsh\cmd.c - cmd.c - 0 - 0 - - - 6 - 31 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_vm.c - finsh_vm.c - 0 - 0 - - - 6 - 32 - 1 - 0 - 0 - 0 - ..\..\components\finsh\msh_file.c - msh_file.c - 0 - 0 - - - 6 - 33 - 1 - 0 - 0 - 0 ..\..\components\finsh\shell.c shell.c 0 @@ -630,79 +570,7 @@ 6 - 34 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_token.c - finsh_token.c - 0 - 0 - - - 6 - 35 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_var.c - finsh_var.c - 0 - 0 - - - 6 - 36 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_compiler.c - finsh_compiler.c - 0 - 0 - - - 6 - 37 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_heap.c - finsh_heap.c - 0 - 0 - - - 6 - 38 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_ops.c - finsh_ops.c - 0 - 0 - - - 6 - 39 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_error.c - finsh_error.c - 0 - 0 - - - 6 - 40 + 29 1 0 0 @@ -714,13 +582,13 @@ 6 - 41 + 30 1 0 0 0 - ..\..\components\finsh\finsh_init.c - finsh_init.c + ..\..\components\finsh\msh_file.c + msh_file.c 0 0 @@ -734,7 +602,7 @@ 0 7 - 42 + 31 1 0 0 @@ -746,7 +614,7 @@ 7 - 43 + 32 1 0 0 @@ -758,7 +626,7 @@ 7 - 44 + 33 1 0 0 @@ -770,7 +638,7 @@ 7 - 45 + 34 1 0 0 @@ -782,7 +650,7 @@ 7 - 46 + 35 1 0 0 @@ -794,7 +662,7 @@ 7 - 47 + 36 1 0 0 @@ -806,7 +674,7 @@ 7 - 48 + 37 1 0 0 @@ -818,7 +686,7 @@ 7 - 49 + 38 1 0 0 @@ -830,7 +698,7 @@ 7 - 50 + 39 1 0 0 @@ -842,7 +710,7 @@ 7 - 51 + 40 2 0 0 @@ -854,7 +722,7 @@ 7 - 52 + 41 1 0 0 @@ -866,7 +734,7 @@ 7 - 53 + 42 1 0 0 @@ -886,7 +754,7 @@ 0 8 - 54 + 43 1 0 0 @@ -898,127 +766,7 @@ 8 - 55 - 1 - 0 - 0 - 0 - ..\..\src\device.c - device.c - 0 - 0 - - - 8 - 56 - 1 - 0 - 0 - 0 - ..\..\src\mem.c - mem.c - 0 - 0 - - - 8 - 57 - 1 - 0 - 0 - 0 - ..\..\src\components.c - components.c - 0 - 0 - - - 8 - 58 - 1 - 0 - 0 - 0 - ..\..\src\clock.c - clock.c - 0 - 0 - - - 8 - 59 - 1 - 0 - 0 - 0 - ..\..\src\mempool.c - mempool.c - 0 - 0 - - - 8 - 60 - 1 - 0 - 0 - 0 - ..\..\src\timer.c - timer.c - 0 - 0 - - - 8 - 61 - 1 - 0 - 0 - 0 - ..\..\src\kservice.c - kservice.c - 0 - 0 - - - 8 - 62 - 1 - 0 - 0 - 0 - ..\..\src\scheduler.c - scheduler.c - 0 - 0 - - - 8 - 63 - 1 - 0 - 0 - 0 - ..\..\src\object.c - object.c - 0 - 0 - - - 8 - 64 - 1 - 0 - 0 - 0 - ..\..\src\idle.c - idle.c - 0 - 0 - - - 8 - 65 + 44 1 0 0 @@ -1030,7 +778,43 @@ 8 - 66 + 45 + 1 + 0 + 0 + 0 + ..\..\src\clock.c + clock.c + 0 + 0 + + + 8 + 46 + 1 + 0 + 0 + 0 + ..\..\src\components.c + components.c + 0 + 0 + + + 8 + 47 + 1 + 0 + 0 + 0 + ..\..\src\idle.c + idle.c + 0 + 0 + + + 8 + 48 1 0 0 @@ -1040,6 +824,90 @@ 0 0 + + 8 + 49 + 1 + 0 + 0 + 0 + ..\..\src\kservice.c + kservice.c + 0 + 0 + + + 8 + 50 + 1 + 0 + 0 + 0 + ..\..\src\scheduler.c + scheduler.c + 0 + 0 + + + 8 + 51 + 1 + 0 + 0 + 0 + ..\..\src\object.c + object.c + 0 + 0 + + + 8 + 52 + 1 + 0 + 0 + 0 + ..\..\src\device.c + device.c + 0 + 0 + + + 8 + 53 + 1 + 0 + 0 + 0 + ..\..\src\timer.c + timer.c + 0 + 0 + + + 8 + 54 + 1 + 0 + 0 + 0 + ..\..\src\mem.c + mem.c + 0 + 0 + + + 8 + 55 + 1 + 0 + 0 + 0 + ..\..\src\mempool.c + mempool.c + 0 + 0 + @@ -1050,31 +918,7 @@ 0 9 - 67 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\mem_std.c - mem_std.c - 0 - 0 - - - 9 - 68 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\stdio.c - stdio.c - 0 - 0 - - - 9 - 69 + 56 1 0 0 @@ -1086,7 +930,31 @@ 9 - 70 + 57 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\mem_std.c + mem_std.c + 0 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\stdio.c + stdio.c + 0 + 0 + + + 9 + 59 1 0 0 @@ -1098,19 +966,19 @@ 9 - 71 + 60 1 0 0 0 - ..\..\components\libc\compilers\common\delay.c - delay.c + ..\..\components\libc\compilers\common\unistd.c + unistd.c 0 0 9 - 72 + 61 1 0 0 @@ -1122,7 +990,7 @@ 9 - 73 + 62 1 0 0 @@ -1134,13 +1002,13 @@ 9 - 74 + 63 1 0 0 0 - ..\..\components\libc\compilers\common\unistd.c - unistd.c + ..\..\components\libc\compilers\common\delay.c + delay.c 0 0 diff --git a/bsp/hc32f460/project.uvprojx b/bsp/hc32f460/project.uvprojx index 857c8b9c1e..575d6ef505 100644 --- a/bsp/hc32f460/project.uvprojx +++ b/bsp/hc32f460/project.uvprojx @@ -398,16 +398,16 @@ 1 ..\..\libcpu\arm\common\div0.c - - backtrace.c - 1 - ..\..\libcpu\arm\common\backtrace.c - showmem.c 1 ..\..\libcpu\arm\common\showmem.c + + backtrace.c + 1 + ..\..\libcpu\arm\common\backtrace.c + context_rvds.S 2 @@ -438,16 +438,6 @@ 1 ..\..\components\drivers\src\ringbuffer.c - - dataqueue.c - 1 - ..\..\components\drivers\src\dataqueue.c - - - pipe.c - 1 - ..\..\components\drivers\src\pipe.c - workqueue.c 1 @@ -458,6 +448,11 @@ 1 ..\..\components\drivers\src\ringblk_buf.c + + pipe.c + 1 + ..\..\components\drivers\src\pipe.c + completion.c 1 @@ -468,6 +463,11 @@ 1 ..\..\components\drivers\src\waitqueue.c + + dataqueue.c + 1 + ..\..\components\drivers\src\dataqueue.c + @@ -541,77 +541,22 @@ - finsh + Finsh - - finsh_node.c - 1 - ..\..\components\finsh\finsh_node.c - - - finsh_parser.c - 1 - ..\..\components\finsh\finsh_parser.c - - - cmd.c - 1 - ..\..\components\finsh\cmd.c - - - finsh_vm.c - 1 - ..\..\components\finsh\finsh_vm.c - - - msh_file.c - 1 - ..\..\components\finsh\msh_file.c - shell.c 1 ..\..\components\finsh\shell.c - - finsh_token.c - 1 - ..\..\components\finsh\finsh_token.c - - - finsh_var.c - 1 - ..\..\components\finsh\finsh_var.c - - - finsh_compiler.c - 1 - ..\..\components\finsh\finsh_compiler.c - - - finsh_heap.c - 1 - ..\..\components\finsh\finsh_heap.c - - - finsh_ops.c - 1 - ..\..\components\finsh\finsh_ops.c - - - finsh_error.c - 1 - ..\..\components\finsh\finsh_error.c - msh.c 1 ..\..\components\finsh\msh.c - finsh_init.c + msh_file.c 1 - ..\..\components\finsh\finsh_init.c + ..\..\components\finsh\msh_file.c @@ -689,19 +634,9 @@ ..\..\src\irq.c - device.c + ipc.c 1 - ..\..\src\device.c - - - mem.c - 1 - ..\..\src\mem.c - - - components.c - 1 - ..\..\src\components.c + ..\..\src\ipc.c clock.c @@ -709,14 +644,19 @@ ..\..\src\clock.c - mempool.c + components.c 1 - ..\..\src\mempool.c + ..\..\src\components.c - timer.c + idle.c 1 - ..\..\src\timer.c + ..\..\src\idle.c + + + thread.c + 1 + ..\..\src\thread.c kservice.c @@ -734,25 +674,35 @@ ..\..\src\object.c - idle.c + device.c 1 - ..\..\src\idle.c + ..\..\src\device.c - ipc.c + timer.c 1 - ..\..\src\ipc.c + ..\..\src\timer.c - thread.c + mem.c 1 - ..\..\src\thread.c + ..\..\src\mem.c + + + mempool.c + 1 + ..\..\src\mempool.c libc + + libc.c + 1 + ..\..\components\libc\compilers\armlibc\libc.c + mem_std.c 1 @@ -763,20 +713,15 @@ 1 ..\..\components\libc\compilers\armlibc\stdio.c - - libc.c - 1 - ..\..\components\libc\compilers\armlibc\libc.c - syscalls.c 1 ..\..\components\libc\compilers\armlibc\syscalls.c - delay.c + unistd.c 1 - ..\..\components\libc\compilers\common\delay.c + ..\..\components\libc\compilers\common\unistd.c stdlib.c @@ -789,9 +734,9 @@ ..\..\components\libc\compilers\common\time.c - unistd.c + delay.c 1 - ..\..\components\libc\compilers\common\unistd.c + ..\..\components\libc\compilers\common\delay.c