aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/avr.ld
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2020-03-09 16:26:20 +0100
committerRon Evans <[email protected]>2020-03-17 14:46:56 +0100
commit5bace979ea6cee3fc64675d7ad6212547c38e7ce (patch)
treeccdf270a81ea3394b559031c3c045e012b447ca1 /targets/avr.ld
parent63cfb09e9efd2bab72d31efca1f06cc5cd0c220b (diff)
downloadtinygo-5bace979ea6cee3fc64675d7ad6212547c38e7ce.tar.gz
tinygo-5bace979ea6cee3fc64675d7ad6212547c38e7ce.zip
avr: use the correct RAM start address
Previously, the RAM was set to start at address 0. This is incorrect: on AVR, the first few addresses are taken up by memory-mapped I/O. The reason this didn't lead to problems (yet) was because the stack was usually big enough to avoid real problems.
Diffstat (limited to 'targets/avr.ld')
-rw-r--r--targets/avr.ld4
1 files changed, 2 insertions, 2 deletions
diff --git a/targets/avr.ld b/targets/avr.ld
index 0a92e5f3c..7e45b533c 100644
--- a/targets/avr.ld
+++ b/targets/avr.ld
@@ -1,8 +1,8 @@
MEMORY
{
- FLASH_TEXT (rw) : ORIGIN = 0, LENGTH = __flash_size - _bootloader_size
- RAM (xrw) : ORIGIN = 0, LENGTH = __ram_size
+ FLASH_TEXT (rw) : ORIGIN = 0, LENGTH = __flash_size - _bootloader_size
+ RAM (xrw) : ORIGIN = __ram_start, LENGTH = __ram_size
}
SECTIONS