From 132dba2e656c1c5e7b892a617485179bb8dcea8d Mon Sep 17 00:00:00 2001 From: Dozingfiretruck <1473454180@qq.com> Date: Fri, 12 May 2023 09:24:05 +0800 Subject: [PATCH] [bsp/airm2m] update:update AIR32F10xLib (#7472) --- bsp/airm2m/air32f103/.config | 11 +- bsp/airm2m/air32f103/README.md | 2 +- bsp/airm2m/air32f103/board/board.h | 4 +- .../AIR32F10xLib/src/air32f10x_flash.c | 25 +- .../AIR32F10xLib/src/air32f10x_rcc_ex.c | 5 +- .../libraries/Startup/arm/startup_air32f10x.s | 20 +- .../Startup/gcc/linker/AIR32F103XB_FLASH.ld | 6 +- .../libraries/Startup/gcc/startup_air32f10x.s | 17 + bsp/airm2m/air32f103/project.uvoptx | 906 +++++++++++++++++- bsp/airm2m/air32f103/project.uvprojx | 251 ++--- bsp/airm2m/air32f103/rtconfig.h | 6 +- bsp/airm2m/air32f103/template.uvprojx | 20 +- 12 files changed, 1055 insertions(+), 218 deletions(-) diff --git a/bsp/airm2m/air32f103/.config b/bsp/airm2m/air32f103/.config index 1798b8dc38..eafb3d35e9 100644 --- a/bsp/airm2m/air32f103/.config +++ b/bsp/airm2m/air32f103/.config @@ -58,7 +58,6 @@ CONFIG_RT_USING_MESSAGEQUEUE=y # # Memory Management # -CONFIG_RT_PAGE_MAX_ORDER=11 CONFIG_RT_USING_MEMPOOL=y CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_SLAB is not set @@ -82,7 +81,7 @@ CONFIG_RT_USING_DEVICE=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=256 CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" -CONFIG_RT_VER_NUM=0x50000 +CONFIG_RT_VER_NUM=0x50001 # CONFIG_RT_USING_STDC_ATOMIC is not set # CONFIG_RT_USING_CACHE is not set CONFIG_RT_USING_HW_ATOMIC=y @@ -116,6 +115,10 @@ CONFIG_FINSH_USING_DESCRIPTION=y # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set # CONFIG_FINSH_USING_AUTH is not set CONFIG_FINSH_ARG_MAX=10 + +# +# DFS: device virtual file system +# # CONFIG_RT_USING_DFS is not set # CONFIG_RT_USING_FAL is not set @@ -439,6 +442,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_HASH_MATCH is not set # CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set # CONFIG_PKG_USING_VOFA_PLUS is not set +# CONFIG_PKG_USING_RT_TRACE is not set # # system packages @@ -510,6 +514,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_QPC is not set # CONFIG_PKG_USING_AGILE_UPGRADE is not set # CONFIG_PKG_USING_FLASH_BLOB is not set +# CONFIG_PKG_USING_MLIBC is not set # # peripheral libraries and drivers @@ -664,13 +669,13 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_MISAKA_AT24CXX is not set # CONFIG_PKG_USING_MISAKA_RGB_BLING is not set # CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set -# CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_MB85RS16 is not set # CONFIG_PKG_USING_RFM300 is not set # CONFIG_PKG_USING_IO_INPUT_FILTER is not set # CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set # CONFIG_PKG_USING_LRF_NV7LIDAR is not set +# CONFIG_PKG_USING_AIP650 is not set # CONFIG_PKG_USING_FINGERPRINT is not set # diff --git a/bsp/airm2m/air32f103/README.md b/bsp/airm2m/air32f103/README.md index cb47910913..48e2f61af5 100644 --- a/bsp/airm2m/air32f103/README.md +++ b/bsp/airm2m/air32f103/README.md @@ -22,7 +22,7 @@ Air32F103为系列芯片,首发型号为Air32F103CBT6,其外设和硬件设 该开发板常用 **板载资源** 如下: -- MCU:Air32F103CBT6,主频 216MHz,128K FLASH ,32K RAM +- MCU:Air32F103CBT6,主频 216MHz,128K FLASH ,96K RAM - 调试下载接口,UART0 To Type-c USB 接口 开发板更多详细信息请参考 [合宙Air32F103开发板 - LuatOS 文档](https://wiki.luatos.com/chips/air32f103/board.html)。 diff --git a/bsp/airm2m/air32f103/board/board.h b/bsp/airm2m/air32f103/board/board.h index da8a2d87ad..e21f907aa6 100644 --- a/bsp/airm2m/air32f103/board/board.h +++ b/bsp/airm2m/air32f103/board/board.h @@ -24,8 +24,8 @@ extern "C" { #define AIR32_FLASH_SIZE (128 * 1024) #define AIR32_FLASH_END_ADDRESS ((uint32_t)(AIR32_FLASH_START_ADRESS + AIR32_FLASH_SIZE)) -/* Internal SRAM memory size[Kbytes] , Default: 32*/ -#define AIR32_SRAM_SIZE 32 +/* Internal SRAM memory size[Kbytes] , Default: 96*/ +#define AIR32_SRAM_SIZE 96 #define AIR32_SRAM_END (0x20000000 + AIR32_SRAM_SIZE * 1024) #if defined(__ARMCC_VERSION) diff --git a/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_flash.c b/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_flash.c index 1dfa9db10b..a2e1fd9be3 100644 --- a/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_flash.c +++ b/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_flash.c @@ -581,7 +581,7 @@ FLASH_Status FLASH_EraseAllBank2Pages(void) #if defined(__CC_ARM) __ASM void SetStrt(void) { - LDR R0, [PC,#0] + MOV R0, PC LDR R1, [R0,#16] LDR R1, [R0,#32] LDR R0, =0x40022010 @@ -624,6 +624,29 @@ void SetStrt(void) "BNE FLAGLABLE\n" "BX lr"); } +#elif defined(__clang__) +__STATIC_INLINE void SetStrt(void) +{ + __ASM("MOV R0, PC"); + __ASM("LDR R1, [R0,#16]"); + __ASM("LDR R1, [R0,#32]"); + __ASM("LDR R0, =0x40022010"); + __ASM("LDR R1, =0x60"); + __ASM("STR R1,[R0]"); + __ASM("NOP"); + __ASM("NOP"); + __ASM("NOP"); + __ASM("NOP"); + __ASM("NOP"); + __ASM("NOP"); + __ASM("FLAGLABLE:"); + __ASM("LDR R1, =0x4002200C"); + __ASM("LDR R2, [R1]"); + __ASM("AND R2, #0x01"); + __ASM("CMP R2, #0x00"); + __ASM("BNE FLAGLABLE"); + __ASM("BX lr"); +} #elif defined(__GNUC__) void SetStrt(void) { diff --git a/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_rcc_ex.c b/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_rcc_ex.c index b780956e71..3bfddd4353 100644 --- a/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_rcc_ex.c +++ b/bsp/airm2m/air32f103/libraries/AIR32F10xLib/src/air32f10x_rcc_ex.c @@ -3,6 +3,7 @@ #include #include #include "air32f10x.h" +#include "air32f10x_rcc_ex.h" /* ------------ RCC registers bit address in the alias region ----------- */ #define RCC_OFFSET (RCC_BASE - PERIPH_BASE) @@ -158,7 +159,6 @@ static __I uint8_t ADCPrescTable[4] = {2, 4, 6, 8}; uint32_t AIR_RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t RCC_PLLMul, FlashClkDiv Latency) { - volatile uint32_t sramsize = 0; // uint32_t pllmul = 0; // FunctionalState pwr_gating_state = 0; /* Check the parameters */ @@ -169,15 +169,12 @@ uint32_t AIR_RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t RCC_PLLMul, FlashClk *(volatile uint32_t *)(0x40016C00) = 0xa7d93a86;//解一、二、三级锁 *(volatile uint32_t *)(0x40016C00) = 0xab12dfcd; *(volatile uint32_t *)(0x40016C00) = 0xcded3526; - sramsize = *(volatile uint32_t *)(0x40016C18); - *(volatile uint32_t *)(0x40016C18) = 0x200183FF;//配置sram大小, 将BOOT使用对sram打开 *(volatile uint32_t *)(0x4002228C) = 0xa5a5a5a5;//QSPI解锁 SysFreq_Set(RCC_PLLMul,Latency ,0,1); RCC->CFGR = (RCC->CFGR & ~0x00030000) | RCC_PLLSource; //恢复配置前状态 - // *(volatile uint32_t *)(0x40016C18) = sramsize; *(volatile uint32_t *)(0x400210F0) = 0;//开启sys_cfg门控 *(volatile uint32_t *)(0x40016C00) = ~0xa7d93a86;//加一、二、三级锁 *(volatile uint32_t *)(0x40016C00) = ~0xab12dfcd; diff --git a/bsp/airm2m/air32f103/libraries/Startup/arm/startup_air32f10x.s b/bsp/airm2m/air32f103/libraries/Startup/arm/startup_air32f10x.s index 2812d57ae4..63f34723ec 100644 --- a/bsp/airm2m/air32f103/libraries/Startup/arm/startup_air32f10x.s +++ b/bsp/airm2m/air32f103/libraries/Startup/arm/startup_air32f10x.s @@ -13,7 +13,7 @@ ; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Stack_Size EQU 0x00001000 +Stack_Size EQU 0x00000400 AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size @@ -23,7 +23,7 @@ __initial_sp ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00001000 +Heap_Size EQU 0x00000000 AREA HEAP, NOINIT, READWRITE, ALIGN=3 __heap_base @@ -202,6 +202,22 @@ BOOT_RAM PROC ; Reset handler Reset_Handler PROC EXPORT Reset_Handler [WEAK] + LDR R0,=0x400210F0 + MOV R1,#0x00000001 + STR R1,[R0] + LDR R2,=0x40016C00 + LDR R3,=0xa7d93a86 + STR R3,[R2] + LDR R3,=0xab12dfcd + STR R3,[R2] + LDR R3,=0xcded3526 + STR R3,[R2] + LDR R3,=0x200183FF + STR R3,[R2,#0x18] + LDR R4,=0x4002228c + LDR R5,=0xa5a5a5a5 + STR R5,[R4] + MOV R1,#0x00000000 IMPORT __main IMPORT SystemInit LDR R0, =SystemInit diff --git a/bsp/airm2m/air32f103/libraries/Startup/gcc/linker/AIR32F103XB_FLASH.ld b/bsp/airm2m/air32f103/libraries/Startup/gcc/linker/AIR32F103XB_FLASH.ld index 9a2870e54d..4134257df7 100644 --- a/bsp/airm2m/air32f103/libraries/Startup/gcc/linker/AIR32F103XB_FLASH.ld +++ b/bsp/airm2m/air32f103/libraries/Startup/gcc/linker/AIR32F103XB_FLASH.ld @@ -4,14 +4,14 @@ ** File : AIR32F103XB_FLASH.ld ** ** Abstract : Linker script for AIR32F103xB Device with -** 128KByte FLASH, 20KByte RAM +** 128KByte FLASH, 96KByte RAM ** ** Set heap size, stack size and stack location according ** to application requirements. ** ** Set memory bank area and size if external memory is used. ** -** Target : STMicroelectronics AIR32 +** Target : AIR32 ** ** ** Distribution: The file is distributed as is, without any warranty @@ -42,7 +42,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K } /* Define output sections */ diff --git a/bsp/airm2m/air32f103/libraries/Startup/gcc/startup_air32f10x.s b/bsp/airm2m/air32f103/libraries/Startup/gcc/startup_air32f10x.s index 1026f5fec8..20582c03d0 100644 --- a/bsp/airm2m/air32f103/libraries/Startup/gcc/startup_air32f10x.s +++ b/bsp/airm2m/air32f103/libraries/Startup/gcc/startup_air32f10x.s @@ -66,6 +66,23 @@ LoopFillZerobss: cmp r2, r4 bcc FillZerobss + ldr r0,=0x400210F0 + mov r1,#0x00000001 + str r1,[r0] + ldr r2,=0x40016C00 + ldr r3,=0xa7d93a86 + str r3,[r2] + ldr r3,=0xab12dfcd + str r3,[r2] + ldr r3,=0xcded3526 + str r3,[r2] + ldr r3,=0x200183FF + str r3,[r2,#0x18] + ldr r4,=0x4002228c + ldr r5,=0xa5a5a5a5 + str r5,[r4] + mov r1,#0x00000000 + /* Call the clock system intitialization function.*/ bl SystemInit /* Call static constructors */ diff --git a/bsp/airm2m/air32f103/project.uvoptx b/bsp/airm2m/air32f103/project.uvoptx index 4de520935a..9babc995f3 100644 --- a/bsp/airm2m/air32f103/project.uvoptx +++ b/bsp/airm2m/air32f103/project.uvoptx @@ -103,7 +103,7 @@ 1 0 0 - 3 + 6 @@ -114,7 +114,7 @@ - BIN\CMSIS_AGDI.dll + STLink\ST-LINKIII-KEIL_SWO.dll @@ -175,11 +175,911 @@ - Source Group 1 + Applications 0 0 0 0 + + 1 + 1 + 1 + 0 + 0 + 0 + applications\main.c + main.c + 0 + 0 + + + + + Compiler + 0 + 0 + 0 + 0 + + 2 + 2 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\armlibc\syscall_mem.c + syscall_mem.c + 0 + 0 + + + 2 + 3 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\armlibc\syscalls.c + syscalls.c + 0 + 0 + + + 2 + 4 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cctype.c + cctype.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cstdio.c + cstdio.c + 0 + 0 + + + 2 + 6 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cstdlib.c + cstdlib.c + 0 + 0 + + + 2 + 7 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cstring.c + cstring.c + 0 + 0 + + + 2 + 8 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\ctime.c + ctime.c + 0 + 0 + + + 2 + 9 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cwchar.c + cwchar.c + 0 + 0 + + + + + CPU + 0 + 0 + 0 + 0 + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\libcpu\arm\common\atomic_arm.c + atomic_arm.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\libcpu\arm\common\div0.c + div0.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\libcpu\arm\common\showmem.c + showmem.c + 0 + 0 + + + 3 + 13 + 2 + 0 + 0 + 0 + ..\..\..\libcpu\arm\cortex-m3\context_rvds.S + context_rvds.S + 0 + 0 + + + 3 + 14 + 1 + 0 + 0 + 0 + ..\..\..\libcpu\arm\cortex-m3\cpuport.c + cpuport.c + 0 + 0 + + + + + DeviceDrivers + 0 + 0 + 0 + 0 + + 4 + 15 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\completion.c + completion.c + 0 + 0 + + + 4 + 16 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\dataqueue.c + dataqueue.c + 0 + 0 + + + 4 + 17 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\pipe.c + pipe.c + 0 + 0 + + + 4 + 18 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\ringblk_buf.c + ringblk_buf.c + 0 + 0 + + + 4 + 19 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\ringbuffer.c + ringbuffer.c + 0 + 0 + + + 4 + 20 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\waitqueue.c + waitqueue.c + 0 + 0 + + + 4 + 21 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\ipc\workqueue.c + workqueue.c + 0 + 0 + + + 4 + 22 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\misc\pin.c + pin.c + 0 + 0 + + + 4 + 23 + 1 + 0 + 0 + 0 + ..\..\..\components\drivers\serial\serial.c + serial.c + 0 + 0 + + + + + Drivers + 0 + 0 + 0 + 0 + + 5 + 24 + 1 + 0 + 0 + 0 + board\board.c + board.c + 0 + 0 + + + 5 + 25 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_adc.c + air32f10x_adc.c + 0 + 0 + + + 5 + 26 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_bkp.c + air32f10x_bkp.c + 0 + 0 + + + 5 + 27 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_can.c + air32f10x_can.c + 0 + 0 + + + 5 + 28 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_crc.c + air32f10x_crc.c + 0 + 0 + + + 5 + 29 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_dac.c + air32f10x_dac.c + 0 + 0 + + + 5 + 30 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_dbgmcu.c + air32f10x_dbgmcu.c + 0 + 0 + + + 5 + 31 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_dma.c + air32f10x_dma.c + 0 + 0 + + + 5 + 32 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_exti.c + air32f10x_exti.c + 0 + 0 + + + 5 + 33 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_flash.c + air32f10x_flash.c + 0 + 0 + + + 5 + 34 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_fsmc.c + air32f10x_fsmc.c + 0 + 0 + + + 5 + 35 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_gpio.c + air32f10x_gpio.c + 0 + 0 + + + 5 + 36 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_i2c.c + air32f10x_i2c.c + 0 + 0 + + + 5 + 37 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_iwdg.c + air32f10x_iwdg.c + 0 + 0 + + + 5 + 38 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_otp.c + air32f10x_otp.c + 0 + 0 + + + 5 + 39 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_pwr.c + air32f10x_pwr.c + 0 + 0 + + + 5 + 40 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_rcc.c + air32f10x_rcc.c + 0 + 0 + + + 5 + 41 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_rcc_ex.c + air32f10x_rcc_ex.c + 0 + 0 + + + 5 + 42 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_rtc.c + air32f10x_rtc.c + 0 + 0 + + + 5 + 43 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_sdio.c + air32f10x_sdio.c + 0 + 0 + + + 5 + 44 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_spi.c + air32f10x_spi.c + 0 + 0 + + + 5 + 45 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_tim.c + air32f10x_tim.c + 0 + 0 + + + 5 + 46 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_trng.c + air32f10x_trng.c + 0 + 0 + + + 5 + 47 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_usart.c + air32f10x_usart.c + 0 + 0 + + + 5 + 48 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\air32f10x_wwdg.c + air32f10x_wwdg.c + 0 + 0 + + + 5 + 49 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\misc.c + misc.c + 0 + 0 + + + 5 + 50 + 1 + 0 + 0 + 0 + libraries\AIR32F10xLib\src\system_air32f10x.c + system_air32f10x.c + 0 + 0 + + + 5 + 51 + 2 + 0 + 0 + 0 + libraries\Startup\arm\startup_air32f10x.s + startup_air32f10x.s + 0 + 0 + + + 5 + 52 + 1 + 0 + 0 + 0 + libraries\rt_drivers\drv_common.c + drv_common.c + 0 + 0 + + + 5 + 53 + 1 + 0 + 0 + 0 + libraries\rt_drivers\drv_gpio.c + drv_gpio.c + 0 + 0 + + + 5 + 54 + 1 + 0 + 0 + 0 + libraries\rt_drivers\drv_usart.c + drv_usart.c + 0 + 0 + + + + + Finsh + 0 + 0 + 0 + 0 + + 6 + 55 + 1 + 0 + 0 + 0 + ..\..\..\components\finsh\shell.c + shell.c + 0 + 0 + + + 6 + 56 + 1 + 0 + 0 + 0 + ..\..\..\components\finsh\msh.c + msh.c + 0 + 0 + + + 6 + 57 + 1 + 0 + 0 + 0 + ..\..\..\components\finsh\msh_parse.c + msh_parse.c + 0 + 0 + + + 6 + 58 + 1 + 0 + 0 + 0 + ..\..\..\components\finsh\cmd.c + cmd.c + 0 + 0 + + + + + Kernel + 0 + 0 + 0 + 0 + + 7 + 59 + 1 + 0 + 0 + 0 + ..\..\..\src\clock.c + clock.c + 0 + 0 + + + 7 + 60 + 1 + 0 + 0 + 0 + ..\..\..\src\components.c + components.c + 0 + 0 + + + 7 + 61 + 1 + 0 + 0 + 0 + ..\..\..\src\device.c + device.c + 0 + 0 + + + 7 + 62 + 1 + 0 + 0 + 0 + ..\..\..\src\idle.c + idle.c + 0 + 0 + + + 7 + 63 + 1 + 0 + 0 + 0 + ..\..\..\src\ipc.c + ipc.c + 0 + 0 + + + 7 + 64 + 1 + 0 + 0 + 0 + ..\..\..\src\irq.c + irq.c + 0 + 0 + + + 7 + 65 + 1 + 0 + 0 + 0 + ..\..\..\src\kservice.c + kservice.c + 0 + 0 + + + 7 + 66 + 1 + 0 + 0 + 0 + ..\..\..\src\mem.c + mem.c + 0 + 0 + + + 7 + 67 + 1 + 0 + 0 + 0 + ..\..\..\src\mempool.c + mempool.c + 0 + 0 + + + 7 + 68 + 1 + 0 + 0 + 0 + ..\..\..\src\object.c + object.c + 0 + 0 + + + 7 + 69 + 1 + 0 + 0 + 0 + ..\..\..\src\scheduler_up.c + scheduler_up.c + 0 + 0 + + + 7 + 70 + 1 + 0 + 0 + 0 + ..\..\..\src\thread.c + thread.c + 0 + 0 + + + 7 + 71 + 1 + 0 + 0 + 0 + ..\..\..\src\timer.c + timer.c + 0 + 0 + diff --git a/bsp/airm2m/air32f103/project.uvprojx b/bsp/airm2m/air32f103/project.uvprojx index 0fad690a1f..3f26b6bf52 100644 --- a/bsp/airm2m/air32f103/project.uvprojx +++ b/bsp/airm2m/air32f103/project.uvprojx @@ -1,43 +1,46 @@ + 2.1 +
### uVision Project, (C) Keil Software
+ rt-thread 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC - 0 + 6190000::V6.19::ARMCLANG + 1 AIR32F103CB Generic - Keil.AIR32F103_DFP.1.1.0 + Keil.AIR32F103_DFP.1.1.5 https://luatos.com/t/air32f103/ IRAM(0x20000000,0x8000) IROM(0x08000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE - - + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0Air32F103CBT6 -FS08000000 -FL020000 -FP0($$Device:AIR32F103CB$Flash\Air32F103CBT6.FLM)) 0 $$Device:AIR32F103CB$Device\Include\air32f10x.h - - - - - - - - - + + + + + + + + + $$Device:AIR32F103CB$SVD\AIR32F103xx.svd 0 0 - - - - - + + + + + 0 0 @@ -59,8 +62,8 @@ 0 0 - - + + 0 0 0 @@ -69,8 +72,8 @@ 0 0 - - + + 0 0 0 @@ -80,14 +83,14 @@ 1 0 fromelf --bin !L --output rtthread.bin - + 0 0 0 0 0 - + 0 @@ -101,8 +104,8 @@ 0 0 3 - - + + 1 @@ -131,15 +134,15 @@ 0 1 1 - 4099 + 4101 1 - BIN\CMSIS_AGDI.dll + STLink\ST-LINKIII-KEIL_SWO.dll "" () - - - - + + + + 0 @@ -172,7 +175,7 @@ 0 0 "Cortex-M3" - + 0 0 0 @@ -244,7 +247,7 @@ 0 0x20000000 - 0x8000 + 0x18000 1 @@ -299,7 +302,7 @@ 0 0x20000000 - 0x8000 + 0x18000 0 @@ -307,11 +310,11 @@ 0x0 - + 1 - 1 + 2 0 0 1 @@ -320,24 +323,24 @@ 0 0 0 - 2 + 3 0 0 1 0 0 - 1 - 1 - 1 - 1 + 6 + 4 + 0 + 0 0 0 0 - + RT_USING_LIBC, RT_USING_ARMLIBC, __STDC_LIMIT_MACROS, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND - - ..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\include;.;..\..\..\components\libc\posix\io\stdio;libraries\AIR32F10xLib\inc;..\..\..\components\libc\compilers\common\extension;..\..\..\libcpu\arm\cortex-m3;board;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\compilers\common\include;applications;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;..\..\..\components\finsh;..\..\..\libcpu\arm\common;..\..\..\components\drivers\include;libraries\rt_drivers;libraries;libraries\CMSIS\Include;board\ports;..\..\..\components\drivers\include + + board\ports;..\..\..\include;board;libraries\AIR32F10xLib\inc;..\..\..\components\libc\posix\ipc;..\..\..\libcpu\arm\common;..\..\..\components\libc\posix\io\stdio;libraries\rt_drivers;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\components\drivers\include;libraries\CMSIS\Include;..\..\..\components\libc\compilers\common\extension;..\..\..\components\finsh;applications;..\..\..\components\libc\posix\io\poll;.;libraries;..\..\..\components\drivers\include;..\..\..\libcpu\arm\cortex-m3;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\include @@ -352,10 +355,10 @@ 0 4 - - - - + + + + @@ -367,13 +370,13 @@ 0 0x08000000 0x20000000 - + .\board\linker_scripts\link.sct - - - - - + + + + + @@ -396,50 +399,36 @@ 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 @@ -455,29 +444,21 @@ 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-m3\context_rvds.S - - cpuport.c 1 @@ -493,57 +474,41 @@ 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.c 1 @@ -559,211 +524,151 @@ 1 board\board.c - - air32f10x_adc.c 1 libraries\AIR32F10xLib\src\air32f10x_adc.c - - air32f10x_bkp.c 1 libraries\AIR32F10xLib\src\air32f10x_bkp.c - - air32f10x_can.c 1 libraries\AIR32F10xLib\src\air32f10x_can.c - - air32f10x_crc.c 1 libraries\AIR32F10xLib\src\air32f10x_crc.c - - air32f10x_dac.c 1 libraries\AIR32F10xLib\src\air32f10x_dac.c - - air32f10x_dbgmcu.c 1 libraries\AIR32F10xLib\src\air32f10x_dbgmcu.c - - air32f10x_dma.c 1 libraries\AIR32F10xLib\src\air32f10x_dma.c - - air32f10x_exti.c 1 libraries\AIR32F10xLib\src\air32f10x_exti.c - - air32f10x_flash.c 1 libraries\AIR32F10xLib\src\air32f10x_flash.c - - air32f10x_fsmc.c 1 libraries\AIR32F10xLib\src\air32f10x_fsmc.c - - air32f10x_gpio.c 1 libraries\AIR32F10xLib\src\air32f10x_gpio.c - - air32f10x_i2c.c 1 libraries\AIR32F10xLib\src\air32f10x_i2c.c - - air32f10x_iwdg.c 1 libraries\AIR32F10xLib\src\air32f10x_iwdg.c - - air32f10x_otp.c 1 libraries\AIR32F10xLib\src\air32f10x_otp.c - - air32f10x_pwr.c 1 libraries\AIR32F10xLib\src\air32f10x_pwr.c - - air32f10x_rcc.c 1 libraries\AIR32F10xLib\src\air32f10x_rcc.c - - air32f10x_rcc_ex.c 1 libraries\AIR32F10xLib\src\air32f10x_rcc_ex.c - - air32f10x_rtc.c 1 libraries\AIR32F10xLib\src\air32f10x_rtc.c - - air32f10x_sdio.c 1 libraries\AIR32F10xLib\src\air32f10x_sdio.c - - air32f10x_spi.c 1 libraries\AIR32F10xLib\src\air32f10x_spi.c - - air32f10x_tim.c 1 libraries\AIR32F10xLib\src\air32f10x_tim.c - - air32f10x_trng.c 1 libraries\AIR32F10xLib\src\air32f10x_trng.c - - air32f10x_usart.c 1 libraries\AIR32F10xLib\src\air32f10x_usart.c - - air32f10x_wwdg.c 1 libraries\AIR32F10xLib\src\air32f10x_wwdg.c - - misc.c 1 libraries\AIR32F10xLib\src\misc.c - - system_air32f10x.c 1 libraries\AIR32F10xLib\src\system_air32f10x.c - - startup_air32f10x.s 2 libraries\Startup\arm\startup_air32f10x.s - - drv_common.c 1 libraries\rt_drivers\drv_common.c - - drv_gpio.c 1 libraries\rt_drivers\drv_gpio.c - - drv_usart.c 1 @@ -779,22 +684,16 @@ 1 ..\..\..\components\finsh\shell.c - - msh.c 1 ..\..\..\components\finsh\msh.c - - msh_parse.c 1 ..\..\..\components\finsh\msh_parse.c - - cmd.c 1 @@ -810,85 +709,61 @@ 1 ..\..\..\src\clock.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_up.c 1 ..\..\..\src\scheduler_up.c - - thread.c 1 ..\..\..\src\thread.c - - timer.c 1 @@ -899,9 +774,11 @@ + - - - + + + +
diff --git a/bsp/airm2m/air32f103/rtconfig.h b/bsp/airm2m/air32f103/rtconfig.h index cccdd33866..5f8f7e6606 100644 --- a/bsp/airm2m/air32f103/rtconfig.h +++ b/bsp/airm2m/air32f103/rtconfig.h @@ -33,7 +33,6 @@ /* Memory Management */ -#define RT_PAGE_MAX_ORDER 11 #define RT_USING_MEMPOOL #define RT_USING_SMALL_MEM #define RT_USING_SMALL_MEM_AS_HEAP @@ -45,7 +44,7 @@ #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 256 #define RT_CONSOLE_DEVICE_NAME "uart1" -#define RT_VER_NUM 0x50000 +#define RT_VER_NUM 0x50001 #define RT_USING_HW_ATOMIC #define RT_USING_CPU_FFS #define ARCH_ARM @@ -72,6 +71,9 @@ #define FINSH_USING_DESCRIPTION #define FINSH_ARG_MAX 10 +/* DFS: device virtual file system */ + + /* Device Drivers */ #define RT_USING_DEVICE_IPC diff --git a/bsp/airm2m/air32f103/template.uvprojx b/bsp/airm2m/air32f103/template.uvprojx index 1110b81b62..5116e09ff3 100644 --- a/bsp/airm2m/air32f103/template.uvprojx +++ b/bsp/airm2m/air32f103/template.uvprojx @@ -11,12 +11,12 @@ 0x4 ARM-ADS 5060750::V5.06 update 6 (build 750)::ARMCC - 0 + 1 AIR32F103CB Generic - Keil.AIR32F103_DFP.1.1.0 + Keil.AIR32F103_DFP.1.1.5 https://luatos.com/t/air32f103/ IRAM(0x20000000,0x8000) IROM(0x08000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE @@ -247,7 +247,7 @@ 0 0x20000000 - 0x8000 + 0x18000 1 @@ -302,7 +302,7 @@ 0 0x20000000 - 0x8000 + 0x18000 0 @@ -314,7 +314,7 @@ 1 - 1 + 2 0 0 1 @@ -323,16 +323,16 @@ 0 0 0 - 2 + 3 0 0 1 0 0 - 1 - 1 - 1 - 1 + 6 + 4 + 0 + 0 0 0 0