Skip to content

Commit 702f64a

Browse files
committed
STM32F0xx: GCC_ARM remove zero bss, in startup.
zero bss is done in libc init after call to _start.
1 parent 9f20c46 commit 702f64a

File tree

7 files changed

+1
-119
lines changed

7 files changed

+1
-119
lines changed

targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/TOOLCHAIN_GCC_ARM/startup_stm32f051x8.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_STM32F0/TARGET_NUCLEO_F030R8/device/TOOLCHAIN_GCC_ARM/startup_stm32f030x8.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_STM32F0/TARGET_NUCLEO_F031K6/device/TOOLCHAIN_GCC_ARM/startup_stm32f031x6.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_STM32F0/TARGET_NUCLEO_F042K6/device/TOOLCHAIN_GCC_ARM/startup_stm32f042x6.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
/**
6460
* @brief This is the code that gets called when the processor first
@@ -115,19 +111,6 @@ LoopCopyDataInit:
115111
adds r2, r0, r1
116112
cmp r2, r3
117113
bcc CopyDataInit
118-
ldr r2, =_sbss
119-
b LoopFillZerobss
120-
/* Zero fill the bss segment. */
121-
FillZerobss:
122-
movs r3, #0
123-
str r3, [r2]
124-
adds r2, r2, #4
125-
126-
127-
LoopFillZerobss:
128-
ldr r3, = _ebss
129-
cmp r2, r3
130-
bcc FillZerobss
131114

132115
/* Call the clock system intitialization function.*/
133116
bl SystemInit

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/TOOLCHAIN_GCC_ARM/startup_stm32f070xb.S

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ 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
58+
6259

6360
.section .text.Reset_Handler
6461
.weak Reset_Handler
@@ -83,19 +80,6 @@ LoopCopyDataInit:
8380
adds r2, r0, r1
8481
cmp r2, r3
8582
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
9983

10084
/* Call the clock system intitialization function.*/
10185
bl SystemInit

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/TOOLCHAIN_GCC_ARM/startup_stm32f072xb.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_STM32F0/TARGET_NUCLEO_F091RC/device/TOOLCHAIN_GCC_ARM/startup_stm32f091xc.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)