Forráskód Böngészése

optimize for size.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2144 bbd45198-f89e-11dd-88c7-29a3b14d5316
wuyangyong 13 éve
szülő
commit
b862d16f3f

+ 2 - 2
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

+ 1 - 1
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)

+ 2 - 0
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();

+ 4 - 4
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>

+ 2 - 4
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

+ 4 - 4
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>