-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
I added a separate section to the linker script for an external EEPROM. With this I am able to create a hex file with objcopy which can be used to fill this external EEPROM. But the elf2uf2 tool fails with the following error:
[build] ERROR: Memory segment 00000000->00000050 is outside of valid address range for device
The related parts of the linker script looks as follows:
MEMORY
{
/* Flash starts at offset 64K (size for bootloader) */
FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 1856k /* without bootloader! */
/* FLASH(rx) : ORIGIN = 0x10010000, LENGTH = 1856k*/ /* with bootloader! */
FLASH2(rx) : ORIGIN = 0x101E0000, LENGTH = 128k
/* RAM reduced by 4 bytes (to ensure those 4 bytes are not overwritten) */
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 262140
SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k
SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k
EEMEM(r) : ORIGIN = 0x00000000, LENGTH = 32k
}
SECTIONS
{
...
.eeprom : {
*(.eeprom)
} > EEMEM
...
}
The same applies if I use other start address for EEMEM. I haven't found any solution to exclude EEMEM for elf2uf2. As you can see in the linker script, I have also divided the flash into two areas as I need to place data at a specific location (FLASH2) which seems to be included without any problem (which is OK).
Metadata
Metadata
Assignees
Labels
No labels