From fed7188e527baa922f4130b90b39dc64e3dd8eef Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Mon, 14 Apr 2025 08:50:25 -0700 Subject: [PATCH] Rework use of pico_cmake_set in board headers to make it slightly less magic/confusing (#2397) * Rework use of pico_cmake_set in board headers to make it slightly less magic/confusing - prefer "pico_cmake_set(var, value)" over "// pico_cmake_set var = value" - prefer "pico_cmake_set_default(var, value)" over "// pico_cmake_set_default var = value" - move these inside the header include guards as CLion complains Note that the macros are defined in "pico.h" however that is not explicitly included by the board headers; this will probably confuse some VS code syntax highligting, so lets see how it looks - i'd prefer to avoid having to include a header just for this * Update check_board_header.py with the new pico_cmake_set formats * Add brackets back around `PICO_FLASH_SIZE_BYTES` settings The python script checks for an exact match between the #define and the pico_cmake_set_default, so fails without the brackets * Rename to pico_board_cmake_set and pico_board_cmake_set_default * Fix support for old versions --------- Co-authored-by: William Vinnicombe --- cmake/generic_board.cmake | 18 ++++++++-- src/boards/include/boards/0xcb_helios.h | 6 ++-- .../include/boards/adafruit_feather_rp2040.h | 6 ++-- .../boards/adafruit_feather_rp2040_usb_host.h | 6 ++-- .../include/boards/adafruit_feather_rp2350.h | 8 ++--- .../boards/adafruit_itsybitsy_rp2040.h | 6 ++-- src/boards/include/boards/adafruit_kb2040.h | 6 ++-- .../include/boards/adafruit_macropad_rp2040.h | 6 ++-- .../include/boards/adafruit_qtpy_rp2040.h | 6 ++-- .../include/boards/adafruit_trinkey_qt2040.h | 6 ++-- src/boards/include/boards/amethyst_fpga.h | 6 ++-- src/boards/include/boards/archi.h | 6 ++-- .../boards/arduino_nano_rp2040_connect.h | 6 ++-- .../include/boards/cytron_maker_pi_rp2040.h | 6 ++-- .../include/boards/datanoisetv_rp2040_dsp.h | 6 ++-- .../include/boards/datanoisetv_rp2350_dsp.h | 8 ++--- src/boards/include/boards/defcon32_badge.h | 8 ++--- .../boards/eelectronicparts_picomini_16mb.h | 6 ++-- .../boards/eelectronicparts_picomini_2mb.h | 6 ++-- .../boards/eelectronicparts_picomini_4mb.h | 6 ++-- .../boards/eelectronicparts_picomini_8mb.h | 6 ++-- .../include/boards/eetree_gamekit_rp2040.h | 6 ++-- .../boards/garatronic_pybstick26_rp2040.h | 6 ++-- src/boards/include/boards/gen4_rp2350_24.h | 8 ++--- src/boards/include/boards/gen4_rp2350_24ct.h | 8 ++--- src/boards/include/boards/gen4_rp2350_24t.h | 8 ++--- src/boards/include/boards/gen4_rp2350_28.h | 8 ++--- src/boards/include/boards/gen4_rp2350_28ct.h | 8 ++--- src/boards/include/boards/gen4_rp2350_28t.h | 8 ++--- src/boards/include/boards/gen4_rp2350_32.h | 8 ++--- src/boards/include/boards/gen4_rp2350_32ct.h | 8 ++--- src/boards/include/boards/gen4_rp2350_32t.h | 8 ++--- src/boards/include/boards/gen4_rp2350_35.h | 8 ++--- src/boards/include/boards/gen4_rp2350_35ct.h | 8 ++--- src/boards/include/boards/gen4_rp2350_35t.h | 8 ++--- src/boards/include/boards/hellbender_0001.h | 6 ++-- .../boards/hellbender_2350A_devboard.h | 6 ++-- .../boards/ilabs_challenger_rp2350_bconnect.h | 8 ++--- .../boards/ilabs_challenger_rp2350_wifi_ble.h | 8 ++--- src/boards/include/boards/ilabs_opendec02.h | 6 ++-- src/boards/include/boards/machdyne_werkzeug.h | 6 ++-- .../boards/melopero_perpetuo_rp2350_lora.h | 8 ++--- .../include/boards/melopero_shake_rp2040.h | 6 ++-- .../include/boards/metrotech_xerxes_rp2040.h | 6 ++-- .../include/boards/net8086_usb_interposer.h | 6 ++-- .../include/boards/nullbits_bit_c_pro.h | 6 ++-- .../include/boards/phyx_rick_tny_rp2350.h | 8 ++--- src/boards/include/boards/pi-plates_micropi.h | 6 ++-- src/boards/include/boards/pico.h | 6 ++-- src/boards/include/boards/pico2.h | 8 ++--- src/boards/include/boards/pico2_w.h | 10 +++--- src/boards/include/boards/pico_w.h | 8 ++--- .../include/boards/pimoroni_badger2040.h | 6 ++-- .../include/boards/pimoroni_interstate75.h | 6 ++-- .../include/boards/pimoroni_keybow2040.h | 6 ++-- .../include/boards/pimoroni_motor2040.h | 6 ++-- src/boards/include/boards/pimoroni_pga2040.h | 6 ++-- src/boards/include/boards/pimoroni_pga2350.h | 8 ++--- .../boards/pimoroni_pico_plus2_rp2350.h | 8 ++--- .../boards/pimoroni_pico_plus2_w_rp2350.h | 10 +++--- .../include/boards/pimoroni_picolipo_16mb.h | 6 ++-- .../include/boards/pimoroni_picolipo_4mb.h | 6 ++-- .../include/boards/pimoroni_picosystem.h | 6 ++-- .../include/boards/pimoroni_plasma2040.h | 6 ++-- .../include/boards/pimoroni_plasma2350.h | 8 ++--- .../include/boards/pimoroni_servo2040.h | 6 ++-- src/boards/include/boards/pimoroni_tiny2040.h | 6 ++-- .../include/boards/pimoroni_tiny2040_2mb.h | 6 ++-- src/boards/include/boards/pimoroni_tiny2350.h | 8 ++--- .../include/boards/pololu_3pi_2040_robot.h | 6 ++-- .../include/boards/pololu_zumo_2040_robot.h | 6 ++-- src/boards/include/boards/seeed_xiao_rp2040.h | 6 ++-- src/boards/include/boards/seeed_xiao_rp2350.h | 8 ++--- .../include/boards/solderparty_rp2040_stamp.h | 6 ++-- .../boards/solderparty_rp2040_stamp_carrier.h | 4 +-- .../solderparty_rp2040_stamp_round_carrier.h | 4 +-- .../include/boards/solderparty_rp2350_stamp.h | 8 ++--- .../boards/solderparty_rp2350_stamp_xl.h | 8 ++--- .../boards/sparkfun_iotnode_lorawan_rp2350.h | 8 ++--- .../boards/sparkfun_iotredboard_rp2350.h | 10 +++--- src/boards/include/boards/sparkfun_micromod.h | 6 ++-- src/boards/include/boards/sparkfun_promicro.h | 6 ++-- .../include/boards/sparkfun_promicro_rp2350.h | 8 ++--- .../include/boards/sparkfun_thingplus.h | 6 ++-- .../boards/sparkfun_thingplus_rp2350.h | 10 +++--- .../include/boards/sparkfun_xrp_controller.h | 10 +++--- .../switchscience_picossci2_conta_base.h | 8 ++--- .../switchscience_picossci2_dev_board.h | 8 ++--- .../boards/switchscience_picossci2_micro.h | 8 ++--- .../switchscience_picossci2_rp2350_breakout.h | 8 ++--- .../boards/switchscience_picossci2_tiny.h | 8 ++--- .../boards/tinycircuits_thumby_color_rp2350.h | 8 ++--- .../include/boards/waveshare_pico_cam_a.h | 6 ++-- .../include/boards/waveshare_rp2040_ble.h | 6 ++-- .../include/boards/waveshare_rp2040_eth.h | 6 ++-- .../include/boards/waveshare_rp2040_geek.h | 6 ++-- .../boards/waveshare_rp2040_lcd_0.96.h | 6 ++-- .../boards/waveshare_rp2040_lcd_1.28.h | 6 ++-- .../include/boards/waveshare_rp2040_matrix.h | 6 ++-- .../include/boards/waveshare_rp2040_one.h | 6 ++-- .../include/boards/waveshare_rp2040_pizero.h | 6 ++-- .../boards/waveshare_rp2040_plus_16mb.h | 6 ++-- .../boards/waveshare_rp2040_plus_4mb.h | 6 ++-- .../waveshare_rp2040_power_management_hat_b.h | 6 ++-- .../include/boards/waveshare_rp2040_tiny.h | 6 ++-- .../boards/waveshare_rp2040_touch_lcd_1.28.h | 6 ++-- .../include/boards/waveshare_rp2040_zero.h | 6 ++-- .../include/boards/waveshare_rp2350_eth.h | 8 ++--- .../include/boards/waveshare_rp2350_geek.h | 8 ++--- .../boards/waveshare_rp2350_lcd_0.96.h | 8 ++--- .../boards/waveshare_rp2350_lcd_1.28.h | 8 ++--- .../include/boards/waveshare_rp2350_one.h | 8 ++--- .../boards/waveshare_rp2350_plus_16mb.h | 8 ++--- .../boards/waveshare_rp2350_plus_4mb.h | 8 ++--- .../include/boards/waveshare_rp2350_tiny.h | 8 ++--- .../boards/waveshare_rp2350_touch_lcd_1.28.h | 8 ++--- .../include/boards/waveshare_rp2350_zero.h | 8 ++--- .../include/boards/weact_studio_rp2040_16mb.h | 6 ++-- .../include/boards/weact_studio_rp2040_2mb.h | 6 ++-- .../include/boards/weact_studio_rp2040_4mb.h | 6 ++-- .../include/boards/weact_studio_rp2040_8mb.h | 6 ++-- .../include/boards/wiznet_w5100s_evb_pico.h | 6 ++-- src/common/pico_base_headers/include/pico.h | 29 +++++++++++++++ .../boot_stage2/include/boot_stage2/config.h | 2 +- tools/check_board_header.py | 36 +++++++++---------- 125 files changed, 480 insertions(+), 439 deletions(-) diff --git a/cmake/generic_board.cmake b/cmake/generic_board.cmake index c7fdfe5a..9dd917d5 100644 --- a/cmake/generic_board.cmake +++ b/cmake/generic_board.cmake @@ -20,10 +20,22 @@ if (EXISTS ${PICO_BOARD_HEADER_FILE}) while(HEADER_FILE_CONTENTS) list(POP_FRONT HEADER_FILE_CONTENTS LINE) - if (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ \t\]*(.*)") + # pico_board_cmake_set(var, value) + if (LINE MATCHES "^[ \t\]*pico_board_cmake_set[ \t\]*\\([ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*,[ \t\]*(.*)[ \t\]*\\)[ \t\]*") set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif() - if (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set_default[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ \t\]*(.*)") + # pico_board_cmake_set_default(var, value) + elseif (LINE MATCHES "^[ \t\]*pico_board_cmake_set_default[ \t\]*\\([ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*,[ \t\]*(.*)[ \t\]*\\)[ \t\]*") + if (NOT DEFINED "${CMAKE_MATCH_1}") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + else() + list(APPEND PICO_BOARD_CMAKE_OVERRIDES ${CMAKE_MATCH_1}) + endif() + # continue to support these for now + # // pico_cmake_set var = value + elseif (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ \t\]*(.*)") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + # // pico_cmake_set_default var = value + elseif (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set_default[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ \t\]*(.*)") if (NOT DEFINED "${CMAKE_MATCH_1}") set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") else() diff --git a/src/boards/include/boards/0xcb_helios.h b/src/boards/include/boards/0xcb_helios.h index e06c552b..2f075c06 100644 --- a/src/boards/include/boards/0xcb_helios.h +++ b/src/boards/include/boards/0xcb_helios.h @@ -12,11 +12,11 @@ //------------------------------------------------------------------------------------------ // Board definition for the 0xCB Helios -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_0XCB_HELIOS_H #define _BOARDS_0XCB_HELIOS_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define _0XCB_HELIOS @@ -73,7 +73,7 @@ #endif // board has 16M onboard flash -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_feather_rp2040.h b/src/boards/include/boards/adafruit_feather_rp2040.h index c9a6d618..bbbb8018 100644 --- a/src/boards/include/boards/adafruit_feather_rp2040.h +++ b/src/boards/include/boards/adafruit_feather_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ADAFRUIT_FEATHER_RP2040_H #define _BOARDS_ADAFRUIT_FEATHER_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ADAFRUIT_FEATHER_RP2040 @@ -83,7 +83,7 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_feather_rp2040_usb_host.h b/src/boards/include/boards/adafruit_feather_rp2040_usb_host.h index 6175b942..684f3d1f 100644 --- a/src/boards/include/boards/adafruit_feather_rp2040_usb_host.h +++ b/src/boards/include/boards/adafruit_feather_rp2040_usb_host.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ADAFRUIT_FEATHER_RP2040_USB_HOST_H #define _BOARDS_ADAFRUIT_FEATHER_RP2040_USB_HOST_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ADAFRUIT_FEATHER_RP2040_USB_HOST @@ -79,7 +79,7 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_feather_rp2350.h b/src/boards/include/boards/adafruit_feather_rp2350.h index 75aaaf90..08227df8 100644 --- a/src/boards/include/boards/adafruit_feather_rp2350.h +++ b/src/boards/include/boards/adafruit_feather_rp2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/adafruit_feather_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_ADAFRUIT_FEATHER_RP2350_H #define _BOARDS_ADAFRUIT_FEATHER_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // On some samples, the xosc can take longer to stabilize than is usual #ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 @@ -78,12 +78,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/adafruit_itsybitsy_rp2040.h b/src/boards/include/boards/adafruit_itsybitsy_rp2040.h index ee5cf9cd..5bd06ca7 100644 --- a/src/boards/include/boards/adafruit_itsybitsy_rp2040.h +++ b/src/boards/include/boards/adafruit_itsybitsy_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ADAFRUIT_ITSYBITSY_RP2040_H #define _BOARDS_ADAFRUIT_ITSYBITSY_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ADAFRUIT_ITSYBITSY_RP2040 @@ -86,7 +86,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_kb2040.h b/src/boards/include/boards/adafruit_kb2040.h index f63fc77e..affb90cb 100644 --- a/src/boards/include/boards/adafruit_kb2040.h +++ b/src/boards/include/boards/adafruit_kb2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ADAFRUIT_KB2040_H #define _BOARDS_ADAFRUIT_KB2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ADAFRUIT_KB2040 @@ -78,7 +78,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_macropad_rp2040.h b/src/boards/include/boards/adafruit_macropad_rp2040.h index 672ada96..1b61d131 100644 --- a/src/boards/include/boards/adafruit_macropad_rp2040.h +++ b/src/boards/include/boards/adafruit_macropad_rp2040.h @@ -12,11 +12,11 @@ #ifndef _BOARDS_ADAFRUIT_MACROPAD_RP2040_H #define _BOARDS_ADAFRUIT_MACROPAD_RP2040_H -// pico_cmake_set PICO_PLATFORM=rp2040 - // For board detection #define ADAFRUIT_MACROPAD_RP2040 +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // On some samples, the xosc can take longer to stabilize than is usual #ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 @@ -173,7 +173,7 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_qtpy_rp2040.h b/src/boards/include/boards/adafruit_qtpy_rp2040.h index 722d2300..60c89159 100644 --- a/src/boards/include/boards/adafruit_qtpy_rp2040.h +++ b/src/boards/include/boards/adafruit_qtpy_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ADAFRUIT_QTPY_RP2040_H #define _BOARDS_ADAFRUIT_QTPY_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ADAFRUIT_QTPY_RP2040 @@ -85,7 +85,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/adafruit_trinkey_qt2040.h b/src/boards/include/boards/adafruit_trinkey_qt2040.h index 06e29494..4af1809c 100644 --- a/src/boards/include/boards/adafruit_trinkey_qt2040.h +++ b/src/boards/include/boards/adafruit_trinkey_qt2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ADAFRUIT_TRINKEY_QT2040_H #define _BOARDS_ADAFRUIT_TRINKEY_QT2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ADAFRUIT_TRINKEY_QT2040 @@ -63,7 +63,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/amethyst_fpga.h b/src/boards/include/boards/amethyst_fpga.h index 190a0767..fbe7bd25 100644 --- a/src/boards/include/boards/amethyst_fpga.h +++ b/src/boards/include/boards/amethyst_fpga.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_AMETHYST_FPGA_H #define _BOARDS_AMETHYST_FPGA_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + #if !PICO_RP2350 #error "Invalid PICO_PLATFORM for amethyst_fpga.h: must be rp2350 or rp2350-riscv" #endif @@ -98,7 +98,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/archi.h b/src/boards/include/boards/archi.h index 13b7d7ea..076cfe09 100644 --- a/src/boards/include/boards/archi.h +++ b/src/boards/include/boards/archi.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/archi.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ARCHI_H #define _BOARDS_ARCHI_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ARCHI @@ -104,7 +104,7 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/arduino_nano_rp2040_connect.h b/src/boards/include/boards/arduino_nano_rp2040_connect.h index 9cd3035f..57d5e0c1 100644 --- a/src/boards/include/boards/arduino_nano_rp2040_connect.h +++ b/src/boards/include/boards/arduino_nano_rp2040_connect.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ARDUINO_NANO_RP2040_CONNECT_H #define _BOARDS_ARDUINO_NANO_RP2040_CONNECT_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ARDUINO_NANO_RP2040_CONNECT @@ -74,7 +74,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/cytron_maker_pi_rp2040.h b/src/boards/include/boards/cytron_maker_pi_rp2040.h index 9d2f0eb6..52be09ca 100644 --- a/src/boards/include/boards/cytron_maker_pi_rp2040.h +++ b/src/boards/include/boards/cytron_maker_pi_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_CYTRON_MAKER_PI_RP2040_H #define _BOARDS_CYTRON_MAKER_PI_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define CYTRON_MAKER_PI_RP2040 @@ -179,7 +179,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/datanoisetv_rp2040_dsp.h b/src/boards/include/boards/datanoisetv_rp2040_dsp.h index ae583baa..6084efe2 100644 --- a/src/boards/include/boards/datanoisetv_rp2040_dsp.h +++ b/src/boards/include/boards/datanoisetv_rp2040_dsp.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/datanoisetv_rp2040_dsp.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_DATANOISETV_RP2040_DSP_H #define _BOARDS_DATANOISETV_RP2040_DSP_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define DATANOISETV_RP2040_DSP @@ -40,7 +40,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/datanoisetv_rp2350_dsp.h b/src/boards/include/boards/datanoisetv_rp2350_dsp.h index feb5792c..1195e3c1 100644 --- a/src/boards/include/boards/datanoisetv_rp2350_dsp.h +++ b/src/boards/include/boards/datanoisetv_rp2350_dsp.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/datanoisetv_rp2350_dsp.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_DATANOISETV_RP2350_DSP_H #define _BOARDS_DATANOISETV_RP2350_DSP_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define DATANOISETV_RP2350_DSP @@ -43,12 +43,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/defcon32_badge.h b/src/boards/include/boards/defcon32_badge.h index 3466fc71..ce18d615 100644 --- a/src/boards/include/boards/defcon32_badge.h +++ b/src/boards/include/boards/defcon32_badge.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_DEFCON32_BADGE_H #define _BOARDS_DEFCON32_BADGE_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define DEFCON32_BADGE @@ -103,12 +103,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/eelectronicparts_picomini_16mb.h b/src/boards/include/boards/eelectronicparts_picomini_16mb.h index 52a53081..2121628d 100644 --- a/src/boards/include/boards/eelectronicparts_picomini_16mb.h +++ b/src/boards/include/boards/eelectronicparts_picomini_16mb.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/eelectronicparts_picomini_16mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_EELECTRONICPARTS_PICOMINI_16MB_H #define _BOARDS_EELECTRONICPARTS_PICOMINI_16MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define EELECTRONICPARTS_PICOMINI_16MB @@ -72,7 +72,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES // This board comes in 2MB, 4MB, 8MB, and 16MB variants #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) diff --git a/src/boards/include/boards/eelectronicparts_picomini_2mb.h b/src/boards/include/boards/eelectronicparts_picomini_2mb.h index e0fcab1f..e10fc35a 100644 --- a/src/boards/include/boards/eelectronicparts_picomini_2mb.h +++ b/src/boards/include/boards/eelectronicparts_picomini_2mb.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/eelectronicparts_picomini_2mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_EELECTRONICPARTS_PICOMINI_2MB_H #define _BOARDS_EELECTRONICPARTS_PICOMINI_2MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define EELECTRONICPARTS_PICOMINI_2MB @@ -72,7 +72,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES // This board comes in 2MB, 4MB, 8MB, and 16MB variants #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) diff --git a/src/boards/include/boards/eelectronicparts_picomini_4mb.h b/src/boards/include/boards/eelectronicparts_picomini_4mb.h index 132dc0c9..a8bc8e57 100644 --- a/src/boards/include/boards/eelectronicparts_picomini_4mb.h +++ b/src/boards/include/boards/eelectronicparts_picomini_4mb.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/eelectronicparts_picomini_4mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_EELECTRONICPARTS_PICOMINI_4MB_H #define _BOARDS_EELECTRONICPARTS_PICOMINI_4MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define EELECTRONICPARTS_PICOMINI_4MB @@ -72,7 +72,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES // This board comes in 2MB, 4MB, 8MB, and 16MB variants #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) diff --git a/src/boards/include/boards/eelectronicparts_picomini_8mb.h b/src/boards/include/boards/eelectronicparts_picomini_8mb.h index 479e1105..d7f19f34 100644 --- a/src/boards/include/boards/eelectronicparts_picomini_8mb.h +++ b/src/boards/include/boards/eelectronicparts_picomini_8mb.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/eelectronicparts_picomini_8mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_EELECTRONICPARTS_PICOMINI_8MB_H #define _BOARDS_EELECTRONICPARTS_PICOMINI_8MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define EELECTRONICPARTS_PICOMINI_8MB @@ -72,7 +72,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES // This board comes in 2MB, 4MB, 8MB, and 16MB variants #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) diff --git a/src/boards/include/boards/eetree_gamekit_rp2040.h b/src/boards/include/boards/eetree_gamekit_rp2040.h index 3df87198..f1e72dac 100644 --- a/src/boards/include/boards/eetree_gamekit_rp2040.h +++ b/src/boards/include/boards/eetree_gamekit_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_EETREE_GAMEKIT_RP2040_H #define _BOARDS_EETREE_GAMEKIT_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define EETREE_GAMEKIT_RP2040 @@ -69,7 +69,7 @@ #ifndef PICO_FLASH_SPI_CLKDIV #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/garatronic_pybstick26_rp2040.h b/src/boards/include/boards/garatronic_pybstick26_rp2040.h index d245c820..190cefe4 100644 --- a/src/boards/include/boards/garatronic_pybstick26_rp2040.h +++ b/src/boards/include/boards/garatronic_pybstick26_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_GARATRONIC_PYBSTICK26_RP2040_H #define _BOARDS_GARATRONIC_PYBSTICK26_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define GARATRONIC_PYBSTICK26_RP2040 @@ -70,7 +70,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (1 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (1 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/gen4_rp2350_24.h b/src/boards/include/boards/gen4_rp2350_24.h index ec479653..06e0bb1d 100644 --- a/src/boards/include/boards/gen4_rp2350_24.h +++ b/src/boards/include/boards/gen4_rp2350_24.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_24_H #define _BOARDS_GEN4_RP2350_24_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_24 @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_24ct.h b/src/boards/include/boards/gen4_rp2350_24ct.h index 71b8f2e6..864a023e 100644 --- a/src/boards/include/boards/gen4_rp2350_24ct.h +++ b/src/boards/include/boards/gen4_rp2350_24ct.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_24CT_H #define _BOARDS_GEN4_RP2350_24CT_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_24CT // CLB variants are exactly the same in operation @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_24t.h b/src/boards/include/boards/gen4_rp2350_24t.h index df086fae..129fec9c 100644 --- a/src/boards/include/boards/gen4_rp2350_24t.h +++ b/src/boards/include/boards/gen4_rp2350_24t.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_24T_H #define _BOARDS_GEN4_RP2350_24T_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_24T @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_28.h b/src/boards/include/boards/gen4_rp2350_28.h index b460b878..39cef5c9 100644 --- a/src/boards/include/boards/gen4_rp2350_28.h +++ b/src/boards/include/boards/gen4_rp2350_28.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_28_H #define _BOARDS_GEN4_RP2350_28_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_28 @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_28ct.h b/src/boards/include/boards/gen4_rp2350_28ct.h index 11153e14..e581a97c 100644 --- a/src/boards/include/boards/gen4_rp2350_28ct.h +++ b/src/boards/include/boards/gen4_rp2350_28ct.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_28CT_H #define _BOARDS_GEN4_RP2350_28CT_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_28CT // CLB variants are exactly the same in operation @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_28t.h b/src/boards/include/boards/gen4_rp2350_28t.h index c948c9eb..a2c3af32 100644 --- a/src/boards/include/boards/gen4_rp2350_28t.h +++ b/src/boards/include/boards/gen4_rp2350_28t.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_28T_H #define _BOARDS_GEN4_RP2350_28T_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_28T @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_32.h b/src/boards/include/boards/gen4_rp2350_32.h index 89693774..2adc570e 100644 --- a/src/boards/include/boards/gen4_rp2350_32.h +++ b/src/boards/include/boards/gen4_rp2350_32.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_32_H #define _BOARDS_GEN4_RP2350_32_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_32 @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_32ct.h b/src/boards/include/boards/gen4_rp2350_32ct.h index 0e137357..9624c2d3 100644 --- a/src/boards/include/boards/gen4_rp2350_32ct.h +++ b/src/boards/include/boards/gen4_rp2350_32ct.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_32CT_H #define _BOARDS_GEN4_RP2350_32CT_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_32CT // CLB variants are exactly the same in operation @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_32t.h b/src/boards/include/boards/gen4_rp2350_32t.h index 6280f0d7..a335e623 100644 --- a/src/boards/include/boards/gen4_rp2350_32t.h +++ b/src/boards/include/boards/gen4_rp2350_32t.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_32T_H #define _BOARDS_GEN4_RP2350_32T_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_32T @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_35.h b/src/boards/include/boards/gen4_rp2350_35.h index d26f5303..2dd4eca6 100644 --- a/src/boards/include/boards/gen4_rp2350_35.h +++ b/src/boards/include/boards/gen4_rp2350_35.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_35_H #define _BOARDS_GEN4_RP2350_35_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_35 @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_35ct.h b/src/boards/include/boards/gen4_rp2350_35ct.h index 8576ac50..fbdd13d4 100644 --- a/src/boards/include/boards/gen4_rp2350_35ct.h +++ b/src/boards/include/boards/gen4_rp2350_35ct.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_35CT_H #define _BOARDS_GEN4_RP2350_35CT_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_35CT // CLB variants are exactly the same in operation @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/gen4_rp2350_35t.h b/src/boards/include/boards/gen4_rp2350_35t.h index ee8cb238..bec4bfd3 100644 --- a/src/boards/include/boards/gen4_rp2350_35t.h +++ b/src/boards/include/boards/gen4_rp2350_35t.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_GEN4_RP2350_35T_H #define _BOARDS_GEN4_RP2350_35T_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define GEN4_RP2350_35T @@ -71,12 +71,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/hellbender_0001.h b/src/boards/include/boards/hellbender_0001.h index 9f43803e..5f9ceca1 100644 --- a/src/boards/include/boards/hellbender_0001.h +++ b/src/boards/include/boards/hellbender_0001.h @@ -12,7 +12,7 @@ #ifndef _BOARDS_HELLBENDER_0001_H #define _BOARDS_HELLBENDER_0001_H -// pico_cmake_set PICO_PLATFORM=rp2350 +pico_board_cmake_set(PICO_PLATFORM, rp2350) // For board detection #define HELLBENDER_0001 @@ -130,7 +130,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif @@ -140,7 +140,7 @@ // --- RP2350 VARIANT --- #define PICO_RP2350A 0 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/hellbender_2350A_devboard.h b/src/boards/include/boards/hellbender_2350A_devboard.h index 63753bcc..b2be28d3 100644 --- a/src/boards/include/boards/hellbender_2350A_devboard.h +++ b/src/boards/include/boards/hellbender_2350A_devboard.h @@ -12,7 +12,7 @@ #ifndef _BOARDS_HELLBENDER_2350A_DEVBOARD_H #define _BOARDS_HELLBENDER_2350A_DEVBOARD_H -// pico_cmake_set PICO_PLATFORM=rp2350 +pico_board_cmake_set(PICO_PLATFORM, rp2350) // For board detection #define HELLBENDER_2350A_DEVBOARD @@ -84,14 +84,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif // --- RP2350 VARIANT --- #define PICO_RP2350A 1 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/ilabs_challenger_rp2350_bconnect.h b/src/boards/include/boards/ilabs_challenger_rp2350_bconnect.h index 92d8960b..97645a45 100644 --- a/src/boards/include/boards/ilabs_challenger_rp2350_bconnect.h +++ b/src/boards/include/boards/ilabs_challenger_rp2350_bconnect.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/ilabs_challenger_rp2350_bconnect.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_ILABS_CHALLENGER_RP2350_BCONNECT_H #define _BOARDS_ILABS_CHALLENGER_RP2350_BCONNECT_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define ILABS_CHALLENGER_RP2350_BCONNECT @@ -78,12 +78,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/ilabs_challenger_rp2350_wifi_ble.h b/src/boards/include/boards/ilabs_challenger_rp2350_wifi_ble.h index 1278209b..b056cbca 100644 --- a/src/boards/include/boards/ilabs_challenger_rp2350_wifi_ble.h +++ b/src/boards/include/boards/ilabs_challenger_rp2350_wifi_ble.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/ilabs_challenger_rp2350_wifi_ble.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_ILABS_CHALLENGER_RP2350_WIFI_BLE_H #define _BOARDS_ILABS_CHALLENGER_RP2350_WIFI_BLE_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define ILABS_CHALLENGER_RP2350_WIFI_BLE @@ -75,12 +75,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/ilabs_opendec02.h b/src/boards/include/boards/ilabs_opendec02.h index 197a024e..f9b76a80 100644 --- a/src/boards/include/boards/ilabs_opendec02.h +++ b/src/boards/include/boards/ilabs_opendec02.h @@ -12,11 +12,11 @@ //------------------------------------------------------------------------------------------ // Board definition for the opendec02 open source dcc decoder // -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_ILABS_OPENDEC02_H #define _BOARDS_ILABS_OPENDEC02_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define ILABS_OPENDEC02 @@ -50,7 +50,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/machdyne_werkzeug.h b/src/boards/include/boards/machdyne_werkzeug.h index 8b45829b..f624750c 100644 --- a/src/boards/include/boards/machdyne_werkzeug.h +++ b/src/boards/include/boards/machdyne_werkzeug.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_MACHDYNE_WERKZEUG_H #define _BOARDS_MACHDYNE_WERKZEUG_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define MACHDYNE_WERKZEUG @@ -75,7 +75,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (1 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (1 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/melopero_perpetuo_rp2350_lora.h b/src/boards/include/boards/melopero_perpetuo_rp2350_lora.h index e86492b3..03e6568f 100644 --- a/src/boards/include/boards/melopero_perpetuo_rp2350_lora.h +++ b/src/boards/include/boards/melopero_perpetuo_rp2350_lora.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/melopero_perpetuo_rp2350_lora.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_MELOPERO_PERPETUO_RP2350_LORA_H #define _BOARDS_MELOPERO_PERPETUO_RP2350_LORA_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define MELOPERO_PERPETUO_RP2350_LORA @@ -75,14 +75,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/melopero_shake_rp2040.h b/src/boards/include/boards/melopero_shake_rp2040.h index 49059c9a..6a2f8564 100644 --- a/src/boards/include/boards/melopero_shake_rp2040.h +++ b/src/boards/include/boards/melopero_shake_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_MELOPERO_SHAKE_RP2040_H #define _BOARDS_MELOPERO_SHAKE_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define MELOPERO_SHAKE_RP2040 @@ -82,7 +82,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/metrotech_xerxes_rp2040.h b/src/boards/include/boards/metrotech_xerxes_rp2040.h index a91d893f..9998e92e 100644 --- a/src/boards/include/boards/metrotech_xerxes_rp2040.h +++ b/src/boards/include/boards/metrotech_xerxes_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_METROTECH_XERXES_RP2040_H #define _BOARDS_METROTECH_XERXES_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + #define USR_SW_PIN 18 #define USR_BTN_PIN 24 #define USR_LED_PIN 25 @@ -144,7 +144,7 @@ #define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 16 #endif // !PICO_XOSC_STARTUP_DELAY_MULTIPLIER -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES /** * @brief 16MiB, Flash size in bytes diff --git a/src/boards/include/boards/net8086_usb_interposer.h b/src/boards/include/boards/net8086_usb_interposer.h index 4de560f4..09bd7724 100644 --- a/src/boards/include/boards/net8086_usb_interposer.h +++ b/src/boards/include/boards/net8086_usb_interposer.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_NET8086_USB_INTERPOSER_H #define _BOARDS_NET8086_USB_INTERPOSER_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define NET8086_USB_INTERPOSER @@ -62,7 +62,7 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/nullbits_bit_c_pro.h b/src/boards/include/boards/nullbits_bit_c_pro.h index 58bb1adc..d9e6b314 100644 --- a/src/boards/include/boards/nullbits_bit_c_pro.h +++ b/src/boards/include/boards/nullbits_bit_c_pro.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/nullbits_bit_c_pro.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_NULLBITS_BIT_C_PRO_H #define _BOARDS_NULLBITS_BIT_C_PRO_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define NULLBITS_BIT_C_PRO @@ -100,7 +100,7 @@ #endif // Bit-C PRO has 4MB SPI flash -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/phyx_rick_tny_rp2350.h b/src/boards/include/boards/phyx_rick_tny_rp2350.h index 7012ac14..c0a5a9cb 100644 --- a/src/boards/include/boards/phyx_rick_tny_rp2350.h +++ b/src/boards/include/boards/phyx_rick_tny_rp2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/phyx_rick_tny_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_PHYX_RICK_TNY_RP2350_H #define _BOARDS_PHYX_RICK_TNY_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define PHYX_RICK_TNY_RP2350 @@ -75,12 +75,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pi-plates_micropi.h b/src/boards/include/boards/pi-plates_micropi.h index 9c0dd62f..3ae5c67a 100644 --- a/src/boards/include/boards/pi-plates_micropi.h +++ b/src/boards/include/boards/pi-plates_micropi.h @@ -11,11 +11,11 @@ // Board definition for the Pi-Plates MICROPi processor board -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PI_PLATES_MICROPI_H #define _BOARDS_PI_PLATES_MICROPI_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PI_PLATES_MICROPI @@ -72,7 +72,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) //change to (16 * 1024 * 1024) on final product #endif diff --git a/src/boards/include/boards/pico.h b/src/boards/include/boards/pico.h index 800feb36..6eb8600b 100644 --- a/src/boards/include/boards/pico.h +++ b/src/boards/include/boards/pico.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/pico.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PICO_H #define _BOARDS_PICO_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define RASPBERRYPI_PICO @@ -72,7 +72,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pico2.h b/src/boards/include/boards/pico2.h index 4dbb232d..9998939e 100644 --- a/src/boards/include/boards/pico2.h +++ b/src/boards/include/boards/pico2.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/pico2.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_PICO2_H #define _BOARDS_PICO2_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define RASPBERRYPI_PICO2 @@ -75,7 +75,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif @@ -93,7 +93,7 @@ #define PICO_VSYS_PIN 29 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pico2_w.h b/src/boards/include/boards/pico2_w.h index 42acdc4c..74f5a739 100644 --- a/src/boards/include/boards/pico2_w.h +++ b/src/boards/include/boards/pico2_w.h @@ -11,12 +11,12 @@ // This header may be included by other board headers as "boards/pico2_w.h" -// pico_cmake_set PICO_PLATFORM=rp2350 -// pico_cmake_set PICO_CYW43_SUPPORTED = 1 - #ifndef _BOARDS_PICO2_W_H #define _BOARDS_PICO2_W_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) +pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1) + // For board detection #define RASPBERRYPI_PICO2_W @@ -74,7 +74,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif @@ -109,7 +109,7 @@ #define PICO_VSYS_PIN 29 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pico_w.h b/src/boards/include/boards/pico_w.h index 250662f1..6e825f68 100644 --- a/src/boards/include/boards/pico_w.h +++ b/src/boards/include/boards/pico_w.h @@ -9,14 +9,14 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM = rp2040 -// pico_cmake_set PICO_CYW43_SUPPORTED = 1 - // This header may be included by other board headers as "boards/pico_w.h" #ifndef _BOARDS_PICO_W_H #define _BOARDS_PICO_W_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) +pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1) + // For board detection #define RASPBERRYPI_PICO_W @@ -71,7 +71,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_badger2040.h b/src/boards/include/boards/pimoroni_badger2040.h index d05c4d4b..d4e8a34b 100644 --- a/src/boards/include/boards/pimoroni_badger2040.h +++ b/src/boards/include/boards/pimoroni_badger2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_BADGER2040_H #define _BOARDS_PIMORONI_BADGER2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_BADGER2040 @@ -106,7 +106,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_interstate75.h b/src/boards/include/boards/pimoroni_interstate75.h index e7baa07b..067632c0 100644 --- a/src/boards/include/boards/pimoroni_interstate75.h +++ b/src/boards/include/boards/pimoroni_interstate75.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_INTERSTATE75_H #define _BOARDS_PIMORONI_INTERSTATE75_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_INTERSTATE75 @@ -96,7 +96,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_keybow2040.h b/src/boards/include/boards/pimoroni_keybow2040.h index 08314029..e661b9e9 100644 --- a/src/boards/include/boards/pimoroni_keybow2040.h +++ b/src/boards/include/boards/pimoroni_keybow2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_KEYBOW2040_H #define _BOARDS_PIMORONI_KEYBOW2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_KEYBOW2040 @@ -85,7 +85,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_motor2040.h b/src/boards/include/boards/pimoroni_motor2040.h index e183090c..1e202f6e 100644 --- a/src/boards/include/boards/pimoroni_motor2040.h +++ b/src/boards/include/boards/pimoroni_motor2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_MOTOR2040_H #define _BOARDS_PIMORONI_MOTOR2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_MOTOR2040 @@ -128,7 +128,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_pga2040.h b/src/boards/include/boards/pimoroni_pga2040.h index 25b9dd2b..a33831fe 100644 --- a/src/boards/include/boards/pimoroni_pga2040.h +++ b/src/boards/include/boards/pimoroni_pga2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_PGA2040_H #define _BOARDS_PIMORONI_PGA2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_PGA2040 @@ -69,7 +69,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_pga2350.h b/src/boards/include/boards/pimoroni_pga2350.h index 1bd02dc4..7849444f 100644 --- a/src/boards/include/boards/pimoroni_pga2350.h +++ b/src/boards/include/boards/pimoroni_pga2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/pimoroni_pga2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_PIMORONI_PGA2350_H #define _BOARDS_PIMORONI_PGA2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define PIMORONI_PGA2350 #define PIMORONI_PGA2350_16MB @@ -79,7 +79,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -88,7 +88,7 @@ // no PICO_VBUS_PIN // no PICO_VSYS_PIN -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pimoroni_pico_plus2_rp2350.h b/src/boards/include/boards/pimoroni_pico_plus2_rp2350.h index 40fff17d..6cae74b1 100644 --- a/src/boards/include/boards/pimoroni_pico_plus2_rp2350.h +++ b/src/boards/include/boards/pimoroni_pico_plus2_rp2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/pimoroni_pico_plus2_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_PIMORONI_PICO_PLUS2_RP2350_H #define _BOARDS_PIMORONI_PICO_PLUS2_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define PIMORONI_PICO_PLUS2_RP2350 @@ -86,7 +86,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -102,7 +102,7 @@ #define PICO_VSYS_PIN 43 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pimoroni_pico_plus2_w_rp2350.h b/src/boards/include/boards/pimoroni_pico_plus2_w_rp2350.h index 7a4f1741..7f125aaa 100644 --- a/src/boards/include/boards/pimoroni_pico_plus2_w_rp2350.h +++ b/src/boards/include/boards/pimoroni_pico_plus2_w_rp2350.h @@ -11,12 +11,12 @@ // This header may be included by other board headers as "boards/pimoroni_pico_plus2_w_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 -// pico_cmake_set PICO_CYW43_SUPPORTED = 1 - #ifndef _BOARDS_PIMORONI_PICO_PLUS2_W_RP2350_H #define _BOARDS_PIMORONI_PICO_PLUS2_W_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) +pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1) + // For board detection #define PIMORONI_PICO_PLUS2_W_RP2350 @@ -78,7 +78,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -89,7 +89,7 @@ #define PICO_VSYS_PIN 43 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pimoroni_picolipo_16mb.h b/src/boards/include/boards/pimoroni_picolipo_16mb.h index ad5bdf37..d628b442 100644 --- a/src/boards/include/boards/pimoroni_picolipo_16mb.h +++ b/src/boards/include/boards/pimoroni_picolipo_16mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_PICOLIPO_16MB_H #define _BOARDS_PIMORONI_PICOLIPO_16MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_PICOLIPO_16MB @@ -74,7 +74,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_picolipo_4mb.h b/src/boards/include/boards/pimoroni_picolipo_4mb.h index 981156fc..1ea1beb9 100644 --- a/src/boards/include/boards/pimoroni_picolipo_4mb.h +++ b/src/boards/include/boards/pimoroni_picolipo_4mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_PICOLIPO_4MB_H #define _BOARDS_PIMORONI_PICOLIPO_4MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_PICOLIPO_4MB @@ -74,7 +74,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_picosystem.h b/src/boards/include/boards/pimoroni_picosystem.h index bacbd573..59b8322b 100644 --- a/src/boards/include/boards/pimoroni_picosystem.h +++ b/src/boards/include/boards/pimoroni_picosystem.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_PICOSYSTEM_H #define _BOARDS_PIMORONI_PICOSYSTEM_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_PICOSYSTEM @@ -91,7 +91,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_plasma2040.h b/src/boards/include/boards/pimoroni_plasma2040.h index c9937ef2..d9d7db7f 100644 --- a/src/boards/include/boards/pimoroni_plasma2040.h +++ b/src/boards/include/boards/pimoroni_plasma2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_PLASMA2040_H #define _BOARDS_PIMORONI_PLASMA2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_PLASMA2040 @@ -83,7 +83,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_plasma2350.h b/src/boards/include/boards/pimoroni_plasma2350.h index 7525a8a8..497bdbc8 100644 --- a/src/boards/include/boards/pimoroni_plasma2350.h +++ b/src/boards/include/boards/pimoroni_plasma2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/pimoroni_plasma2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_PIMORONI_PLASMA2350_H #define _BOARDS_PIMORONI_PLASMA2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define PIMORONI_PLASMA2350 @@ -104,12 +104,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pimoroni_servo2040.h b/src/boards/include/boards/pimoroni_servo2040.h index 21f7049d..55443c64 100644 --- a/src/boards/include/boards/pimoroni_servo2040.h +++ b/src/boards/include/boards/pimoroni_servo2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_SERVO2040_H #define _BOARDS_PIMORONI_SERVO2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_SERVO2040 @@ -104,7 +104,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_tiny2040.h b/src/boards/include/boards/pimoroni_tiny2040.h index 34e21f90..e3890208 100644 --- a/src/boards/include/boards/pimoroni_tiny2040.h +++ b/src/boards/include/boards/pimoroni_tiny2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_TINY2040_H #define _BOARDS_PIMORONI_TINY2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_TINY2040 #define PIMORONI_TINY2040_8MB @@ -92,7 +92,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_tiny2040_2mb.h b/src/boards/include/boards/pimoroni_tiny2040_2mb.h index 8e411cfd..f7b24725 100644 --- a/src/boards/include/boards/pimoroni_tiny2040_2mb.h +++ b/src/boards/include/boards/pimoroni_tiny2040_2mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_PIMORONI_TINY2040_2MB_H #define _BOARDS_PIMORONI_TINY2040_2MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define PIMORONI_TINY2040_2MB #define PIMORONI_TINY2040 @@ -92,7 +92,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/pimoroni_tiny2350.h b/src/boards/include/boards/pimoroni_tiny2350.h index bf00cbdb..94e522c7 100644 --- a/src/boards/include/boards/pimoroni_tiny2350.h +++ b/src/boards/include/boards/pimoroni_tiny2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/pimoroni_tiny2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_PIMORONI_TINY2350_H #define _BOARDS_PIMORONI_TINY2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define PIMORONI_TINY2350 #define PIMORONI_TINY2350_8MB @@ -84,12 +84,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/pololu_3pi_2040_robot.h b/src/boards/include/boards/pololu_3pi_2040_robot.h index 53e0db44..5479c0c8 100644 --- a/src/boards/include/boards/pololu_3pi_2040_robot.h +++ b/src/boards/include/boards/pololu_3pi_2040_robot.h @@ -9,18 +9,18 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_POLOLU_3PI_2040_ROBOT_H #define _BOARDS_POLOLU_3PI_2040_ROBOT_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define POLOLU_3PI_2040_ROBOT #define PICO_DEFAULT_LED_PIN 25 #define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 #define PICO_FLASH_SPI_CLKDIV 2 -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) // All boards have at least the B1 revision diff --git a/src/boards/include/boards/pololu_zumo_2040_robot.h b/src/boards/include/boards/pololu_zumo_2040_robot.h index 756b45a8..63abd1c2 100644 --- a/src/boards/include/boards/pololu_zumo_2040_robot.h +++ b/src/boards/include/boards/pololu_zumo_2040_robot.h @@ -9,18 +9,18 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_POLOLU_ZUMO_2040_ROBOT_H #define _BOARDS_POLOLU_ZUMO_2040_ROBOT_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define POLOLU_ZUMO_2040_ROBOT #define PICO_DEFAULT_LED_PIN 25 #define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 #define PICO_FLASH_SPI_CLKDIV 2 -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) // All boards have at least the B1 revision diff --git a/src/boards/include/boards/seeed_xiao_rp2040.h b/src/boards/include/boards/seeed_xiao_rp2040.h index efdb4cb1..a6b8f27d 100644 --- a/src/boards/include/boards/seeed_xiao_rp2040.h +++ b/src/boards/include/boards/seeed_xiao_rp2040.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SEEED_XIAO_RP2040_H #define _BOARDS_SEEED_XIAO_RP2040_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SEEED_XIAO_RP2040 @@ -90,7 +90,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/seeed_xiao_rp2350.h b/src/boards/include/boards/seeed_xiao_rp2350.h index 69a2ba40..949d6741 100644 --- a/src/boards/include/boards/seeed_xiao_rp2350.h +++ b/src/boards/include/boards/seeed_xiao_rp2350.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SEEED_XIAO_RP2350_H #define _BOARDS_SEEED_XIAO_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SEEED_XIAO_RP2350 @@ -140,12 +140,12 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/solderparty_rp2040_stamp.h b/src/boards/include/boards/solderparty_rp2040_stamp.h index af107f65..fc95bec0 100644 --- a/src/boards/include/boards/solderparty_rp2040_stamp.h +++ b/src/boards/include/boards/solderparty_rp2040_stamp.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/solderparty_rp2040_stamp.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SOLDERPARTY_RP2040_STAMP_H #define _BOARDS_SOLDERPARTY_RP2040_STAMP_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SOLDERPARTY_RP2040_STAMP @@ -73,7 +73,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/solderparty_rp2040_stamp_carrier.h b/src/boards/include/boards/solderparty_rp2040_stamp_carrier.h index 811f13c4..8711d38b 100644 --- a/src/boards/include/boards/solderparty_rp2040_stamp_carrier.h +++ b/src/boards/include/boards/solderparty_rp2040_stamp_carrier.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/solderparty_rp2040_stamp_carrier.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SOLDERPARTY_RP2040_STAMP_CARRIER_H #define _BOARDS_SOLDERPARTY_RP2040_STAMP_CARRIER_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SOLDERPARTY_RP2040_STAMP_CARRIER diff --git a/src/boards/include/boards/solderparty_rp2040_stamp_round_carrier.h b/src/boards/include/boards/solderparty_rp2040_stamp_round_carrier.h index 3dc0f601..4e908c30 100644 --- a/src/boards/include/boards/solderparty_rp2040_stamp_round_carrier.h +++ b/src/boards/include/boards/solderparty_rp2040_stamp_round_carrier.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/solderparty_rp2040_stamp_round_carrier.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SOLDERPARTY_RP2040_STAMP_ROUND_CARRIER_H #define _BOARDS_SOLDERPARTY_RP2040_STAMP_ROUND_CARRIER_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SOLDERPARTY_RP2040_STAMP_ROUND_CARRIER diff --git a/src/boards/include/boards/solderparty_rp2350_stamp.h b/src/boards/include/boards/solderparty_rp2350_stamp.h index bb2fd7b5..9ce3930c 100644 --- a/src/boards/include/boards/solderparty_rp2350_stamp.h +++ b/src/boards/include/boards/solderparty_rp2350_stamp.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/solderparty_rp2350_stamp.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SOLDERPARTY_RP2350_STAMP_H #define _BOARDS_SOLDERPARTY_RP2350_STAMP_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SOLDERPARTY_RP2350_STAMP @@ -73,12 +73,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/solderparty_rp2350_stamp_xl.h b/src/boards/include/boards/solderparty_rp2350_stamp_xl.h index 33233f7d..1904d844 100644 --- a/src/boards/include/boards/solderparty_rp2350_stamp_xl.h +++ b/src/boards/include/boards/solderparty_rp2350_stamp_xl.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/solderparty_rp2350_stamp_xl.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SOLDERPARTY_RP2350_STAMP_XL_H #define _BOARDS_SOLDERPARTY_RP2350_STAMP_XL_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SOLDERPARTY_RP2350_STAMP_XL @@ -73,12 +73,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/sparkfun_iotnode_lorawan_rp2350.h b/src/boards/include/boards/sparkfun_iotnode_lorawan_rp2350.h index 5bea33cc..e0e32978 100644 --- a/src/boards/include/boards/sparkfun_iotnode_lorawan_rp2350.h +++ b/src/boards/include/boards/sparkfun_iotnode_lorawan_rp2350.h @@ -12,11 +12,11 @@ // // This header may be included by other board headers as "boards/sparkfun_iotnode_lorawan_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SPARKFUN_IOTNODE_LORAWAN_RP2350_H #define _BOARDS_SPARKFUN_IOTNODE_LORAWAN_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SPARKFUN_IOTNODE_LORAWAN_RP2350 @@ -75,12 +75,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/sparkfun_iotredboard_rp2350.h b/src/boards/include/boards/sparkfun_iotredboard_rp2350.h index ac0972eb..0c1d425b 100644 --- a/src/boards/include/boards/sparkfun_iotredboard_rp2350.h +++ b/src/boards/include/boards/sparkfun_iotredboard_rp2350.h @@ -12,12 +12,12 @@ // // This header may be included by other board headers as "boards/sparkfun_iotredboard_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 -// pico_cmake_set PICO_CYW43_SUPPORTED = 1 - #ifndef _BOARDS_SPARKFUN_IOTREDBOARD_RP2350_H #define _BOARDS_SPARKFUN_IOTREDBOARD_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) +pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1) + // For board detection #define SPARKFUN_IOTREDBOARD_RP2350 @@ -85,7 +85,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -113,7 +113,7 @@ #define PICO_VSYS_PIN 46 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/sparkfun_micromod.h b/src/boards/include/boards/sparkfun_micromod.h index 5806bd19..9403baa2 100644 --- a/src/boards/include/boards/sparkfun_micromod.h +++ b/src/boards/include/boards/sparkfun_micromod.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/sparkfun_micromod.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SPARKFUN_MICROMOD_H #define _BOARDS_SPARKFUN_MICROMOD_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SPARKFUN_MICROMOD @@ -75,7 +75,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/sparkfun_promicro.h b/src/boards/include/boards/sparkfun_promicro.h index da48c45f..95d2da2c 100644 --- a/src/boards/include/boards/sparkfun_promicro.h +++ b/src/boards/include/boards/sparkfun_promicro.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/sparkfun_promicro.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SPARKFUN_PROMICRO_H #define _BOARDS_SPARKFUN_PROMICRO_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SPARKFUN_PROMICRO @@ -75,7 +75,7 @@ #endif // board has 16M onboard flash -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/sparkfun_promicro_rp2350.h b/src/boards/include/boards/sparkfun_promicro_rp2350.h index 8709e8dc..d247e597 100644 --- a/src/boards/include/boards/sparkfun_promicro_rp2350.h +++ b/src/boards/include/boards/sparkfun_promicro_rp2350.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/sparkfun_promicro_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SPARKFUN_PROMICRO_RP2350_H #define _BOARDS_SPARKFUN_PROMICRO_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SPARKFUN_PROMICRO_RP2350 @@ -73,7 +73,7 @@ #endif // board has 16M onboard flash -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -81,7 +81,7 @@ // --- RP2350 VARIANT --- #define PICO_RP2350A 1 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/sparkfun_thingplus.h b/src/boards/include/boards/sparkfun_thingplus.h index 1ed52b86..0928387f 100644 --- a/src/boards/include/boards/sparkfun_thingplus.h +++ b/src/boards/include/boards/sparkfun_thingplus.h @@ -14,11 +14,11 @@ // // This header may be included by other board headers as "boards/sparkfun_thingplus.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_SPARKFUN_THINGPLUS_H #define _BOARDS_SPARKFUN_THINGPLUS_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define SPARKFUN_THINGPLUS @@ -74,7 +74,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/sparkfun_thingplus_rp2350.h b/src/boards/include/boards/sparkfun_thingplus_rp2350.h index d023f943..5b77ef32 100644 --- a/src/boards/include/boards/sparkfun_thingplus_rp2350.h +++ b/src/boards/include/boards/sparkfun_thingplus_rp2350.h @@ -12,12 +12,12 @@ // // This header may be included by other board headers as "boards/sparkfun_thingplus_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 -// pico_cmake_set PICO_CYW43_SUPPORTED = 1 - #ifndef _BOARDS_SPARKFUN_THINGPLUS_RP2350_H #define _BOARDS_SPARKFUN_THINGPLUS_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) +pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1) + // For board detection #define SPARKFUN_THINGPLUS_RP2350 @@ -77,7 +77,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -114,7 +114,7 @@ #define CYW43_WL_GPIO_VBUS_PIN 2 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/sparkfun_xrp_controller.h b/src/boards/include/boards/sparkfun_xrp_controller.h index 70c2f13c..6b709955 100644 --- a/src/boards/include/boards/sparkfun_xrp_controller.h +++ b/src/boards/include/boards/sparkfun_xrp_controller.h @@ -12,12 +12,12 @@ // // This header may be included by other board headers as "boards/sparkfun_xrp_controller.h" -// pico_cmake_set PICO_PLATFORM=rp2350 -// pico_cmake_set PICO_CYW43_SUPPORTED = 1 - #ifndef _BOARDS_SPARKFUN_XRP_CONTROLLER_H #define _BOARDS_SPARKFUN_XRP_CONTROLLER_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) +pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1) + // For board detection #define SPARKFUN_XRP_CONTROLLER @@ -77,7 +77,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -90,7 +90,7 @@ #define CYW43_WL_GPIO_LED_PIN 0 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/switchscience_picossci2_conta_base.h b/src/boards/include/boards/switchscience_picossci2_conta_base.h index 638e47e5..6c84dd70 100644 --- a/src/boards/include/boards/switchscience_picossci2_conta_base.h +++ b/src/boards/include/boards/switchscience_picossci2_conta_base.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/switchscience_picossci2_conta_base.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SWITCHSCIENCE_PICOSSCI2_CONTA_BASE_H #define _BOARDS_SWITCHSCIENCE_PICOSSCI2_CONTA_BASE_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SWITCHSCIENCE_PICOSSCI2_CONTA_BASE @@ -74,12 +74,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/switchscience_picossci2_dev_board.h b/src/boards/include/boards/switchscience_picossci2_dev_board.h index b674362b..6c2e86a2 100644 --- a/src/boards/include/boards/switchscience_picossci2_dev_board.h +++ b/src/boards/include/boards/switchscience_picossci2_dev_board.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/switchscience_picossci2_dev_board.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SWITCHSCIENCE_PICOSSCI2_DEV_BOARD_H #define _BOARDS_SWITCHSCIENCE_PICOSSCI2_DEV_BOARD_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SWITCHSCIENCE_PICOSSCI2_DEV_BOARD @@ -75,12 +75,12 @@ #endif // board has 4MB onboard flash -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/switchscience_picossci2_micro.h b/src/boards/include/boards/switchscience_picossci2_micro.h index e1ccf359..e5521dc2 100644 --- a/src/boards/include/boards/switchscience_picossci2_micro.h +++ b/src/boards/include/boards/switchscience_picossci2_micro.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/switchscience_picossci2_micro.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SWITCHSCIENCE_PICOSSCI2_MICRO_H #define _BOARDS_SWITCHSCIENCE_PICOSSCI2_MICRO_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SWITCHSCIENCE_PICOSSCI2_MICRO @@ -61,12 +61,12 @@ #endif // board has 4MB onboard flash -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/switchscience_picossci2_rp2350_breakout.h b/src/boards/include/boards/switchscience_picossci2_rp2350_breakout.h index ec53d165..7f610612 100644 --- a/src/boards/include/boards/switchscience_picossci2_rp2350_breakout.h +++ b/src/boards/include/boards/switchscience_picossci2_rp2350_breakout.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/switchscience_picossci2_rp2350_breakout.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SWITCHSCIENCE_PICOSSCI2_RP2350_BREAKOUT_H #define _BOARDS_SWITCHSCIENCE_PICOSSCI2_RP2350_BREAKOUT_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SWITCHSCIENCE_PICOSSCI2_RP2350_BREAKOUT @@ -74,12 +74,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/switchscience_picossci2_tiny.h b/src/boards/include/boards/switchscience_picossci2_tiny.h index f422017b..a88ef990 100644 --- a/src/boards/include/boards/switchscience_picossci2_tiny.h +++ b/src/boards/include/boards/switchscience_picossci2_tiny.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/switchscience_picossci2_tiny.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_SWITCHSCIENCE_PICOSSCI2_TINY_H #define _BOARDS_SWITCHSCIENCE_PICOSSCI2_TINY_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define SWITCHSCIENCE_PICOSSCI2_TINY @@ -74,12 +74,12 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/tinycircuits_thumby_color_rp2350.h b/src/boards/include/boards/tinycircuits_thumby_color_rp2350.h index 58088e58..5725291c 100644 --- a/src/boards/include/boards/tinycircuits_thumby_color_rp2350.h +++ b/src/boards/include/boards/tinycircuits_thumby_color_rp2350.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/tinycircuits_thumby_color_rp2350.h" -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_TINYCIRCUITS_THUMBY_COLOR_RP2350_H #define _BOARDS_TINYCIRCUITS_THUMBY_COLOR_RP2350_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define TINYCIRCUITS_THUMBY_COLOR_RP2350 @@ -75,7 +75,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif @@ -93,7 +93,7 @@ #define PICO_VSYS_PIN 29 #endif -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_pico_cam_a.h b/src/boards/include/boards/waveshare_pico_cam_a.h index a8b3b40e..1bb1f7dd 100755 --- a/src/boards/include/boards/waveshare_pico_cam_a.h +++ b/src/boards/include/boards/waveshare_pico_cam_a.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_PICO_CAM_A_H #define _BOARDS_WAVESHARE_PICO_CAM_A_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_PICO_CAM_A @@ -68,7 +68,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_ble.h b/src/boards/include/boards/waveshare_rp2040_ble.h index 8a56e9c5..060d2152 100755 --- a/src/boards/include/boards/waveshare_rp2040_ble.h +++ b/src/boards/include/boards/waveshare_rp2040_ble.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_BLE_H #define _BOARDS_WAVESHARE_RP2040_BLE_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_BLE @@ -68,7 +68,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_eth.h b/src/boards/include/boards/waveshare_rp2040_eth.h index 8d3912e6..a2e95512 100755 --- a/src/boards/include/boards/waveshare_rp2040_eth.h +++ b/src/boards/include/boards/waveshare_rp2040_eth.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_ETH_H #define _BOARDS_WAVESHARE_RP2040_ETH_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_ETH @@ -68,7 +68,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_geek.h b/src/boards/include/boards/waveshare_rp2040_geek.h index cba41cf7..50d9af18 100755 --- a/src/boards/include/boards/waveshare_rp2040_geek.h +++ b/src/boards/include/boards/waveshare_rp2040_geek.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_GEEK_H #define _BOARDS_WAVESHARE_RP2040_GEEK_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_GEEK @@ -88,7 +88,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_lcd_0.96.h b/src/boards/include/boards/waveshare_rp2040_lcd_0.96.h index 267dc175..024db939 100644 --- a/src/boards/include/boards/waveshare_rp2040_lcd_0.96.h +++ b/src/boards/include/boards/waveshare_rp2040_lcd_0.96.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_LCD_0_96_H #define _BOARDS_WAVESHARE_RP2040_LCD_0_96_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_LCD_0_96 @@ -89,7 +89,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_lcd_1.28.h b/src/boards/include/boards/waveshare_rp2040_lcd_1.28.h index f88b9ed3..c219b03a 100644 --- a/src/boards/include/boards/waveshare_rp2040_lcd_1.28.h +++ b/src/boards/include/boards/waveshare_rp2040_lcd_1.28.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_LCD_1_28_H #define _BOARDS_WAVESHARE_RP2040_LCD_1_28_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_LCD_1_28 @@ -92,7 +92,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_matrix.h b/src/boards/include/boards/waveshare_rp2040_matrix.h index 9233a363..0b31d7f9 100755 --- a/src/boards/include/boards/waveshare_rp2040_matrix.h +++ b/src/boards/include/boards/waveshare_rp2040_matrix.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_MATRIX_H #define _BOARDS_WAVESHARE_RP2040_MATRIX_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_MATRIX @@ -69,7 +69,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_one.h b/src/boards/include/boards/waveshare_rp2040_one.h index 389d2992..5a48aee4 100644 --- a/src/boards/include/boards/waveshare_rp2040_one.h +++ b/src/boards/include/boards/waveshare_rp2040_one.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_ONE_H #define _BOARDS_WAVESHARE_RP2040_ONE_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_ONE @@ -68,7 +68,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_pizero.h b/src/boards/include/boards/waveshare_rp2040_pizero.h index 7c598fa5..be6b3c18 100755 --- a/src/boards/include/boards/waveshare_rp2040_pizero.h +++ b/src/boards/include/boards/waveshare_rp2040_pizero.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_PIZERO_H #define _BOARDS_WAVESHARE_RP2040_PIZERO_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_PIZERO @@ -65,7 +65,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_plus_16mb.h b/src/boards/include/boards/waveshare_rp2040_plus_16mb.h index 2d32acc9..9471c529 100644 --- a/src/boards/include/boards/waveshare_rp2040_plus_16mb.h +++ b/src/boards/include/boards/waveshare_rp2040_plus_16mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_PLUS_16MB_H #define _BOARDS_WAVESHARE_RP2040_PLUS_16MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_PLUS_16MB @@ -70,7 +70,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_plus_4mb.h b/src/boards/include/boards/waveshare_rp2040_plus_4mb.h index f5be6576..decdd19f 100644 --- a/src/boards/include/boards/waveshare_rp2040_plus_4mb.h +++ b/src/boards/include/boards/waveshare_rp2040_plus_4mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_PLUS_4MB_H #define _BOARDS_WAVESHARE_RP2040_PLUS_4MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_PLUS_4MB @@ -70,7 +70,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_power_management_hat_b.h b/src/boards/include/boards/waveshare_rp2040_power_management_hat_b.h index 8290eb02..e81ef6e1 100755 --- a/src/boards/include/boards/waveshare_rp2040_power_management_hat_b.h +++ b/src/boards/include/boards/waveshare_rp2040_power_management_hat_b.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_POWER_MANAGEMENT_HAT_B_H #define _BOARDS_WAVESHARE_RP2040_POWER_MANAGEMENT_HAT_B_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_POWER_MANAGEMENT_HAT_B @@ -65,7 +65,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_tiny.h b/src/boards/include/boards/waveshare_rp2040_tiny.h index 84f64628..6d21a5b5 100755 --- a/src/boards/include/boards/waveshare_rp2040_tiny.h +++ b/src/boards/include/boards/waveshare_rp2040_tiny.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_TINY_H #define _BOARDS_WAVESHARE_RP2040_TINY_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_TINY @@ -68,7 +68,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_touch_lcd_1.28.h b/src/boards/include/boards/waveshare_rp2040_touch_lcd_1.28.h index 35a34019..c785e4cb 100755 --- a/src/boards/include/boards/waveshare_rp2040_touch_lcd_1.28.h +++ b/src/boards/include/boards/waveshare_rp2040_touch_lcd_1.28.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_TOUCH_LCD_1_28_H #define _BOARDS_WAVESHARE_RP2040_TOUCH_LCD_1_28_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_TOUCH_LCD_1_28 @@ -93,7 +93,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2040_zero.h b/src/boards/include/boards/waveshare_rp2040_zero.h index 85be7c7f..9298f474 100644 --- a/src/boards/include/boards/waveshare_rp2040_zero.h +++ b/src/boards/include/boards/waveshare_rp2040_zero.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WAVESHARE_RP2040_ZERO_H #define _BOARDS_WAVESHARE_RP2040_ZERO_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WAVESHARE_RP2040_ZERO @@ -68,7 +68,7 @@ #define PICO_FLASH_SPI_CLKDIV 4 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/waveshare_rp2350_eth.h b/src/boards/include/boards/waveshare_rp2350_eth.h index f4aa7ee4..c90189aa 100755 --- a/src/boards/include/boards/waveshare_rp2350_eth.h +++ b/src/boards/include/boards/waveshare_rp2350_eth.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_ETH_H #define _BOARDS_WAVESHARE_RP2350_ETH_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_ETH @@ -72,14 +72,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_geek.h b/src/boards/include/boards/waveshare_rp2350_geek.h index ff065cbd..4c29348a 100755 --- a/src/boards/include/boards/waveshare_rp2350_geek.h +++ b/src/boards/include/boards/waveshare_rp2350_geek.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_GEEK_H #define _BOARDS_WAVESHARE_RP2350_GEEK_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_GEEK @@ -92,14 +92,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_lcd_0.96.h b/src/boards/include/boards/waveshare_rp2350_lcd_0.96.h index fd6c9f77..a54bd373 100755 --- a/src/boards/include/boards/waveshare_rp2350_lcd_0.96.h +++ b/src/boards/include/boards/waveshare_rp2350_lcd_0.96.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_LCD_0_96_H #define _BOARDS_WAVESHARE_RP2350_LCD_0_96_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_LCD_0_96 @@ -92,14 +92,14 @@ #define PICO_FLASH_SPI_CLKDIV 3 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_lcd_1.28.h b/src/boards/include/boards/waveshare_rp2350_lcd_1.28.h index 4d4e0e02..7c325193 100755 --- a/src/boards/include/boards/waveshare_rp2350_lcd_1.28.h +++ b/src/boards/include/boards/waveshare_rp2350_lcd_1.28.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_LCD_1_28_H #define _BOARDS_WAVESHARE_RP2350_LCD_1_28_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_LCD_1_28 @@ -97,14 +97,14 @@ #define PICO_FLASH_SPI_CLKDIV 3 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_one.h b/src/boards/include/boards/waveshare_rp2350_one.h index 937e1b68..93cb5553 100755 --- a/src/boards/include/boards/waveshare_rp2350_one.h +++ b/src/boards/include/boards/waveshare_rp2350_one.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_ONE_H #define _BOARDS_WAVESHARE_RP2350_ONE_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_ONE @@ -72,14 +72,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_plus_16mb.h b/src/boards/include/boards/waveshare_rp2350_plus_16mb.h index 8de280b1..c674b1b7 100755 --- a/src/boards/include/boards/waveshare_rp2350_plus_16mb.h +++ b/src/boards/include/boards/waveshare_rp2350_plus_16mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_PLUS_16MB_H #define _BOARDS_WAVESHARE_RP2350_PLUS_16MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_PLUS_16MB @@ -74,14 +74,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_plus_4mb.h b/src/boards/include/boards/waveshare_rp2350_plus_4mb.h index 3c8b9861..0ae163f9 100755 --- a/src/boards/include/boards/waveshare_rp2350_plus_4mb.h +++ b/src/boards/include/boards/waveshare_rp2350_plus_4mb.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_PLUS_4MB_H #define _BOARDS_WAVESHARE_RP2350_PLUS_4MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_PLUS_4MB @@ -74,14 +74,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_tiny.h b/src/boards/include/boards/waveshare_rp2350_tiny.h index 23af13c0..d66ee2dd 100755 --- a/src/boards/include/boards/waveshare_rp2350_tiny.h +++ b/src/boards/include/boards/waveshare_rp2350_tiny.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_TINY_H #define _BOARDS_WAVESHARE_RP2350_TINY_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_TINY @@ -72,14 +72,14 @@ #define PICO_FLASH_SPI_CLKDIV 3 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_touch_lcd_1.28.h b/src/boards/include/boards/waveshare_rp2350_touch_lcd_1.28.h index 52eea9eb..c8b4ce21 100755 --- a/src/boards/include/boards/waveshare_rp2350_touch_lcd_1.28.h +++ b/src/boards/include/boards/waveshare_rp2350_touch_lcd_1.28.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_TOUCH_LCD_1_28_H #define _BOARDS_WAVESHARE_RP2350_TOUCH_LCD_1_28_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_TOUCH_LCD_1_28 @@ -96,14 +96,14 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/waveshare_rp2350_zero.h b/src/boards/include/boards/waveshare_rp2350_zero.h index 10b5d8b9..43a96f7c 100755 --- a/src/boards/include/boards/waveshare_rp2350_zero.h +++ b/src/boards/include/boards/waveshare_rp2350_zero.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2350 - #ifndef _BOARDS_WAVESHARE_RP2350_ZERO_H #define _BOARDS_WAVESHARE_RP2350_ZERO_H +pico_board_cmake_set(PICO_PLATFORM, rp2350) + // For board detection #define WAVESHARE_RP2350_ZERO @@ -72,14 +72,14 @@ #define PICO_FLASH_SPI_CLKDIV 3 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif // Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) #define PICO_SMPS_MODE_PIN 23 -// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) #ifndef PICO_RP2350_A2_SUPPORTED #define PICO_RP2350_A2_SUPPORTED 1 #endif diff --git a/src/boards/include/boards/weact_studio_rp2040_16mb.h b/src/boards/include/boards/weact_studio_rp2040_16mb.h index c8d3aa2e..a27df8ef 100644 --- a/src/boards/include/boards/weact_studio_rp2040_16mb.h +++ b/src/boards/include/boards/weact_studio_rp2040_16mb.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/weact_studio_rp2040_16mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WEACT_STUDIO_RP2040_16MB_H #define _BOARDS_WEACT_STUDIO_RP2040_16MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WEACT_STUDIO_RP2040_16MB @@ -75,7 +75,7 @@ #define PICO_RP2040_B0_SUPPORTED 0 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (16 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/weact_studio_rp2040_2mb.h b/src/boards/include/boards/weact_studio_rp2040_2mb.h index 4b0c0059..c1fba01f 100644 --- a/src/boards/include/boards/weact_studio_rp2040_2mb.h +++ b/src/boards/include/boards/weact_studio_rp2040_2mb.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/weact_studio_rp2040_2mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WEACT_STUDIO_RP2040_2MB_H #define _BOARDS_WEACT_STUDIO_RP2040_2MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WEACT_STUDIO_RP2040_2MB @@ -75,7 +75,7 @@ #define PICO_RP2040_B0_SUPPORTED 0 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/weact_studio_rp2040_4mb.h b/src/boards/include/boards/weact_studio_rp2040_4mb.h index 405620d4..2557f1cb 100644 --- a/src/boards/include/boards/weact_studio_rp2040_4mb.h +++ b/src/boards/include/boards/weact_studio_rp2040_4mb.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/weact_studio_rp2040_4mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WEACT_STUDIO_RP2040_4MB_H #define _BOARDS_WEACT_STUDIO_RP2040_4MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WEACT_STUDIO_RP2040_4MB @@ -75,7 +75,7 @@ #define PICO_RP2040_B0_SUPPORTED 0 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/weact_studio_rp2040_8mb.h b/src/boards/include/boards/weact_studio_rp2040_8mb.h index 72778c17..f90934fc 100644 --- a/src/boards/include/boards/weact_studio_rp2040_8mb.h +++ b/src/boards/include/boards/weact_studio_rp2040_8mb.h @@ -11,11 +11,11 @@ // This header may be included by other board headers as "boards/weact_studio_rp2040_8mb.h" -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WEACT_STUDIO_RP2040_8MB_H #define _BOARDS_WEACT_STUDIO_RP2040_8MB_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WEACT_STUDIO_RP2040_8MB @@ -75,7 +75,7 @@ #define PICO_RP2040_B0_SUPPORTED 0 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (8 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) #endif diff --git a/src/boards/include/boards/wiznet_w5100s_evb_pico.h b/src/boards/include/boards/wiznet_w5100s_evb_pico.h index 0640eadf..9d33ffba 100644 --- a/src/boards/include/boards/wiznet_w5100s_evb_pico.h +++ b/src/boards/include/boards/wiznet_w5100s_evb_pico.h @@ -9,11 +9,11 @@ // SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES // ----------------------------------------------------- -// pico_cmake_set PICO_PLATFORM=rp2040 - #ifndef _BOARDS_WIZNET_W5100S_EVB_PICO_H #define _BOARDS_WIZNET_W5100S_EVB_PICO_H +pico_board_cmake_set(PICO_PLATFORM, rp2040) + // For board detection #define WIZNET_W5100S_EVB_PICO @@ -89,7 +89,7 @@ #define PICO_FLASH_SPI_CLKDIV 2 #endif -// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (2 * 1024 * 1024) +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) #ifndef PICO_FLASH_SIZE_BYTES #define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) #endif diff --git a/src/common/pico_base_headers/include/pico.h b/src/common/pico_base_headers/include/pico.h index 3b0f2f14..2f33f19e 100644 --- a/src/common/pico_base_headers/include/pico.h +++ b/src/common/pico_base_headers/include/pico.h @@ -26,6 +26,35 @@ #include "pico/types.h" #include "pico/version.h" +/** + * \brief A marker used in board headers to specify a CMake variable and value that should be set in the CMake build when the board header is used + * \ingroup pico_base + * + * Based on the PICO_BOARD CMake variable, the build will scan the board header for `pico_board_cmake_set(var, value)` and set these variables + * very early in the build configuration process. This allows setting CMake variables like `PICO_PLATFORM` from the board header, and thus + * affecting, for example, the choice of compiler made by the build + * + * \note use of this macro will overwrite the CMake variable if it is already set + * + * \note this macro's definition is empty as it is not intended to have any effect on actual compilation + */ +#define pico_board_cmake_set(x, y) + +/** + * \brief A marker used in board headers to specify a CMake variable and value that should be set in the CMake build when the board header is used, + * if that CMake variable has not already been set + * \ingroup pico_base + * + * Based on the PICO_BOARD CMake variable, the build will scan the board header for `pico_board_cmake_set_default(var, value)` and set these variables + * very early in the build configuration process. This allows setting CMake variables like `PICO_PLATFORM` from the board header, and thus + * affecting, for example, the choice of compiler made by the build + * + * \note use of this macro will not overwrite the CMake variable if it is already set + * + * \note this macro's definition is empty as it is not intended to have any effect on actual compilation + */ +#define pico_board_cmake_set_default(x, y) + // PICO_CONFIG: PICO_CONFIG_HEADER, Unquoted path to header include in place of the default pico/config.h which may be desirable for build systems which can't easily generate the config_autogen header, group=pico_base #ifdef PICO_CONFIG_HEADER #include __PICO_XSTRING(PICO_CONFIG_HEADER) diff --git a/src/rp2350/boot_stage2/include/boot_stage2/config.h b/src/rp2350/boot_stage2/include/boot_stage2/config.h index 61f9b9b5..a73778af 100644 --- a/src/rp2350/boot_stage2/include/boot_stage2/config.h +++ b/src/rp2350/boot_stage2/include/boot_stage2/config.h @@ -9,7 +9,7 @@ // NOTE THIS HEADER IS INCLUDED FROM ASSEMBLY -#include "pico/config.h" +#include "pico.h" // PICO_CONFIG: PICO_BUILD_BOOT_STAGE2_NAME, Name of the boot stage 2 if selected in the build system, group=boot_stage2 #ifdef PICO_BUILD_BOOT_STAGE2_NAME diff --git a/tools/check_board_header.py b/tools/check_board_header.py index 3bfce1c5..4f2e44e2 100755 --- a/tools/check_board_header.py +++ b/tools/check_board_header.py @@ -75,8 +75,8 @@ def read_defines_from(header_file, defines_dict): # strip trailing comments line = re.sub(r"(?<=\S)\s*//.*$", "", line) - # look for "// pico_cmake_set BLAH_BLAH=42" - m = re.match(r"^\s*//\s*pico_cmake_set\s+(\w+)\s*=\s*(.+?)\s*$", line) + # look for "pico_board_cmake_set(BLAH_BLAH, 42)" + m = re.match(r"^\s*pico_board_cmake_set\s*\(\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*,\s*(.*)\s*\)\s*$", line) if m: #print(m.groups()) name = m.group(1) @@ -87,16 +87,16 @@ def read_defines_from(header_file, defines_dict): # check for multiply-defined values if name in cmake_settings: if cmake_settings[name].value != value: - raise Exception("{}:{} Conflicting values for pico_cmake_set {} ({} and {})".format(board_header, lineno, name, cmake_settings[name].value, value)) + raise Exception("{}:{} Conflicting values for pico_board_cmake_set {} ({} and {})".format(board_header, lineno, name, cmake_settings[name].value, value)) else: if show_warnings: - warnings.warn("{}:{} Multiple values for pico_cmake_set {} ({} and {})".format(board_header, lineno, name, cmake_settings[name].value, value)) + warnings.warn("{}:{} Multiple values for pico_board_cmake_set {} ({} and {})".format(board_header, lineno, name, cmake_settings[name].value, value)) else: cmake_settings[name] = DefineType(name, value, None, lineno) continue - # look for "// pico_cmake_set_default BLAH_BLAH=42" - m = re.match(r"^\s*//\s*pico_cmake_set_default\s+(\w+)\s*=\s*(.+?)\s*$", line) + # look for "pico_board_cmake_set_default(BLAH_BLAH, 42)" + m = re.match(r"^\s*pico_board_cmake_set_default\s*\(\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*,\s*(.*)\s*\)\s*$", line) if m: #print(m.groups()) name = m.group(1) @@ -223,8 +223,8 @@ with open(board_header) as header_fh: raise Exception("{}:{} Suggests including \"{}\" but file is named \"{}\"".format(board_header, lineno, include_suggestion, expected_include_suggestion)) continue - # look for "// pico_cmake_set BLAH_BLAH=42" - m = re.match(r"^\s*//\s*pico_cmake_set\s+(\w+)\s*=\s*(.+?)\s*$", line) + # look for "pico_board_cmake_set(BLAH_BLAH, 42)" + m = re.match(r"^\s*pico_board_cmake_set\s*\(\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*,\s*(.*)\s*\)\s*$", line) if m: #print(m.groups()) name = m.group(1) @@ -234,7 +234,7 @@ with open(board_header) as header_fh: raise Exception("{}:{} Expected \"{}\" to be all uppercase".format(board_header, lineno, name)) # check for multiply-defined values if name in cmake_settings: - raise Exception("{}:{} Multiple values for pico_cmake_set {} ({} and {})".format(board_header, lineno, name, cmake_settings[name].value, value)) + raise Exception("{}:{} Multiple values for pico_board_cmake_set {} ({} and {})".format(board_header, lineno, name, cmake_settings[name].value, value)) else: if value: try: @@ -245,8 +245,8 @@ with open(board_header) as header_fh: cmake_settings[name] = DefineType(name, value, None, lineno) continue - # look for "// pico_cmake_set_default BLAH_BLAH=42" - m = re.match(r"^\s*//\s*pico_cmake_set_default\s+(\w+)\s*=\s*(.+?)\s*$", line) + # look for "pico_board_cmake_set_default(BLAH_BLAH, 42)" + m = re.match(r"^\s*pico_board_cmake_set_default\s*\(\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*,\s*(.*)\s*\)\s*$", line) if m: #print(m.groups()) name = m.group(1) @@ -256,7 +256,7 @@ with open(board_header) as header_fh: raise Exception("{}:{} Expected \"{}\" to be all uppercase".format(board_header, lineno, name)) # check for multiply-defined values if name in cmake_default_settings: - raise Exception("{}:{} Multiple values for pico_cmake_set_default {} ({} and {})".format(board_header, lineno, name, cmake_default_settings[name].value, value)) + raise Exception("{}:{} Multiple values for pico_board_cmake_set_default {} ({} and {})".format(board_header, lineno, name, cmake_default_settings[name].value, value)) else: if value: try: @@ -382,7 +382,7 @@ if board_header_basename == "none.h": else: for setting in compulsory_cmake_settings: if setting not in cmake_settings: - raise Exception("{} is missing a pico_cmake_set {} comment".format(board_header, setting)) + raise Exception("{} is missing a pico_board_cmake_set {} comment".format(board_header, setting)) if cmake_settings['PICO_PLATFORM'].value == "rp2040": chip = 'RP2040' other_chip = 'RP2350' @@ -399,22 +399,22 @@ else: chip = 'RP2350B' if not board_header.endswith("amethyst_fpga.h"): if 'PICO_RP2350_A2_SUPPORTED' not in cmake_default_settings: - raise Exception("{} uses chip {} but is missing a pico_cmake_set_default {} comment".format(board_header, chip, 'PICO_RP2350_A2_SUPPORTED')) + raise Exception("{} uses chip {} but is missing a pico_board_cmake_set_default {} comment".format(board_header, chip, 'PICO_RP2350_A2_SUPPORTED')) if 'PICO_RP2350_A2_SUPPORTED' not in defines: raise Exception("{} uses chip {} but is missing a #define {}".format(board_header, chip, 'PICO_RP2350_A2_SUPPORTED')) if defines['PICO_RP2350_A2_SUPPORTED'].resolved_value != 1: raise Exception("{} sets #define {} {} (should be 1)".format(board_header, chip, 'PICO_RP2350_A2_SUPPORTED', defines['PICO_RP2350_A2_SUPPORTED'].resolved_value)) for setting in compulsory_cmake_default_settings: if setting not in cmake_default_settings: - raise Exception("{} is missing a pico_cmake_set_default {} comment".format(board_header, setting)) + raise Exception("{} is missing a pico_board_cmake_set_default {} comment".format(board_header, setting)) for setting in matching_cmake_default_settings: if setting in cmake_default_settings and setting not in defines: - raise Exception("{} has pico_cmake_set_default {} but is missing a matching #define".format(board_header, setting)) + raise Exception("{} has pico_board_cmake_set_default {} but is missing a matching #define".format(board_header, setting)) elif setting in defines and setting not in cmake_default_settings: - raise Exception("{} has #define {} but is missing a matching pico_cmake_set_default comment".format(board_header, setting)) + raise Exception("{} has #define {} but is missing a matching pico_board_cmake_set_default comment".format(board_header, setting)) elif setting in defines and setting in cmake_default_settings: if cmake_default_settings[setting].value != defines[setting].resolved_value: - raise Exception("{} has mismatched pico_cmake_set_default and #define values for {}".format(board_header, setting)) + raise Exception("{} has mismatched pico_board_cmake_set_default and #define values for {}".format(board_header, setting)) for setting in compulsory_defines: if setting not in defines: raise Exception("{} is missing a #define {}".format(board_header, setting))