Skip to content

Commit 48fc8af

Browse files
Support PIO Wl-T and Arduino -T linking properly (#6095)
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
1 parent 968d6fc commit 48fc8af

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tools/platformio-build.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ def scons_patched_match_splitext(path, suffixes=None):
8989
"-Wl,-wrap,spi_flash_read",
9090
"-u", "app_entry",
9191
"-u", "_printf_float",
92-
"-u", "_scanf_float"
92+
"-u", "_scanf_float",
93+
"-u", "_DebugExceptionVector",
94+
"-u", "_DoubleExceptionVector",
95+
"-u", "_KernelExceptionVector",
96+
"-u", "_NMIExceptionVector",
97+
"-u", "_UserExceptionVector"
9398
],
9499

95100
CPPDEFINES=[

tools/sdk/ld/eagle.rom.addr.v6.ld

-5
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,8 @@ PROVIDE ( UartRegReadProc = 0x4000381c );
4141
PROVIDE ( UartRegWriteProc = 0x400037ac );
4242
PROVIDE ( UartRxString = 0x40003c30 );
4343
PROVIDE ( Uart_Init = 0x40003a14 );
44-
PROVIDE ( _DebugExceptionVector = 0x40000010 );
45-
PROVIDE ( _DoubleExceptionVector = 0x40000070 );
46-
PROVIDE ( _KernelExceptionVector = 0x40000030 );
47-
PROVIDE ( _NMIExceptionVector = 0x40000020 );
4844
PROVIDE ( _ResetHandler = 0x400000a4 );
4945
PROVIDE ( _ResetVector = 0x40000080 );
50-
PROVIDE ( _UserExceptionVector = 0x40000050 );
5146
PROVIDE ( __adddf3 = 0x4000c538 );
5247
PROVIDE ( __addsf3 = 0x4000c180 );
5348
PROVIDE ( __divdf3 = 0x4000cb94 );

0 commit comments

Comments
 (0)