mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-10 11:29:38 +00:00
Clear BSS at startup
This commit is contained in:
parent
03293b60ad
commit
ae70d57d75
11
src/start.S
11
src/start.S
@ -128,6 +128,17 @@ _begin:
|
|||||||
#endif
|
#endif
|
||||||
msr CPSR_c, #(SYS_MODE)
|
msr CPSR_c, #(SYS_MODE)
|
||||||
|
|
||||||
|
/* Clear BSS */
|
||||||
|
clear_bss:
|
||||||
|
ldr r0, _bss_start /* find start of bss segment */
|
||||||
|
ldr r1, _bss_end /* stop here */
|
||||||
|
mov r2, #0x00000000 /* clear */
|
||||||
|
clbss_l:
|
||||||
|
str r2, [r0] /* clear loop... */
|
||||||
|
add r0, r0, #4
|
||||||
|
cmp r0, r1
|
||||||
|
blt clbss_l
|
||||||
|
|
||||||
b main
|
b main
|
||||||
|
|
||||||
// ldr r1,=_system_stack
|
// ldr r1,=_system_stack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user