mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
build: Update declfuncs.lds.S to only use progmem sections on AVR
On non-avr platforms the declfunc stuff still needs to be in the binary in a rodata section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
343de9c454
commit
da305e6b61
3 changed files with 18 additions and 7 deletions
|
@ -42,7 +42,7 @@ struct callback_handler {
|
|||
};
|
||||
#define _DECL_CALLBACK(NAME, FUNC) \
|
||||
const struct callback_handler _DECL_ ## NAME ## _ ## FUNC __visible \
|
||||
__section(".progmem.data." __stringify(NAME) ) = { .func = FUNC }
|
||||
__section(".rodata." __stringify(NAME) ) = { .func = FUNC }
|
||||
|
||||
#define foreachdecl(ITER, NAME) \
|
||||
extern typeof(*ITER) NAME ## _start[], NAME ## _end[]; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue