diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2023-12-12 11:29:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-12-12 11:29:16 +0000 |
commit | 0804d18a023575ec65e5139703f600fcb0391c89 (patch) | |
tree | b6d825e15705fd8dd58fe35fb2babb9d794d2213 /ld/emulparams | |
parent | 14f2724f80b156928b1a0b0f9733350558e35e63 (diff) | |
download | gdb-0804d18a023575ec65e5139703f600fcb0391c89.zip gdb-0804d18a023575ec65e5139703f600fcb0391c89.tar.gz gdb-0804d18a023575ec65e5139703f600fcb0391c89.tar.bz2 |
Support rodata in flash for more AVR devices
PR 31124
* Makefile.am (ALL_EMULATION_SOURCES): Add eavrxmega2_flmap.c and eavrxmega4_flmap.c.
* Makefile.in: Regenerate.
* configure.tgt: Add eavrxmega2_flmap and eavrxmega4_flmap to avr's targ_extra_emuls list.
* emulparams/avrxmega2.sh (MAYBE_FLMAP): Define.
* emulparams/avrxmega2_flmap.sh: New file.
* emulparams/avrxmega4.sh (MAYBE_FLMAP): Define.
* emulparams/avrxmega4_flmap.sh: New file.
* scripttempl/avr.sc: Add support for HAVE_FLMAP.
Diffstat (limited to 'ld/emulparams')
-rw-r--r-- | ld/emulparams/avrxmega2.sh | 2 | ||||
-rw-r--r-- | ld/emulparams/avrxmega2_flmap.sh | 31 | ||||
-rw-r--r-- | ld/emulparams/avrxmega4.sh | 2 | ||||
-rw-r--r-- | ld/emulparams/avrxmega4_flmap.sh | 31 |
4 files changed, 66 insertions, 0 deletions
diff --git a/ld/emulparams/avrxmega2.sh b/ld/emulparams/avrxmega2.sh index 3f3d865..d8c7e19 100644 --- a/ld/emulparams/avrxmega2.sh +++ b/ld/emulparams/avrxmega2.sh @@ -18,3 +18,5 @@ FUSE_LENGTH=1K LOCK_LENGTH=1K SIGNATURE_LENGTH=1K USER_SIGNATURE_LENGTH=1K + +MAYBE_FLMAP=1 diff --git a/ld/emulparams/avrxmega2_flmap.sh b/ld/emulparams/avrxmega2_flmap.sh new file mode 100644 index 0000000..1e5adbe --- /dev/null +++ b/ld/emulparams/avrxmega2_flmap.sh @@ -0,0 +1,31 @@ +ARCH=avr:102 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf + +TEXT_LENGTH=1024K +DATA_ORIGIN=0x802000 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf + +FUSE_NAME=fuse + +EEPROM_LENGTH=64K +FUSE_LENGTH=1K +LOCK_LENGTH=1K +SIGNATURE_LENGTH=1K +USER_SIGNATURE_LENGTH=1K + +MAYBE_FLMAP=1 + +# Above is a copy of the contents of avrxmega2.sh + +HAVE_FLMAP=1 +RODATA_VMA=0xa00000 +RODATA_LENGTH=32K +RODATA_LDS_OFFSET=0x8000 +RODATA_FLASH_START=32K +FLMAP_MASK=0x1 diff --git a/ld/emulparams/avrxmega4.sh b/ld/emulparams/avrxmega4.sh index d7b3771..787e516 100644 --- a/ld/emulparams/avrxmega4.sh +++ b/ld/emulparams/avrxmega4.sh @@ -18,3 +18,5 @@ FUSE_LENGTH=1K LOCK_LENGTH=1K SIGNATURE_LENGTH=1K USER_SIGNATURE_LENGTH=1K + +MAYBE_FLMAP=1 diff --git a/ld/emulparams/avrxmega4_flmap.sh b/ld/emulparams/avrxmega4_flmap.sh new file mode 100644 index 0000000..c2f6b9c --- /dev/null +++ b/ld/emulparams/avrxmega4_flmap.sh @@ -0,0 +1,31 @@ +ARCH=avr:104 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf + +TEXT_LENGTH=1024K +DATA_ORIGIN=0x802000 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf + +FUSE_NAME=fuse + +EEPROM_LENGTH=64K +FUSE_LENGTH=1K +LOCK_LENGTH=1K +SIGNATURE_LENGTH=1K +USER_SIGNATURE_LENGTH=1K + +MAYBE_FLMAP=1 + +# Above is a copy of the contents of avrxmega4.sh + +HAVE_FLMAP=1 +RODATA_VMA=0xa00000 +RODATA_LENGTH=32K +RODATA_LDS_OFFSET=0x8000 +RODATA_FLASH_START=96K +FLMAP_MASK=0x3 |