Skip to content

Commit bf49d51

Browse files
committed
CI: Bump to MicroPython v1.20 with new patch.
1 parent b393270 commit bf49d51

File tree

5 files changed

+35
-5
lines changed

5 files changed

+35
-5
lines changed

.github/workflows/micropython.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
types: [created]
88

99
env:
10-
MICROPYTHON_VERSION: 38e7b842c6bc8122753cbf0845eb141f28fbcb72
11-
PIMORONI_PICO_VERSION: v1.19.18
10+
MICROPYTHON_VERSION: v1.20.0
11+
PIMORONI_PICO_VERSION: v1.20.1
1212

1313
jobs:
1414
deps:
@@ -117,13 +117,18 @@ jobs:
117117
ref: v0.0.1
118118
path: dir2uf2
119119

120-
# HACK: Patch startup overclock into Pico SDK
120+
# HACK: Patch startup overclock into Pico SDK
121121
- name: "HACK: Startup Overclock Patch"
122122
shell: bash
123123
working-directory: micropython/lib/pico-sdk
124124
run: |
125125
git apply "${{env.FIRMWARE_DIR}}/startup_overclock.patch"
126126
127+
- name: "HACK: CMakeLists.txt Disable C++ Exceptions Patch"
128+
shell: bash
129+
working-directory: micropython
130+
run: git apply "${{env.FIRMWARE_DIR}}/micropython_nano_specs.patch"
131+
127132
# Install apt packages
128133
- name: Install CCache & Compiler
129134
shell: bash

firmware/PIMORONI_BADGER2040/mpconfigboard.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
set(MICROPY_BOARD PICO)
33

44
# Board specific version of the frozen manifest
5-
set(MICROPY_FROZEN_MANIFEST ${CMAKE_CURRENT_LIST_DIR}/manifest.py)
5+
set(MICROPY_FROZEN_MANIFEST ${CMAKE_CURRENT_LIST_DIR}/manifest.py)
6+
7+
set(MICROPY_C_HEAP_SIZE 4096)

firmware/PIMORONI_BADGER2040W/mpconfigboard.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ set(MICROPY_PY_LWIP ON)
55
set(MICROPY_PY_NETWORK_CYW43 ON)
66

77
# Board specific version of the frozen manifest
8-
set(MICROPY_FROZEN_MANIFEST ${CMAKE_CURRENT_LIST_DIR}/manifest.py)
8+
set(MICROPY_FROZEN_MANIFEST ${CMAKE_CURRENT_LIST_DIR}/manifest.py)
9+
10+
set(MICROPY_C_HEAP_SIZE 4096)

firmware/PIMORONI_BADGER2040W/mpconfigboard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// Enable networking.
66
#define MICROPY_PY_NETWORK 1
7+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Badger2040W"
78

89
// CYW43 driver configuration.
910
#define CYW43_USE_SPI (1)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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

0 commit comments

Comments
 (0)