1
0
mirror of https://github.com/danbee/unicorn synced 2026-06-20 22:52:22 +00:00
unicorn/boards/usermod-common.cmake
2025-02-01 16:56:30 +00:00

65 lines
1.6 KiB
CMake

if(NOT DEFINED PIMORONI_PICO_PATH)
set(PIMORONI_PICO_PATH ${CMAKE_CURRENT_LIST_DIR}/../pimoroni-pico)
endif()
include(${PIMORONI_PICO_PATH}/pimoroni_pico_import.cmake)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../../)
include_directories(${PIMORONI_PICO_PATH}/micropython)
# Drivers, etc
list(APPEND CMAKE_MODULE_PATH "${PIMORONI_PICO_PATH}")
# modules_py/modules_py
list(APPEND CMAKE_MODULE_PATH "${PIMORONI_PICO_PATH}/micropython")
# All regular modules
list(APPEND CMAKE_MODULE_PATH "${PIMORONI_PICO_PATH}/micropython/modules")
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Essential
include(pimoroni_i2c/micropython)
include(pimoroni_bus/micropython)
# Pico Graphics Essential
include(bitmap_fonts/micropython)
include(picographics/micropython)
# Pico Graphics Extra
include(pngdec/micropython)
include(jpegdec/micropython)
include(qrcode/micropython/micropython)
# Sensors & Breakouts
include(micropython-common-breakouts)
# Utility
include(adcfft/micropython)
# Unicorn driver. Note: The UNICORN var must be set in mpconfigboard.cmake
include(${UNICORN}_unicorn/micropython)
# Must call `enable_ulab()` to enable
include(micropython-common-ulab)
enable_ulab()
# These do not fit on the 2MB RP2040 Pico W
if(PICO_PLATFORM EQUAL "rp2350-arm-s")
# LEDs & Matrices
include(plasma/micropython)
# Servos & Motors
include(pwm/micropython)
include(servo/micropython)
include(encoder/micropython)
include(motor/micropython)
endif()
# Still required for version.py
include(modules_py/modules_py)
# C++ Magic Memory
include(cppmem/micropython)
# Disable build-busting C++ exceptions
include(micropython-disable-exceptions)