micropython-example-boards icon indicating copy to clipboard operation
micropython-example-boards copied to clipboard

Update to micropython 1.23

Open karlp opened this issue 1 year ago • 3 comments

This requires handling the following upstream commits:

  • decf8e6a8b all: Remove the "STATIC" macro and just use "static" instead.
  • 27279e69b4 esp32: Add IDF-version-specific sdkconfig. and, importantly
  • acbdbcd95e esp32: Workaround IDF issue placing ISR ringbuf functions in IRAM

Replacing STATIC was easy. Adding the IDF version specific was just implemented as upstream. However, the new linker.lf files are not in a path that is being searched properly. I believe this can only be fixed in micropython itself by providing a better file reference, and will provide a fix there. (Filed, see https://github.com/micropython/micropython/pull/16013

I believe this also fixes https://github.com/micropython/micropython-example-boards/issues/2

Required patch:

$ git diff
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake index e928fb439..8ba868c20 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -153,7 +153,7 @@ idf_component_register(
         ${MICROPY_BOARD_DIR}
         ${CMAKE_BINARY_DIR}
     LDFRAGMENTS
-        linker.lf
+        ${MICROPY_PORT_DIR}/main_${IDF_TARGET}/linker.lf
     REQUIRES
         ${IDF_COMPONENTS}
 )

Tested with esp32 builds, and esp32-s3 builds and runtime tests. Signed-off-by: Karl Palsson [email protected]

karlp avatar Oct 14 '24 20:10 karlp

Thanks for the contribution!

We will should wait until the patch to MicroPython is merged, so that the examples here build with the latest version.

dpgeorge avatar Oct 15 '24 01:10 dpgeorge

As suggested in https://github.com/micropython/micropython/pull/16013 I suggest we copy linker.lf here. That allows a custom board to provide a custom version of that if needed.

dpgeorge avatar Oct 15 '24 10:10 dpgeorge

Thanks for the contribution!

We will should wait until the patch to MicroPython is merged, so that the examples here build with the latest version.

absolutely, wouldn't dream of it otherwise, but had to post it like this to have them connected, and show the whole picture

karlp avatar Oct 15 '24 21:10 karlp