Skip to content

Commit c47bc17

Browse files
committed
Add UseMicroLIB option for exported project
1 parent 8f8e5e8 commit c47bc17

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_MICRO/startup_stm32f10x_md.s

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,17 @@
3333
Stack_Size EQU 0x00000400
3434

3535
AREA STACK, NOINIT, READWRITE, ALIGN=3
36-
EXPORT __initial_sp
37-
3836
Stack_Mem SPACE Stack_Size
39-
4037
__initial_sp EQU 0x20005000 ; Top of RAM
4138

4239

4340
; <h> Heap Configuration
4441
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
4542
; </h>
4643

47-
Heap_Size EQU 0x00000000
44+
Heap_Size EQU 0x00000200
4845

4946
AREA HEAP, NOINIT, READWRITE, ALIGN=3
50-
EXPORT __heap_base
51-
EXPORT __heap_limit
52-
5347
__heap_base
5448
Heap_Mem SPACE Heap_Size
5549
__heap_limit
@@ -285,28 +279,28 @@ USBWakeUp_IRQHandler
285279
;*******************************************************************************
286280
; User Stack and Heap initialization
287281
;*******************************************************************************
288-
;IF :DEF:__MICROLIB
282+
IF :DEF:__MICROLIB
289283
290-
;EXPORT __initial_sp
291-
;EXPORT __heap_base
292-
;EXPORT __heap_limit
284+
EXPORT __initial_sp
285+
EXPORT __heap_base
286+
EXPORT __heap_limit
293287
294-
;ELSE
288+
ELSE
295289
296-
;IMPORT __use_two_region_memory
297-
;EXPORT __user_initial_stackheap
290+
IMPORT __use_two_region_memory
291+
EXPORT __user_initial_stackheap
298292
299-
;__user_initial_stackheap
293+
__user_initial_stackheap
300294

301-
;LDR R0, = Heap_Mem
302-
;LDR R1, =(Stack_Mem + Stack_Size)
303-
;LDR R2, = (Heap_Mem + Heap_Size)
304-
;LDR R3, = Stack_Mem
305-
;BX LR
295+
LDR R0, = Heap_Mem
296+
LDR R1, =(Stack_Mem + Stack_Size)
297+
LDR R2, = (Heap_Mem + Heap_Size)
298+
LDR R3, = Stack_Mem
299+
BX LR
306300

307-
;ALIGN
301+
ALIGN
308302

309-
;ENDIF
303+
ENDIF
310304

311305
END
312306

libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_STD/startup_stm32f10x_md.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Stack_Size EQU 0x00000400
3434

3535
AREA STACK, NOINIT, READWRITE, ALIGN=3
3636
Stack_Mem SPACE Stack_Size
37-
__initial_sp EQU 0x20005000
37+
__initial_sp EQU 0x20005000 ; Top of RAM
3838

3939

4040
; <h> Heap Configuration

workspace_tools/export/uvision4_nucleo_f103rb.uvproj.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
<hadIRAM2>0</hadIRAM2>
213213
<hadIROM2>0</hadIROM2>
214214
<StupSel>8</StupSel>
215-
<useUlib>0</useUlib>
215+
<useUlib>1</useUlib>
216216
<EndSel>0</EndSel>
217217
<uLtcg>0</uLtcg>
218218
<RoSelD>3</RoSelD>

0 commit comments

Comments
 (0)