CI: Print memory usage.

Add a patch for CMakeLists.txt which adds -Wl,--print-memory-usage so
we can get at least some useful information about which builds are
running close to the limits.
ci/better-debugging
Phil Howard 2024-04-08 16:50:23 +01:00 zatwierdzone przez Phil Howard
rodzic 4c44b77193
commit a0e0b85976
3 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -92,6 +92,12 @@ jobs:
source $BUILD_TOOLS
hack_patch_micropython_disable_exceptions
- name: "HACK: CMakeLists.txt Print Memory Usage"
shell: bash
run: |
source $BUILD_TOOLS
hack_patch_micropython_print_memory_usage
- name: "HACK: Pico SDK Patch"
shell: bash
run: |

Wyświetl plik

@ -49,6 +49,12 @@ function hack_patch_micropython_disable_exceptions {
cd ../
}
function hack_patch_micropython_print_memory_usage {
cd micropython
git apply $PIMORONI_PICO_DIR/micropython/micropython_print_memory_usage.patch
cd ../
}
function hack_patch_pico_sdk {
# pico-sdk-patch.sh will apply the patch if it exists
cd micropython

Wyświetl plik

@ -0,0 +1,12 @@
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index 2697efe28..cd35392be 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -451,6 +451,7 @@ target_compile_options(${MICROPY_TARGET} PRIVATE
target_link_options(${MICROPY_TARGET} PRIVATE
-Wl,--defsym=__micropy_c_heap_size__=${MICROPY_C_HEAP_SIZE}
-Wl,--wrap=dcd_event_handler
+ -Wl,--print-memory-usage
)
# Do not include stack unwinding & exception handling for C++ user modules