diff --git a/bsp/acm32f4xx-nucleo/project.ewp b/bsp/acm32f4xx-nucleo/project.ewp new file mode 100644 index 0000000000000000000000000000000000000000..39acf76ca024545f9c43f273af84c2b94ee7d35d --- /dev/null +++ b/bsp/acm32f4xx-nucleo/project.ewp @@ -0,0 +1,2302 @@ + + 3 + + rt-thread + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + ACM32_HAL + + $PROJ_DIR$\libraries\HAL_Driver\Src\HAL_UART.c + + + $PROJ_DIR$\libraries\HAL_Driver\Src\HAL_EXTI.c + + + $PROJ_DIR$\libraries\HAL_Driver\Src\HAL_DMA.c + + + $PROJ_DIR$\libraries\Device\Startup_ACM32F4_iar.s + + + $PROJ_DIR$\libraries\Device\System_ACM32F4.c + + + $PROJ_DIR$\libraries\HAL_Driver\Src\HAL_GPIO.c + + + $PROJ_DIR$\libraries\HAL_Driver\Src\HAL_EFlash.c + + + + Applications + + $PROJ_DIR$\applications\main.c + + + + Compiler + + $PROJ_DIR$\..\..\components\libc\compilers\common\time.c + + + $PROJ_DIR$\..\..\components\libc\compilers\common\stdlib.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_close.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_read.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscalls.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_mem.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_lseek.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_write.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_open.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\environ.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_remove.c + + + + CPU + + $PROJ_DIR$\..\..\libcpu\arm\common\div0.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m33\context_iar.S + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m33\syscall_iar.S + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m33\trustzone.c + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m33\cpuport.c + + + + DeviceDrivers + + $PROJ_DIR$\..\..\components\drivers\ipc\waitqueue.c + + + $PROJ_DIR$\..\..\components\drivers\ipc\pipe.c + + + $PROJ_DIR$\..\..\components\drivers\ipc\ringblk_buf.c + + + $PROJ_DIR$\..\..\components\drivers\ipc\dataqueue.c + + + $PROJ_DIR$\..\..\components\drivers\ipc\ringbuffer.c + + + $PROJ_DIR$\..\..\components\drivers\ipc\completion.c + + + $PROJ_DIR$\..\..\components\drivers\ipc\workqueue.c + + + $PROJ_DIR$\..\..\components\drivers\misc\pin.c + + + $PROJ_DIR$\..\..\components\drivers\serial\serial.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\drv_gpio.c + + + $PROJ_DIR$\drivers\drv_uart.c + + + + Finsh + + $PROJ_DIR$\..\..\components\finsh\shell.c + + + $PROJ_DIR$\..\..\components\finsh\msh.c + + + $PROJ_DIR$\..\..\components\finsh\cmd.c + + + + Kernel + + $PROJ_DIR$\..\..\src\components.c + + + $PROJ_DIR$\..\..\src\kservice.c + + + $PROJ_DIR$\..\..\src\clock.c + + + $PROJ_DIR$\..\..\src\object.c + + + $PROJ_DIR$\..\..\src\irq.c + + + $PROJ_DIR$\..\..\src\idle.c + + + $PROJ_DIR$\..\..\src\ipc.c + + + $PROJ_DIR$\..\..\src\mem.c + + + $PROJ_DIR$\..\..\src\mempool.c + + + $PROJ_DIR$\..\..\src\scheduler.c + + + $PROJ_DIR$\..\..\src\timer.c + + + $PROJ_DIR$\..\..\src\thread.c + + + $PROJ_DIR$\..\..\src\device.c + + + + POSIX + + diff --git a/bsp/acm32f4xx-nucleo/project.eww b/bsp/acm32f4xx-nucleo/project.eww new file mode 100644 index 0000000000000000000000000000000000000000..c2cb02eb1e89d73e24183274c1c886ddf74f9537 --- /dev/null +++ b/bsp/acm32f4xx-nucleo/project.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\project.ewp + + + + + diff --git a/bsp/acm32f4xx-nucleo/template.ewp b/bsp/acm32f4xx-nucleo/template.ewp new file mode 100644 index 0000000000000000000000000000000000000000..bbd1adf10c1e73a7fe9432505646c8602464b0d2 --- /dev/null +++ b/bsp/acm32f4xx-nucleo/template.ewp @@ -0,0 +1,2074 @@ + + + 3 + + rt-thread + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + diff --git a/bsp/acm32f4xx-nucleo/template.eww b/bsp/acm32f4xx-nucleo/template.eww new file mode 100644 index 0000000000000000000000000000000000000000..bd036bb4c98c1598f04b85f64b0dff37f6ec6028 --- /dev/null +++ b/bsp/acm32f4xx-nucleo/template.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\template.ewp + + + + + diff --git a/libcpu/arm/cortex-m33/syscall_iar.S b/libcpu/arm/cortex-m33/syscall_iar.S index 53a6790ec14f25bae490aadadbdeb659b6ca2f8a..7a058617aef15c19e9ce04cc4a6eb45d23e54609 100644 --- a/libcpu/arm/cortex-m33/syscall_iar.S +++ b/libcpu/arm/cortex-m33/syscall_iar.S @@ -6,22 +6,25 @@ ; * Change Logs: ; * Date Author Notes ; * 2019-10-25 tyx first version +; * 2021-03-26 lxf modify bad instruction ; */ ;/* ; * @addtogroup cortex-m33 ; */ + SECTION .text:CODE(2) THUMB REQUIRE8 PRESERVE8 + IMPORT rt_secure_svc_handle + ;/* ; * int tzcall(int id, rt_ubase_t arg0, rt_ubase_t arg1, rt_ubase_t arg2); ; */ -.global tzcall -.type tzcall, %function + EXPORT tzcall tzcall: SVC 1 ;/* call SVC 1 */ BX LR @@ -39,8 +42,7 @@ tzcall_entry: syscall_entry: BX LR ;/* return to user app */ -.global SVC_Handler -.type SVC_Handler, %function + EXPORT SVC_Handler SVC_Handler: ;/* get SP, save to R1 */ @@ -61,3 +63,5 @@ get_sp_done: ;/* if svc == 1, do TrustZone call */ CMP R0, #0x1 BEQ tzcall_entry + + END