mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
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:
@@ -17,6 +17,9 @@ reset:
|
|||||||
out 0x3d, xl; SPL
|
out 0x3d, xl; SPL
|
||||||
out 0x3e, xh; SPH
|
out 0x3e, xh; SPH
|
||||||
|
|
||||||
|
; Add one to the stack pointer, so it doesn't point in the .data section.
|
||||||
|
push r0
|
||||||
|
|
||||||
; Initialize .data
|
; Initialize .data
|
||||||
init_data:
|
init_data:
|
||||||
ldi xl, lo8(_sdata)
|
ldi xl, lo8(_sdata)
|
||||||
|
|||||||
Reference in New Issue
Block a user