Skip to content

Commit

Permalink
Specify a unloadable .unint memory region
Browse files Browse the repository at this point in the history
RTIC uses an .unint section for late resources. When the teensy4-rt
doesn't explicitly place this section, the linker is still putting
it somewhere. This causes the Teensy CLI loader to throw an arbitrary
"error reading intel hex file" error. It looks like there's a third
section in the output HEX file, which isn't expected by the CLI
loader.

In any case, see the next commit for a working example.
  • Loading branch information
mciantyre committed Jun 29, 2020
1 parent f612922 commit 6f3fa5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions teensy4-rt/link.x
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ SECTIONS
*(.ARM.extab.*);
}

.uninit (NOLOAD) :
{
*(.uninit .uninit.*);
. = ALIGN(16);
} > DTCM

/* The length of flash is required for the boot data */
_lflash = SIZEOF(.boot) + SIZEOF(.text) + SIZEOF(.data);

Expand Down

0 comments on commit 6f3fa5c

Please # to comment.