File tree Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 19
19
uses : actions/cache@v3
20
20
with :
21
21
path : ${{runner.workspace}}
22
- key : workspace-micropython-${{env.MICROPYTHON_VERSION}}-pico
22
+ key : workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs
23
23
restore-keys : |
24
- workspace-micropython-${{env.MICROPYTHON_VERSION}}-pico
24
+ workspace-micropython-${{env.MICROPYTHON_VERSION}}-nano-specs
25
25
26
26
# Check out MicroPython
27
27
- name : Checkout MicroPython
@@ -129,18 +129,24 @@ jobs:
129
129
echo "MICROPY_GIT_TAG=$MICROPYTHON_VERSION, ${{matrix.name}} ${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
130
130
echo "MICROPY_GIT_HASH=$MICROPYTHON_VERSION-${{github.event.release.tag_name || github.sha}}" >> $GITHUB_ENV
131
131
132
- - name : " HACK: Clean ports/rp2/modules" # We should move to using manifest.py to include our custom modules
132
+ - name : " HACK: Clean ports/rp2/modules and ports/rp2/CMakeLists.txt "
133
133
shell : bash
134
134
working-directory : micropython/ports/rp2
135
135
run : |
136
136
rm -rf modules
137
137
git checkout modules
138
138
139
- - name : " HACK: Revert Pico SDK Patch " # Avoid an already-patched MicroPython tree breaking our build
139
+ - name : " HACK: Revert Patches " # Avoid an already-patched MicroPython tree breaking our build
140
140
shell : bash
141
- working-directory : micropython/lib/pico-sdk
141
+ working-directory : micropython
142
142
run : |
143
- git checkout .
143
+ git checkout lib/pico-sdk
144
+ git checkout ports/rp2/CMakeLists.txt
145
+
146
+ - name : " HACK: CMakeLists.txt Disable C++ Exceptions Patch"
147
+ shell : bash
148
+ working-directory : micropython
149
+ run : git apply $GITHUB_WORKSPACE/pimoroni-pico-${{ github.sha }}/micropython/micropython_nano_specs.patch
144
150
145
151
- name : " HACK: Pico SDK Patch"
146
152
if : matrix.patch == true
Original file line number Diff line number Diff line change
1
+ diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
2
+ index 094031c6852a..5f268414c08f 100644
3
+ --- a/ports/rp2/CMakeLists.txt
4
+ +++ b/ports/rp2/CMakeLists.txt
5
+ @@ -374,6 +374,15 @@ target_compile_options(${MICROPY_TARGET} PRIVATE
6
+ target_link_options(${MICROPY_TARGET} PRIVATE
7
+ -Wl,--defsym=__micropy_c_heap_size__=${MICROPY_C_HEAP_SIZE}
8
+ )
9
+ + # Do not include stack unwinding & exception handling for C++ user modules
10
+ + target_compile_definitions(usermod INTERFACE PICO_CXX_ENABLE_EXCEPTIONS=0)
11
+ + target_compile_options(usermod INTERFACE $<$<COMPILE_LANGUAGE:CXX>:
12
+ + -fno-exceptions
13
+ + -fno-unwind-tables
14
+ + -fno-rtti
15
+ + -fno-use-cxa-atexit
16
+ + >)
17
+ + target_link_options(usermod INTERFACE -specs=nano.specs)
18
+
19
+ set_source_files_properties(
20
+ ${PICO_SDK_PATH}/src/rp2_common/pico_double/double_math.c
You can’t perform that action at this time.
0 commit comments