diff --git a/cmake/generic_board.cmake b/cmake/generic_board.cmake index c7fdfe5a0..9dd917d50 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 e06c552b5..2f075c063 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 c9a6d618d..bbbb80182 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 6175b9423..684f3d1f9 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 75aaaf902..08227df8a 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 ee5cf9cd4..5bd06ca77 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 f63fc77e3..affb90cbb 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 672ada963..1b61d1314 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 722d23003..60c891595 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 06e294940..4af1809ce 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 190a07675..fbe7bd25a 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 13b7d7ea0..076cfe096 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 9cd3035f5..57d5e0c1d 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 9d2f0eb69..52be09cad 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 ae583baa4..6084efe26 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 feb5792c0..1195e3c1e 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 3466fc711..ce18d6157 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 52a530813..2121628d4 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 e0fcab1ff..e10fc35ab 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 132dc0c90..a8bc8e571 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 479e11050..d7f19f348 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 3df871988..f1e72dac0 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 d245c8209..190cefe40 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 ec479653e..06e0bb1d0 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 71b8f2e66..864a023ec 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 df086fae5..129fec9c8 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 b460b8780..39cef5c90 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 11153e143..e581a97c4 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 c948c9eb1..a2c3af327 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 896937744..2adc570ea 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 0e137357e..9624c2d36 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 6280f0d7d..a335e6233 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 d26f53034..2dd4eca69 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 8576ac503..fbdd13d40 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 ee8cb2385..bec4bfd39 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 9f43803e6..5f9ceca13 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 63753bcca..b2be28d3a 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 92d8960b8..97645a456 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 1278209b8..b056cbcab 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 197a024ec..f9b76a805 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 8b45829b7..f624750cf 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 e86492b39..03e6568f4 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 49059c9ab..6a2f8564e 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 a91d893ff..9998e92e3 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 4de560f44..09bd7724d 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 58bb1adc8..d9e6b3149 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 7012ac141..c0a5a9cb9 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 9c0dd62f2..3ae5c67ae 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 800feb364..6eb8600b6 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 4dbb232d2..9998939ea 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 42acdc4cc..74f5a739b 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 250662f1b..6e825f680 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 d05c4d4b5..d4e8a34bd 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 e7baa07b2..067632c0b 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 083140294..e661b9e9d 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 e183090c3..1e202f6e2 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 25b9dd2b5..a33831fe5 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 1bd02dc48..7849444f5 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 40fff17d7..6cae74b11 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 7a4f1741f..7f125aaa0 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 ad5bdf37c..d628b4422 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 981156fc3..1ea1beb91 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 bacbd5734..59b8322b6 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 c9937ef2f..d9d7db7f8 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 7525a8a84..497bdbc80 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 21f7049d7..55443c641 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 34e21f908..e38902083 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 8e411cfdb..f7b24725d 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 bf00cbdb9..94e522c7e 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 53e0db449..5479c0c83 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 756b45a82..63abd1c24 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 efdb4cb18..a6b8f27d4 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 69a2ba40b..949d6741d 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 af107f65a..fc95bec08 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 811f13c46..8711d38bc 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 3dc0f6013..4e908c302 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 bb2fd7b52..9ce3930c3 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 33233f7d6..1904d8448 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 5bea33cc4..e0e329786 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 ac0972eb2..0c1d425bc 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 5806bd19e..9403baa26 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 da48c45f8..95d2da2cd 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 8709e8dca..d247e597b 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 1ed52b86c..0928387f8 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 d023f943e..5b77ef324 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 70c2f13c7..6b7099559 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 638e47e57..6c84dd708 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 b674362bd..6c2e86a29 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 e1ccf359a..e5521dc20 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 ec53d1658..7f6106129 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 f422017bd..a88ef9905 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 58088e581..5725291c9 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 a8b3b40e8..1bb1f7dd0 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 8a56e9c58..060d2152c 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 8d3912e60..a2e955120 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 cba41cf7f..50d9af18f 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 267dc1753..024db9399 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 f88b9ed3d..c219b03a2 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 9233a3639..0b31d7f91 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 389d2992d..5a48aee43 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 7c598fa59..be6b3c185 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 2d32acc9c..9471c529d 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 f5be65768..decdd19f1 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 8290eb022..e81ef6e1b 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 84f646280..6d21a5b5f 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 35a340197..c785e4cb0 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 85be7c7f9..9298f474e 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 f4aa7ee48..c90189aad 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 ff065cbda..4c29348aa 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 fd6c9f778..a54bd3739 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 4d4e0e022..7c325193b 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 937e1b682..93cb5553c 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 8de280b1c..c674b1b74 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 3c8b98617..0ae163f9f 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 23af13c0f..d66ee2dda 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 52eea9eb4..c8b4ce21c 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 10b5d8b91..43a96f7c5 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 c8d3aa2ef..a27df8ef0 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 4b0c00590..c1fba01f8 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 405620d47..2557f1cbf 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 72778c178..f90934fc3 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 0640eadfb..9d33ffba7 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 3b0f2f14a..2f33f19e7 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 61f9b9b53..a73778af6 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 3bfce1c5b..4f2e44e2f 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 @@ def read_defines_from(header_file, defines_dict): 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 @@ def read_defines_from(header_file, defines_dict): 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 @@ def read_defines_from(header_file, defines_dict): 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 @@ def read_defines_from(header_file, defines_dict): 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 @@ def read_defines_from(header_file, defines_dict): 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 @@ def read_defines_from(header_file, defines_dict): 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))