2023-05-04 11:03:08 +00:00
|
|
|
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
|
2024-03-30 20:04:27 +00:00
|
|
|
index fcc435b7b..efabcb3a3 100644
|
2023-05-04 11:03:08 +00:00
|
|
|
--- a/ports/rp2/CMakeLists.txt
|
|
|
|
+++ b/ports/rp2/CMakeLists.txt
|
2024-03-30 20:04:27 +00:00
|
|
|
@@ -464,6 +464,16 @@ set_source_files_properties(
|
|
|
|
COMPILE_OPTIONS "-O2"
|
2023-05-04 11:03:08 +00:00
|
|
|
)
|
2024-01-08 10:06:14 +00:00
|
|
|
|
2023-05-04 11:03:08 +00:00
|
|
|
+# 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>:
|
|
|
|
+ -fno-exceptions
|
|
|
|
+ -fno-unwind-tables
|
|
|
|
+ -fno-rtti
|
|
|
|
+ -fno-use-cxa-atexit
|
|
|
|
+>)
|
|
|
|
+target_link_options(usermod INTERFACE -specs=nano.specs)
|
2024-01-08 10:06:14 +00:00
|
|
|
+
|
2023-05-04 11:03:08 +00:00
|
|
|
set_source_files_properties(
|
|
|
|
${PICO_SDK_PATH}/src/rp2_common/pico_double/double_math.c
|
2024-01-08 10:06:14 +00:00
|
|
|
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_math.c
|