kopia lustrzana https://github.com/micropython/micropython
ports/rp2: Use nano.specs for C++ modules.
Remove C++ stack unwinding and exception handling in all cases. Set options as per https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_cxx_options/CMakeLists.txt Save around 10,880 bytes of RAM. Signed-off-by: Phil Howard <phil@gadgetoid.com>pull/11143/head
rodzic
294baf52b3
commit
b7a897827f
|
@ -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}
|
||||
)
|
||||
# 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)
|
||||
|
||||
set_source_files_properties(
|
||||
${PICO_SDK_PATH}/src/rp2_common/pico_double/double_math.c
|
||||
|
|
Ładowanie…
Reference in New Issue