From 51100ae4a6654ba2402daecde0047a99667441ea Mon Sep 17 00:00:00 2001 From: guo Date: Tue, 1 Aug 2023 00:00:49 +0800 Subject: [PATCH] [libcpu/Kconfig] add ARCH_ARM_CORTEX_M23 define (#7895) --- bsp/renesas/ra2l1-cpk/.config | 12 +- bsp/renesas/ra2l1-cpk/project.uvoptx | 618 +------------------------- bsp/renesas/ra2l1-cpk/project.uvprojx | 353 +++++++-------- bsp/renesas/ra2l1-cpk/rtconfig.h | 7 + libcpu/Kconfig | 5 + 5 files changed, 188 insertions(+), 807 deletions(-) diff --git a/bsp/renesas/ra2l1-cpk/.config b/bsp/renesas/ra2l1-cpk/.config index f39474c340..ae5b4b2965 100644 --- a/bsp/renesas/ra2l1-cpk/.config +++ b/bsp/renesas/ra2l1-cpk/.config @@ -8,6 +8,7 @@ # CONFIG_RT_NAME_MAX=8 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set +# CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set # CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=8 @@ -78,11 +79,18 @@ CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart9" CONFIG_RT_VER_NUM=0x50001 # CONFIG_RT_USING_STDC_ATOMIC is not set + +# +# RT-Thread Architecture +# # CONFIG_RT_USING_CACHE is not set -# CONFIG_RT_USING_HW_ATOMIC is not set +CONFIG_RT_USING_HW_ATOMIC=y # CONFIG_ARCH_ARM_BOOTWITH_FLUSH_CACHE is not set # CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set -# CONFIG_RT_USING_CPU_FFS is not set +CONFIG_RT_USING_CPU_FFS=y +CONFIG_ARCH_ARM=y +CONFIG_ARCH_ARM_CORTEX_M=y +CONFIG_ARCH_ARM_CORTEX_M23=y # # RT-Thread Components diff --git a/bsp/renesas/ra2l1-cpk/project.uvoptx b/bsp/renesas/ra2l1-cpk/project.uvoptx index a966455feb..0db123382a 100644 --- a/bsp/renesas/ra2l1-cpk/project.uvoptx +++ b/bsp/renesas/ra2l1-cpk/project.uvoptx @@ -207,611 +207,11 @@ - Compiler + Source Group 1 0 0 0 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - syscall_mem.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - syscalls.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cctype.c - cctype.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cstdio.c - cstdio.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cstdlib.c - cstdlib.c - 0 - 0 - - - 1 - 6 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cstring.c - cstring.c - 0 - 0 - - - 1 - 7 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\ctime.c - ctime.c - 0 - 0 - - - 1 - 8 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cwchar.c - cwchar.c - 0 - 0 - - - - - CPU - 0 - 0 - 0 - 0 - - 2 - 9 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\common\div0.c - div0.c - 0 - 0 - - - 2 - 10 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\common\showmem.c - showmem.c - 0 - 0 - - - 2 - 11 - 2 - 0 - 0 - 0 - ..\..\..\libcpu\arm\cortex-m23\context_rvds.S - context_rvds.S - 0 - 0 - - - 2 - 12 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\cortex-m23\cpuport.c - cpuport.c - 0 - 0 - - - - - DeviceDrivers - 0 - 0 - 0 - 0 - - 3 - 13 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\core\device.c - device.c - 0 - 0 - - - 3 - 14 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\completion.c - completion.c - 0 - 0 - - - 3 - 15 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\dataqueue.c - dataqueue.c - 0 - 0 - - - 3 - 16 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\pipe.c - pipe.c - 0 - 0 - - - 3 - 17 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\ringblk_buf.c - ringblk_buf.c - 0 - 0 - - - 3 - 18 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\ringbuffer.c - ringbuffer.c - 0 - 0 - - - 3 - 19 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\waitqueue.c - waitqueue.c - 0 - 0 - - - 3 - 20 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\workqueue.c - workqueue.c - 0 - 0 - - - 3 - 21 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\misc\pin.c - pin.c - 0 - 0 - - - 3 - 22 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\serial\serial_v2.c - serial_v2.c - 0 - 0 - - - - - Drivers - 0 - 0 - 0 - 0 - - 4 - 23 - 1 - 0 - 0 - 0 - ..\libraries\HAL_Drivers\drv_common.c - drv_common.c - 0 - 0 - - - 4 - 24 - 1 - 0 - 0 - 0 - ..\libraries\HAL_Drivers\drv_gpio.c - drv_gpio.c - 0 - 0 - - - 4 - 25 - 1 - 0 - 0 - 0 - ..\libraries\HAL_Drivers\drv_usart_v2.c - drv_usart_v2.c - 0 - 0 - - - - - Filesystem - 0 - 0 - 0 - 0 - - 5 - 26 - 1 - 0 - 0 - 0 - ..\..\..\components\dfs\dfs_v1\src\dfs_posix.c - dfs_posix.c - 0 - 0 - - - 5 - 27 - 1 - 0 - 0 - 0 - ..\..\..\components\dfs\dfs_v1\src\dfs_fs.c - dfs_fs.c - 0 - 0 - - - 5 - 28 - 1 - 0 - 0 - 0 - ..\..\..\components\dfs\dfs_v1\src\dfs.c - dfs.c - 0 - 0 - - - 5 - 29 - 1 - 0 - 0 - 0 - ..\..\..\components\dfs\dfs_v1\src\dfs_file.c - dfs_file.c - 0 - 0 - - - - - Finsh - 0 - 0 - 0 - 0 - - 6 - 30 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\shell.c - shell.c - 0 - 0 - - - 6 - 31 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\cmd.c - cmd.c - 0 - 0 - - - 6 - 32 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\msh.c - msh.c - 0 - 0 - - - 6 - 33 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\msh_file.c - msh_file.c - 0 - 0 - - - 6 - 34 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\msh_parse.c - msh_parse.c - 0 - 0 - - - - - Kernel - 0 - 0 - 0 - 0 - - 7 - 35 - 1 - 0 - 0 - 0 - ..\..\..\src\clock.c - clock.c - 0 - 0 - - - 7 - 36 - 1 - 0 - 0 - 0 - ..\..\..\src\components.c - components.c - 0 - 0 - - - 7 - 37 - 1 - 0 - 0 - 0 - ..\..\..\src\idle.c - idle.c - 0 - 0 - - - 7 - 38 - 1 - 0 - 0 - 0 - ..\..\..\src\ipc.c - ipc.c - 0 - 0 - - - 7 - 39 - 1 - 0 - 0 - 0 - ..\..\..\src\irq.c - irq.c - 0 - 0 - - - 7 - 40 - 1 - 0 - 0 - 0 - ..\..\..\src\kservice.c - kservice.c - 0 - 0 - - - 7 - 41 - 1 - 0 - 0 - 0 - ..\..\..\src\mem.c - mem.c - 0 - 0 - - - 7 - 42 - 1 - 0 - 0 - 0 - ..\..\..\src\mempool.c - mempool.c - 0 - 0 - - - 7 - 43 - 1 - 0 - 0 - 0 - ..\..\..\src\object.c - object.c - 0 - 0 - - - 7 - 44 - 1 - 0 - 0 - 0 - ..\..\..\src\scheduler_up.c - scheduler_up.c - 0 - 0 - - - 7 - 45 - 1 - 0 - 0 - 0 - ..\..\..\src\thread.c - thread.c - 0 - 0 - - - 7 - 46 - 1 - 0 - 0 - 0 - ..\..\..\src\timer.c - timer.c - 0 - 0 - @@ -821,8 +221,8 @@ 0 0 - 8 - 47 + 2 + 1 1 0 0 @@ -832,6 +232,18 @@ 0 0 + + 2 + 2 + 1 + 0 + 0 + 0 + .\src\pm_test.c + pm_test.c + 0 + 0 + diff --git a/bsp/renesas/ra2l1-cpk/project.uvprojx b/bsp/renesas/ra2l1-cpk/project.uvprojx index 56c05798a3..98ca131525 100644 --- a/bsp/renesas/ra2l1-cpk/project.uvprojx +++ b/bsp/renesas/ra2l1-cpk/project.uvprojx @@ -1,16 +1,13 @@ - 2.1 -
### uVision Project, (C) Keil Software
- Target 1 0x4 ARM-ADS - 6190000::V6.19::ARMCLANG + 6160000::V6.16::ARMCLANG 1 @@ -19,28 +16,28 @@ Renesas.RA_DFP.3.6.0 https://www2.renesas.eu/Keil_MDK_Packs/ CPUTYPE("Cortex-M23") CLOCK(12000000) ELITTLE - - - + + + 0 - - - - - - - - - - + + + + + + + + + + $$Device:R7FA2L1AB2DFM$SVD\R7FA2L1AB.svd 0 0 - - - - - + + + + + 0 0 @@ -62,8 +59,8 @@ 0 0 - - + + 0 0 0 @@ -72,8 +69,8 @@ 0 0 - - + + 0 0 0 @@ -82,15 +79,15 @@ 0 0 - - + + 0 0 0 0 0 - + 0 @@ -104,8 +101,8 @@ 0 0 3 - - + + 1 @@ -137,12 +134,12 @@ -1 1 - + "" () - - - - + + + + 0 @@ -175,7 +172,7 @@ 0 0 "Cortex-M23" - + 0 0 0 @@ -186,7 +183,6 @@ 0 0 0 - 0 0 0 0 @@ -310,7 +306,7 @@ 0x0 - + 1 @@ -338,9 +334,9 @@ 0 -Wno-license-management -Wunused -Wuninitialized -Wall -Wmissing-declarations -Wpointer-arith -Waggregate-return -Wfloat-equal - RT_USING_LIBC, __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, __RTTHREAD__ - - ..\..\..\components\libc\posix\io\stdio;..\..\..\components\dfs\dfs_v1\include;ra_cfg\fsp_cfg;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\HAL_Drivers\config;..\..\..\components\libc\posix\ipc;..\..\..\components\libc\compilers\common\extension;..\..\..\components\drivers\include;.;board\ports;ra_cfg\fsp_cfg\bsp;..\libraries\HAL_Drivers;..\..\..\libcpu\arm\cortex-m23;board;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\poll;..\..\..\include;..\..\..\libcpu\arm\common;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension\fcntl\octal + __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, __RTTHREAD__, RT_USING_ARMLIBC, __STDC_LIMIT_MACROS + + ..\..\..\components\libc\posix\io\poll;ra_cfg\fsp_cfg\bsp;..\..\..\components\libc\posix\io\stdio;..\..\..\components\drivers\include;..\libraries\HAL_Drivers\config;..\..\..\libcpu\arm\cortex-m23;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;ra_cfg\fsp_cfg;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\HAL_Drivers;..\..\..\components\drivers\include;.;..\..\..\components\libc\compilers\common\extension\fcntl\octal;board;..\..\..\libcpu\arm\common;..\..\..\include;board\ports;..\..\..\components\libc\compilers\common\extension;..\..\..\components\dfs\dfs_v1\include @@ -355,10 +351,10 @@ 0 4 - - - - + + + + @@ -368,14 +364,14 @@ 0 0 0 - - - + + + .\script\fsp.scat - - - - + + + + 6319,6314 @@ -389,36 +385,50 @@ 1 ..\..\..\components\libc\compilers\armlibc\syscall_mem.c + + syscalls.c 1 ..\..\..\components\libc\compilers\armlibc\syscalls.c + + cctype.c 1 ..\..\..\components\libc\compilers\common\cctype.c + + cstdio.c 1 ..\..\..\components\libc\compilers\common\cstdio.c + + cstdlib.c 1 ..\..\..\components\libc\compilers\common\cstdlib.c + + cstring.c 1 ..\..\..\components\libc\compilers\common\cstring.c + + ctime.c 1 ..\..\..\components\libc\compilers\common\ctime.c + + cwchar.c 1 @@ -428,22 +438,35 @@
CPU + + + atomic_arm.c + 1 + ..\..\..\libcpu\arm\common\atomic_arm.c + + div0.c 1 ..\..\..\libcpu\arm\common\div0.c + + showmem.c 1 ..\..\..\libcpu\arm\common\showmem.c + + context_rvds.S 2 ..\..\..\libcpu\arm\cortex-m23\context_rvds.S + + cpuport.c 1 @@ -459,46 +482,64 @@ 1 ..\..\..\components\drivers\core\device.c + + completion.c 1 ..\..\..\components\drivers\ipc\completion.c + + dataqueue.c 1 ..\..\..\components\drivers\ipc\dataqueue.c + + pipe.c 1 ..\..\..\components\drivers\ipc\pipe.c + + ringblk_buf.c 1 ..\..\..\components\drivers\ipc\ringblk_buf.c + + ringbuffer.c 1 ..\..\..\components\drivers\ipc\ringbuffer.c + + waitqueue.c 1 ..\..\..\components\drivers\ipc\waitqueue.c + + workqueue.c 1 ..\..\..\components\drivers\ipc\workqueue.c + + pin.c 1 ..\..\..\components\drivers\misc\pin.c + + serial_v2.c 1 @@ -514,164 +555,51 @@ 1 ..\libraries\HAL_Drivers\drv_common.c - - 2 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 -std=c99 - + + + drv_gpio.c 1 ..\libraries\HAL_Drivers\drv_gpio.c - - 2 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 -std=c99 - + + + drv_usart_v2.c 1 ..\libraries\HAL_Drivers\drv_usart_v2.c - - 2 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 -std=c99 - + @@ -687,46 +615,60 @@ 1 ..\..\..\components\dfs\dfs_v1\src\dfs_posix.c + + - dfs_fs.c + dfs_file.c 1 - ..\..\..\components\dfs\dfs_v1\src\dfs_fs.c + ..\..\..\components\dfs\dfs_v1\src\dfs_file.c + + dfs.c 1 ..\..\..\components\dfs\dfs_v1\src\dfs.c + + - dfs_file.c + dfs_fs.c 1 - ..\..\..\components\dfs\dfs_v1\src\dfs_file.c + ..\..\..\components\dfs\dfs_v1\src\dfs_fs.c Finsh + + + msh_file.c + 1 + ..\..\..\components\finsh\msh_file.c + + 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 - + + msh_parse.c 1 @@ -742,56 +684,78 @@ 1 ..\..\..\src\clock.c + + components.c 1 ..\..\..\src\components.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_up.c 1 ..\..\..\src\scheduler_up.c + + thread.c 1 ..\..\..\src\thread.c + + timer.c 1 @@ -799,41 +763,26 @@ - - :Renesas RA Smart Configurator:Common Sources - - - hal_entry.c - 1 - .\src\hal_entry.c - - - - - ::Flex Software - - - + - + - + - + - + - diff --git a/bsp/renesas/ra2l1-cpk/rtconfig.h b/bsp/renesas/ra2l1-cpk/rtconfig.h index 52015dbf7a..796913c987 100644 --- a/bsp/renesas/ra2l1-cpk/rtconfig.h +++ b/bsp/renesas/ra2l1-cpk/rtconfig.h @@ -52,6 +52,13 @@ #define RT_CONSOLE_DEVICE_NAME "uart9" #define RT_VER_NUM 0x50001 +/* RT-Thread Architecture */ + +#define RT_USING_HW_ATOMIC +#define ARCH_ARM +#define ARCH_ARM_CORTEX_M +#define ARCH_ARM_CORTEX_M23 + /* RT-Thread Components */ #define RT_USING_COMPONENTS_INIT diff --git a/libcpu/Kconfig b/libcpu/Kconfig index 897ce60555..9636ce5599 100644 --- a/libcpu/Kconfig +++ b/libcpu/Kconfig @@ -73,6 +73,11 @@ config ARCH_ARM_CORTEX_M7 select RT_USING_CACHE select RT_USING_HW_ATOMIC +config ARCH_ARM_CORTEX_M23 + bool + select ARCH_ARM_CORTEX_M + select RT_USING_HW_ATOMIC + config ARCH_ARM_CORTEX_M33 bool select ARCH_ARM_CORTEX_M