Skip to content

Commit

Permalink
Stub out atexit because some versions of the sdk/newlib are not corre…
Browse files Browse the repository at this point in the history
…ctly stripping it
  • Loading branch information
wickerwaka committed Jan 13, 2025
1 parent 3cd20ed commit 0aa85fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ foreach(BUILD_CONFIG 2MBit 1MBit_Clock)
hardware_pio
hardware_dma
pico_unique_id
-Wl,--wrap=atexit
)

target_compile_definitions(${TARGET} PRIVATE
Expand Down
9 changes: 6 additions & 3 deletions firmware/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
#include "system.h"


// TODO
// Change addr mask to config
//
// Dummy atexit implementation because some SDK/newlib versions don't strip
// atexit and it uses several 100bytes of RAM
int __wrap_atexit(void *)
{
return 0;
}

uint32_t rom_offset = 0;

Expand Down

0 comments on commit 0aa85fe

Please sign in to comment.