Skip to content

Commit af090e3

Browse files
committed
STM32L0xx : GCC_ARM remove zero bss, in startup.
zero bss is done in libc init after call to _start.
1 parent 479a1a2 commit af090e3

File tree

5 files changed

+2
-87
lines changed

5 files changed

+2
-87
lines changed

targets/TARGET_STM/TARGET_STM32L0/TARGET_DISCO_L053C8/device/TOOLCHAIN_GCC_ARM/startup_stm32l053xx.S

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ defined in linker script */
5555
.word _sdata
5656
/* end address for the .data section. defined in linker script */
5757
.word _edata
58-
/* start address for the .bss section. defined in linker script */
59-
.word _sbss
60-
/* end address for the .bss section. defined in linker script */
61-
.word _ebss
6258

6359
.section .text.Reset_Handler
6460
.weak Reset_Handler
@@ -83,19 +79,6 @@ LoopCopyDataInit:
8379
adds r2, r0, r1
8480
cmp r2, r3
8581
bcc CopyDataInit
86-
ldr r2, =_sbss
87-
b LoopFillZerobss
88-
/* Zero fill the bss segment. */
89-
FillZerobss:
90-
movs r3, #0
91-
str r3, [r2]
92-
adds r2, r2, #4
93-
94-
95-
LoopFillZerobss:
96-
ldr r3, = _ebss
97-
cmp r2, r3
98-
bcc FillZerobss
9982

10083
/* Call the clock system intitialization function.*/
10184
bl SystemInit

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L011K4/device/TOOLCHAIN_GCC_ARM/startup_stm32l011xx.s

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ defined in linker script */
5555
.word _sdata
5656
/* end address for the .data section. defined in linker script */
5757
.word _edata
58-
/* start address for the .bss section. defined in linker script */
59-
.word _sbss
60-
/* end address for the .bss section. defined in linker script */
61-
.word _ebss
6258

6359
.section .text.Reset_Handler
6460
.weak Reset_Handler
@@ -83,19 +79,6 @@ LoopCopyDataInit:
8379
adds r2, r0, r1
8480
cmp r2, r3
8581
bcc CopyDataInit
86-
ldr r2, =_sbss
87-
b LoopFillZerobss
88-
/* Zero fill the bss segment. */
89-
FillZerobss:
90-
movs r3, #0
91-
str r3, [r2]
92-
adds r2, r2, #4
93-
94-
95-
LoopFillZerobss:
96-
ldr r3, = _ebss
97-
cmp r2, r3
98-
bcc FillZerobss
9982

10083
/* Call the clock system intitialization function.*/
10184
bl SystemInit

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L031K6/device/TOOLCHAIN_GCC_ARM/startup_stm32l031xx.S

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ defined in linker script */
5555
.word _sdata
5656
/* end address for the .data section. defined in linker script */
5757
.word _edata
58-
/* start address for the .bss section. defined in linker script */
59-
.word _sbss
60-
/* end address for the .bss section. defined in linker script */
61-
.word _ebss
6258

6359
.section .text.Reset_Handler
6460
.weak Reset_Handler
@@ -83,20 +79,7 @@ LoopCopyDataInit:
8379
adds r2, r0, r1
8480
cmp r2, r3
8581
bcc CopyDataInit
86-
ldr r2, =_sbss
87-
b LoopFillZerobss
88-
/* Zero fill the bss segment. */
89-
FillZerobss:
90-
movs r3, #0
91-
str r3, [r2]
92-
adds r2, r2, #4
93-
94-
95-
LoopFillZerobss:
96-
ldr r3, = _ebss
97-
cmp r2, r3
98-
bcc FillZerobss
99-
82+
10083
/* Call the clock system intitialization function.*/
10184
bl SystemInit
10285
/* Call static constructors */

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L053R8/device/TOOLCHAIN_GCC_ARM/startup_stm32l053xx.S

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ defined in linker script */
5555
.word _sdata
5656
/* end address for the .data section. defined in linker script */
5757
.word _edata
58-
/* start address for the .bss section. defined in linker script */
59-
.word _sbss
60-
/* end address for the .bss section. defined in linker script */
61-
.word _ebss
6258

6359
.section .text.Reset_Handler
6460
.weak Reset_Handler
@@ -83,20 +79,7 @@ LoopCopyDataInit:
8379
adds r2, r0, r1
8480
cmp r2, r3
8581
bcc CopyDataInit
86-
ldr r2, =_sbss
87-
b LoopFillZerobss
88-
/* Zero fill the bss segment. */
89-
FillZerobss:
90-
movs r3, #0
91-
str r3, [r2]
92-
adds r2, r2, #4
93-
94-
95-
LoopFillZerobss:
96-
ldr r3, = _ebss
97-
cmp r2, r3
98-
bcc FillZerobss
99-
82+
10083
/* Call the clock system intitialization function.*/
10184
bl SystemInit
10285
/* Call static constructors */

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/device/TOOLCHAIN_GCC_ARM/startup_stm32l073xx.S

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ defined in linker script */
5555
.word _sdata
5656
/* end address for the .data section. defined in linker script */
5757
.word _edata
58-
/* start address for the .bss section. defined in linker script */
59-
.word _sbss
60-
/* end address for the .bss section. defined in linker script */
61-
.word _ebss
6258

6359
.section .text.Reset_Handler
6460
.weak Reset_Handler
@@ -83,19 +79,6 @@ LoopCopyDataInit:
8379
adds r2, r0, r1
8480
cmp r2, r3
8581
bcc CopyDataInit
86-
ldr r2, =_sbss
87-
b LoopFillZerobss
88-
/* Zero fill the bss segment. */
89-
FillZerobss:
90-
movs r3, #0
91-
str r3, [r2]
92-
adds r2, r2, #4
93-
94-
95-
LoopFillZerobss:
96-
ldr r3, = _ebss
97-
cmp r2, r3
98-
bcc FillZerobss
9982

10083
/* Call the clock system intitialization function.*/
10184
bl SystemInit

0 commit comments

Comments
 (0)