summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/crt0.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S
index a0ff26684e..f2d4c81ddc 100644
--- a/firmware/crt0.S
+++ b/firmware/crt0.S
@@ -30,7 +30,6 @@ start:
30 clrsr ie 30 clrsr ie
31 clrsr te 31 clrsr te
32 ld a14, #0x3F0000 32 ld a14, #0x3F0000
33 ;; copy data section from flash to ram.
34 33
35 ld r5, 0xA5 34 ld r5, 0xA5
36 ldb @[a14 + 6], r5 ; disable watchdog 35 ldb @[a14 + 6], r5 ; disable watchdog
@@ -38,6 +37,7 @@ start:
38 ld a11, #(_datacopy) ; where the data section is in the flash 37 ld a11, #(_datacopy) ; where the data section is in the flash
39 ld a8, #(_datastart) ; destination 38 ld a8, #(_datastart) ; destination
40 39
40 ;; copy data section from flash to ram.
41 ld a9, #_datasize 41 ld a9, #_datasize
42 ld r6, e9 42 ld r6, e9
43 cmp eq, r6, #0 43 cmp eq, r6, #0
@@ -57,6 +57,7 @@ start:
57 brt .data_copy_loop 57 brt .data_copy_loop
58.data_copy_end: 58.data_copy_end:
59 59
60 ;; zero out bss
60 ld r2, #0 61 ld r2, #0
61 ld a8, #(_bssstart) ; destination 62 ld a8, #(_bssstart) ; destination
62 ld a9, #_bsssize 63 ld a9, #_bsssize
@@ -76,7 +77,8 @@ start:
76 cmp ugt, r9, #0 77 cmp ugt, r9, #0
77 brt .bss_init_loop 78 brt .bss_init_loop
78.bss_init_end: 79.bss_init_end:
79 80
81 ;; set stack pointer
80 ld a15, _stackend 82 ld a15, _stackend
81 83
82 ;; go! 84 ;; go!