avr: fix corrupted .data byte

The stack and the .data section shared the first byte, leading to
corruption of the first byte of .data.
This commit is contained in:
Ayke van Laethem
2018-09-17 15:10:52 +02:00
parent fc0ff3a987
commit 77934f364f
+3
View File
@@ -17,6 +17,9 @@ reset:
out 0x3d, xl; SPL
out 0x3e, xh; SPH
; Add one to the stack pointer, so it doesn't point in the .data section.
push r0
; Initialize .data
init_data:
ldi xl, lo8(_sdata)