Skip to content

docs: Building embedding example using shared/static lib with cmake (with example) #11269

Description

@shakfu

I was recently interested to build static and shared library versions of the micropython/examples/embedding case using cmake and I managed to get it roughly done ( see this public repo in case anyone is interested).

Along the way I found that micropython has quite a number of cmake-related files in its repo (see below).

Since I did not use any of these in my above example, is there any documentation guidance on building MicroPython with cmake that I can use to improve my example? Thanks!

ports/esp32/CMakeLists.txt
ports/esp32/main/CMakeLists.txt
ports/rp2/CMakeLists.txt
ports/zephyr/CMakeLists.txt

AND

examples/usercmodule/cexample/micropython.cmake
examples/usercmodule/cppexample/micropython.cmake
examples/usercmodule/micropython.cmake
extmod/extmod.cmake
extmod/nimble/nimble.cmake
ports/esp32/boards/ESP32_S2_WROVER/mpconfigboard.cmake
ports/esp32/boards/GENERIC/mpconfigboard.cmake
ports/esp32/boards/GENERIC_C3/mpconfigboard.cmake
ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.cmake
ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake
ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake
ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake
ports/esp32/boards/GENERIC_S3/mpconfigboard.cmake
ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.cmake
ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake
ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake
ports/esp32/boards/GENERIC_UNICORE/mpconfigboard.cmake
ports/esp32/boards/LILYGO_TTGO_LORA32/mpconfigboard.cmake
ports/esp32/boards/LOLIN_C3_MINI/mpconfigboard.cmake
ports/esp32/boards/LOLIN_S2_MINI/mpconfigboard.cmake
ports/esp32/boards/LOLIN_S2_PICO/mpconfigboard.cmake
ports/esp32/boards/M5STACK_ATOM/mpconfigboard.cmake
ports/esp32/boards/OLIMEX_ESP32_POE/mpconfigboard.cmake
ports/esp32/boards/SIL_WESP32/mpconfigboard.cmake
ports/esp32/boards/UM_FEATHERS2/mpconfigboard.cmake
ports/esp32/boards/UM_FEATHERS2NEO/mpconfigboard.cmake
ports/esp32/boards/UM_FEATHERS3/mpconfigboard.cmake
ports/esp32/boards/UM_PROS3/mpconfigboard.cmake
ports/esp32/boards/UM_TINYPICO/mpconfigboard.cmake
ports/esp32/boards/UM_TINYS2/mpconfigboard.cmake
ports/esp32/boards/UM_TINYS3/mpconfigboard.cmake
ports/rp2/boards/ADAFRUIT_FEATHER_RP2040/mpconfigboard.cmake
ports/rp2/boards/ADAFRUIT_ITSYBITSY_RP2040/mpconfigboard.cmake
ports/rp2/boards/ADAFRUIT_QTPY_RP2040/mpconfigboard.cmake
ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/mpconfigboard.cmake
ports/rp2/boards/GARATRONIC_PYBSTICK26_RP2040/mpconfigboard.cmake
ports/rp2/boards/NULLBITS_BIT_C_PRO/mpconfigboard.cmake
ports/rp2/boards/PICO/mpconfigboard.cmake
ports/rp2/boards/PICO_W/mpconfigboard.cmake
ports/rp2/boards/PIMORONI_PICOLIPO_16MB/mpconfigboard.cmake
ports/rp2/boards/PIMORONI_PICOLIPO_4MB/mpconfigboard.cmake
ports/rp2/boards/PIMORONI_TINY2040/mpconfigboard.cmake
ports/rp2/boards/SPARKFUN_PROMICRO/mpconfigboard.cmake
ports/rp2/boards/SPARKFUN_THINGPLUS/mpconfigboard.cmake
ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake
ports/rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake
ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake
py/mkrules.cmake
py/py.cmake
py/usermod.cmake

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions