circuitpython/ports
Phil Howard 0cf12dd59c rp2: Add support for USER_C_MODULES to CMake build system.
The parts that are generic are added to py/ so they can be used by other
ports that use CMake.

py/usermod.cmake:

* Creates a usermod target to hang user C/CXX modules from.
* Gathers sources from user C/CXX modules and libs for QSTR scan.

ports/rp2/CMakeLists.txt:

* Includes py/usermod.cmake.
* Links the resulting usermod library to the MicroPython target.

py/mkrules.cmake:

Add cxxflags to qstr.i.last custom command for CXX modules:

* MICROPY_CPP_FLAGS so CXX modules will find includes.
* -DNO_QSTR to fix fatal error missing "genhdr/qstrdefs.generated.h".

Usage:

The rp2 port can be linked against user C modules by running:

make USER_C_MODULES=/path/to/module/micropython.cmake

CMake will print a list of included modules.

Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.org>
Co-authored-by: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
Signed-off-by: Phil Howard <phil@pimoroni.com>
2021-03-31 00:26:01 +11:00
..
bare-arm bare-arm: Clean up the code, make it run on an F405, and add a README. 2021-03-19 14:20:26 +11:00
cc3200 tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
esp32 extmod/extmod.cmake: Add modonewire.c to MICROPY_SOURCE_EXTMOD list. 2021-03-14 15:51:28 +11:00
esp8266 esp8266/modules: Fix fs_corrupted() to use start_sec not START_SEC. 2021-02-09 10:46:07 +11:00
javascript tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
mimxrt mimxrt/boards: Add MIMXRT1050_EVK board, based on MIMXRT1060_EVK. 2021-03-11 16:42:38 +11:00
minimal ports: Disable MICROPY_PY_ASSIGN_EXPR in bare-arm and minimal ports. 2020-06-16 22:06:21 +10:00
nrf nrf/drivers/usb: Add USBD_IRQHandler which calls tud_int_handler. 2021-02-13 13:52:53 +11:00
pic16bit ports: Remove def of MP_PLAT_PRINT_STRN if it's the same as the default. 2021-02-04 22:39:17 +11:00
powerpc ports: Remove def of MP_PLAT_PRINT_STRN if it's the same as the default. 2021-02-04 22:39:17 +11:00
qemu-arm tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
rp2 rp2: Add support for USER_C_MODULES to CMake build system. 2021-03-31 00:26:01 +11:00
samd samd/mphalport: Fix USB CDC tx handling to work reliably. 2021-02-12 14:09:01 +11:00
stm32 stm32/Makefile: Allow QSTR_DEFS,QSTR_GLOBAL_DEPENDENCIES to be extended. 2021-03-17 10:25:16 +11:00
teensy ports: Remove def of MP_PLAT_PRINT_STRN if it's the same as the default. 2021-02-04 22:39:17 +11:00
unix tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
windows tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
zephyr tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00