Skip to content

Commit

Permalink
Support PIO Wl-T and Arduino -T linking properly (#6095)
Browse files Browse the repository at this point in the history
The interrupt vectors in IRAM are omitted when there is a PROVIDE
statement in the linker control files when using the PIO method of
-Wl,-T<linkfile>.

Drop the PROVIDES (they're in RAM anyway and not ROM related), and
add the required "-u"s to the PIO build script.

Should have no impact on the Arduino side.

Fixes #6087
  • Loading branch information
earlephilhower authored May 18, 2019
1 parent 968d6fc commit 48fc8af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 6 additions & 1 deletion tools/platformio-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ def scons_patched_match_splitext(path, suffixes=None):
"-Wl,-wrap,spi_flash_read",
"-u", "app_entry",
"-u", "_printf_float",
"-u", "_scanf_float"
"-u", "_scanf_float",
"-u", "_DebugExceptionVector",
"-u", "_DoubleExceptionVector",
"-u", "_KernelExceptionVector",
"-u", "_NMIExceptionVector",
"-u", "_UserExceptionVector"
],

CPPDEFINES=[
Expand Down
5 changes: 0 additions & 5 deletions tools/sdk/ld/eagle.rom.addr.v6.ld
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ PROVIDE ( UartRegReadProc = 0x4000381c );
PROVIDE ( UartRegWriteProc = 0x400037ac );
PROVIDE ( UartRxString = 0x40003c30 );
PROVIDE ( Uart_Init = 0x40003a14 );
PROVIDE ( _DebugExceptionVector = 0x40000010 );
PROVIDE ( _DoubleExceptionVector = 0x40000070 );
PROVIDE ( _KernelExceptionVector = 0x40000030 );
PROVIDE ( _NMIExceptionVector = 0x40000020 );
PROVIDE ( _ResetHandler = 0x400000a4 );
PROVIDE ( _ResetVector = 0x40000080 );
PROVIDE ( _UserExceptionVector = 0x40000050 );
PROVIDE ( __adddf3 = 0x4000c538 );
PROVIDE ( __addsf3 = 0x4000c180 );
PROVIDE ( __divdf3 = 0x4000cb94 );
Expand Down

0 comments on commit 48fc8af

Please sign in to comment.