Closed penfold42 closed 1 year ago
I regret to say that the Binutils in these distributions are too old. I have modified the .asm files so they are assembled by older GNU assemblers, however, then it still fails on the linker script.
If I simplify the linker script as follows, it works:
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:4)
MEMORY
{
rom (rx) : ORIGIN = 0, LENGTH = 8192
sram (rw!x) : ORIGIN = 0x800100, LENGTH = 1024
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 512
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
lock (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = 1K
mmcu (rw!x) : ORIGIN = 0x860000, LENGTH = 1K
}
SECTIONS
{
. = 0x0000;
.text 0x0000 : { *(.text) } > rom
.data 0x0e00 : { *(.data) } > rom
.wavetable 0x1000 : { *(.wavetable) } > rom
.bss 0x800100 : { *(.bss) } > sram
.mmcu 0x860000 : { *(.mmcu) } > mmcu
}
(Tested on CentOS 7.)
However, I am not sure whether I should commit this simplification, the formula to calculate the region length is there with a reason.
Thanks! on my ubuntu box it builds fine with the small change you committed.
2.26.20160125 is the same version that microchip are distributing at https://www.microchip.com/en-us/tools-resources/develop/microchip-studio/gcc-compilers
I pulled their tar.gz down and not surprisingly this works fine too on both ubuntu and centos7
FWIW (and I know nothing about linker scripts!) Given its a quick download to get it to work on CentOS7, I'd leave the .ld file alone
Hi there,
I'm getting the same error on both: CentOS7 with avr-ar --version GNU ar (GNU Binutils) 2.24
Ubuntu 20.04.5 LTS with avr-as --version GNU assembler (GNU Binutils) 2.26.20160125
What have I missed ?