Skip to content

Commit

Permalink
CI: Replace MicroPython hack.
Browse files Browse the repository at this point in the history
The hack to disable C++ exceptions and avoid a bloated explody build has been
moved to the USER_C_MODULES cmake files so that it's included implicitly.
  • Loading branch information
Gadgetoid committed Jul 17, 2024
1 parent b876036 commit 674f744
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/micropython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,11 @@ jobs:
run: |
git apply "${{env.FIRMWARE_DIR}}/startup_overclock.patch"
- name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch"
- name: "HACK: MicroPython out of tree board pins.csv fix"
shell: bash
working-directory: micropython
run: |
git apply "${{env.FIRMWARE_DIR}}/932f76c6ba64c5a3e68de3324556d9979f09303b.patch"
git apply "${{env.FIRMWARE_DIR}}/micropython_nano_specs.patch"
# Install apt packages
- name: Install CCache & Compiler
Expand Down
11 changes: 11 additions & 0 deletions firmware/PIMORONI_BADGER2040/micropython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ include(motor/micropython)

# version.py and pimoroni.py
include(modules_py/modules_py)

# TODO: Use `include(micropython-disable-exceptions)`
# 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)
11 changes: 11 additions & 0 deletions firmware/PIMORONI_BADGER2040W/micropython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ include(motor/micropython)

# version.py, pimoroni.py and boot.py
include(modules_py/modules_py)

# TODO: Use `include(micropython-disable-exceptions)`
# 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)
21 changes: 0 additions & 21 deletions firmware/micropython_nano_specs.patch

This file was deleted.

0 comments on commit 674f744

Please sign in to comment.