Skip to content

Commit 99a0c6f

Browse files
Fix GDBstub linkage options
GDB works with pure GNU GCC and pure GNU binutils now. Still warnings galore, but tested with the example sketch in the docs.
1 parent 354cfcd commit 99a0c6f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libraries/GDBStub/src/internal/gdbstub.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ void ATTR_GDBINIT gdbstub_set_uart_isr_callback(void (*func)(void*, uint8_t), vo
900900

901901

902902
//gdbstub initialization routine.
903-
void ATTR_GDBINIT gdbstub_init() {
903+
void gdbstub_init() {
904904
#if GDBSTUB_REDIRECT_CONSOLE_OUTPUT
905905
os_install_putc1(gdbstub_semihost_putchar1);
906906
#endif
@@ -923,4 +923,4 @@ bool ATTR_GDBEXTERNFN gdb_present() {
923923
}
924924

925925
void ATTR_GDBFN gdb_do_break() { gdbstub_do_break(); }
926-
void ATTR_GDBINIT gdb_init() __attribute__((alias("gdbstub_init")));
926+
void gdb_init() __attribute__(( alias("gdbstub_init") ));

tools/sdk/ld/eagle.app.v6.common.ld.h

+2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ SECTIONS
129129

130130
*(.text.app_entry*) /* The main startup code */
131131

132+
*(.text.gdbstub*, .text.gdb_init) /* Any GDB hooks */
133+
132134
/* all functional callers are placed in IRAM (including SPI/IRQ callbacks/etc) here */
133135
*(.text._ZNKSt8functionIF*EE*) /* std::function<any(...)>::operator()() const */
134136
} >iram1_0_seg :iram1_0_phdr

0 commit comments

Comments
 (0)