summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwuyangyong <[email protected]>2012-05-31 18:19:25 +0000
committerwuyangyong <[email protected]>2012-05-31 18:19:25 +0000
commitb862d16f3fc1baa5a6530012953caf13d6571509 (patch)
tree244cb85092020bd11cb884317d9fb3a5546fab75
parent1e0724de7bf3b3fe28c62d9d3d035ad9501e52b4 (diff)
optimize for size.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2144 bbd45198-f89e-11dd-88c7-29a3b14d5316
-rw-r--r--bsp/stm32f0x/Libraries/CMSIS/ST/STM32F0xx/Source/Templates/arm/startup_stm32f0xx.s4
-rw-r--r--bsp/stm32f0x/applications/application.c2
-rw-r--r--bsp/stm32f0x/applications/startup.c2
-rw-r--r--bsp/stm32f0x/project.uvproj8
-rw-r--r--bsp/stm32f0x/rtconfig.h6
-rw-r--r--bsp/stm32f0x/template.uvproj8
6 files changed, 15 insertions, 15 deletions
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 ac95092e76..ae507e0866 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 @@
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
-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
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
-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 80cbffcb16..2a64276d20 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 d5b7fe2eab..81acb40131 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 3869fcfaed..152e59793b 100644
--- a/bsp/stm32f0x/project.uvproj
+++ b/bsp/stm32f0x/project.uvproj
@@ -210,13 +210,13 @@
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
- <useUlib>0</useUlib>
+ <useUlib>1</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<RoSelD>3</RoSelD>
<RwSelD>3</RwSelD>
<CodeSel>0</CodeSel>
- <OptFeed>0</OptFeed>
+ <OptFeed>1</OptFeed>
<NoZi1>0</NoZi1>
<NoZi2>0</NoZi2>
<NoZi3>0</NoZi3>
@@ -333,10 +333,10 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
- <Optim>1</Optim>
+ <Optim>4</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
- <OneElfS>0</OneElfS>
+ <OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
diff --git a/bsp/stm32f0x/rtconfig.h b/bsp/stm32f0x/rtconfig.h
index 925092c668..5739beea1a 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 ceb1882e2e..a77283255e 100644
--- a/bsp/stm32f0x/template.uvproj
+++ b/bsp/stm32f0x/template.uvproj
@@ -210,13 +210,13 @@
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
- <useUlib>0</useUlib>
+ <useUlib>1</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<RoSelD>3</RoSelD>
<RwSelD>3</RwSelD>
<CodeSel>0</CodeSel>
- <OptFeed>0</OptFeed>
+ <OptFeed>1</OptFeed>
<NoZi1>0</NoZi1>
<NoZi2>0</NoZi2>
<NoZi3>0</NoZi3>
@@ -333,10 +333,10 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
- <Optim>1</Optim>
+ <Optim>4</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
- <OneElfS>0</OneElfS>
+ <OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>