Skip to content

Commit

Permalink
CI: Update exception handling patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Mar 12, 2024
1 parent bb97193 commit 5653a7e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions firmware/micropython_nano_specs.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index 094031c6852a..5f268414c08f 100644
index 281b0c3bc..7e04bb549 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -374,6 +374,15 @@ target_compile_options(${MICROPY_TARGET} PRIVATE
target_link_options(${MICROPY_TARGET} PRIVATE
-Wl,--defsym=__micropy_c_heap_size__=${MICROPY_C_HEAP_SIZE}
@@ -453,6 +453,16 @@ target_link_options(${MICROPY_TARGET} PRIVATE
-Wl,--wrap=dcd_event_handler
)

+# Do not include stack unwinding & exception handling for C++ user modules
+target_compile_definitions(usermod INTERFACE PICO_CXX_ENABLE_EXCEPTIONS=0)
+target_compile_options(usermod INTERFACE $<$<COMPILE_LANGUAGE:CXX>:
Expand All @@ -15,6 +15,7 @@ index 094031c6852a..5f268414c08f 100644
+ -fno-use-cxa-atexit
+>)
+target_link_options(usermod INTERFACE -specs=nano.specs)

+
set_source_files_properties(
${PICO_SDK_PATH}/src/rp2_common/pico_double/double_math.c
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_math.c

0 comments on commit 5653a7e

Please sign in to comment.