diff --git a/bsp/stm32f0x/Libraries/CMSIS/ST/STM32F0xx/Source/Templates/arm/startup_stm32f0xx.s b/bsp/stm32f0x/Libraries/CMSIS/ST/STM32F0xx/Source/Templates/arm/startup_stm32f0xx.s index ac95092e7622829f4d833908f53dfcefe0997371..ae507e0866e75c70e2eac02645b5ebd96869151e 100644 --- a/bsp/stm32f0x/Libraries/CMSIS/ST/STM32F0xx/Source/Templates/arm/startup_stm32f0xx.s +++ b/bsp/stm32f0x/Libraries/CMSIS/ST/STM32F0xx/Source/Templates/arm/startup_stm32f0xx.s @@ -36,7 +36,7 @@ ; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Stack_Size EQU 0x00000400 +Stack_Size EQU 0x00000180 AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size @@ -47,7 +47,7 @@ __initial_sp ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000200 +Heap_Size EQU 0x00000000 AREA HEAP, NOINIT, READWRITE, ALIGN=3 __heap_base diff --git a/bsp/stm32f0x/applications/application.c b/bsp/stm32f0x/applications/application.c index 80cbffcb16946d706a47a521d48967ca12350bd1..2a64276d2067c0670c3100c022ca8067485c726e 100644 --- a/bsp/stm32f0x/applications/application.c +++ b/bsp/stm32f0x/applications/application.c @@ -46,7 +46,7 @@ static void rt_hw_led_init(void) } ALIGN(RT_ALIGN_SIZE) -static char led_stack[1024]; +static char led_stack[384]; static struct rt_thread led_thread; static void led_thread_entry(void* parameter) diff --git a/bsp/stm32f0x/applications/startup.c b/bsp/stm32f0x/applications/startup.c index d5b7fe2eab10a47c7d5337449421496175caa54a..81acb4013166e03b907e4826bd0dbba4b089ebca 100644 --- a/bsp/stm32f0x/applications/startup.c +++ b/bsp/stm32f0x/applications/startup.c @@ -86,8 +86,10 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); +#ifdef RT_USING_DEVICE /* init all device */ rt_device_init_all(); +#endif /* init application */ rt_application_init(); diff --git a/bsp/stm32f0x/project.uvproj b/bsp/stm32f0x/project.uvproj index 3869fcfaedd0f7d9779fdb0dcf4f2b4eb8143aca..152e59793b356edd887d44a7e3799e6a1d475647 100644 --- a/bsp/stm32f0x/project.uvproj +++ b/bsp/stm32f0x/project.uvproj @@ -210,13 +210,13 @@ 0 0 8 - 0 + 1 0 0 3 3 0 - 0 + 1 0 0 0 @@ -333,10 +333,10 @@ 1 - 1 + 4 0 0 - 0 + 1 0 0 0 diff --git a/bsp/stm32f0x/rtconfig.h b/bsp/stm32f0x/rtconfig.h index 925092c66877751348bca60be91ecac45923f2fa..5739beea1ae38fdb4ed5b1ae1d01bffe16bc7810 100644 --- a/bsp/stm32f0x/rtconfig.h +++ b/bsp/stm32f0x/rtconfig.h @@ -16,14 +16,12 @@ /* SECTION: RT_DEBUG */ /* Thread Debug */ - #define RT_DEBUG +/* #define RT_DEBUG */ /* #define RT_USING_OVERFLOW_CHECK */ /* Using Hook */ /* #define RT_USING_HOOK */ -#define IDLE_THREAD_STACK_SIZE 512 - /* Using Software Timer */ /* #define RT_USING_TIMER_SOFT */ #define RT_TIMER_THREAD_PRIO 4 @@ -59,7 +57,7 @@ /* SECTION: Device System */ /* Using Device System */ -#define RT_USING_DEVICE +/* #define RT_USING_DEVICE */ /* SECTION: Console options */ //#define RT_USING_CONSOLE diff --git a/bsp/stm32f0x/template.uvproj b/bsp/stm32f0x/template.uvproj index ceb1882e2e4a56526075a70cb0751b44392327cc..a77283255e0492b342d62f5588c25657e2463129 100644 --- a/bsp/stm32f0x/template.uvproj +++ b/bsp/stm32f0x/template.uvproj @@ -210,13 +210,13 @@ 0 0 8 - 0 + 1 0 0 3 3 0 - 0 + 1 0 0 0 @@ -333,10 +333,10 @@ 1 - 1 + 4 0 0 - 0 + 1 0 0 0