micropython/ports/rp2/boards/WEACTSTUDIO/mpconfigboard.cmake
Jim Mussared 45845acf6d rp2: Use uppercase variant names.
This is to support a future change to add the variant name to the build
directory and therefore should be the same style as the board name.

This only affects the WEACTSTUDIO board. Also standardises on a convention
for naming flash-size variants. Normally we would write e.g. 2MiB, but in
uppercase, it's awkward to write 2MIB, so instead use 2M, 512K, etc for
variant names, but use 2MiB when not constrained by case (e.g. a regular
filename).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-23 13:54:37 +10:00

25 lines
764 B
CMake

# CMake file for WeAct Studio RP2040 boards
# The WeAct Studio boards don't have official pico-sdk support so we define it
# See also: https://github.com/raspberrypi/pico-sdk/tree/master/src/boards/include/boards
list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
# Freeze board.py
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
# Select the 16MB variant as the default
set(PICO_BOARD "weactstudio_16MiB")
# Provide different variants for the downloads page
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_2M")
set(PICO_BOARD "weactstudio_2MiB")
endif()
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_4M")
set(PICO_BOARD "weactstudio_4MiB")
endif()
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_8M")
set(PICO_BOARD "weactstudio_8MiB")
endif()