Skip to content

Commit 2692d9a

Browse files
authored
Propogate changed pico_cmake_set_default values to the compilation (#2034)
* Propogate non-default pico_cmake_set_default values through to compile definitions Add PICO_BOARD_CMAKE_OVERRIDES common scope variable, to contain any pico_cmake_set_default CMake variables which have been overwritten. This allows passing CMake arguments to the build, without needing extra target_compile_definitions. Also add pico_cmake_set_default PICO_RP2350_A2_SUPPORTED to enable/disable the E10 abs-block fix * Fix more board files missing pico_cmake_set_default PICO_RP2350_A2_SUPPORTED * Apply @lurch's patch to check_board_header.py
1 parent 338f99f commit 2692d9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+84
-11
lines changed

cmake/generic_board.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ if (EXISTS ${PICO_BOARD_HEADER_FILE})
2626
if (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set_default[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ \t\]*(.*)")
2727
if (NOT DEFINED "${CMAKE_MATCH_1}")
2828
set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
29+
else()
30+
list(APPEND PICO_BOARD_CMAKE_OVERRIDES ${CMAKE_MATCH_1})
2931
endif()
3032
endif()
3133
endwhile()

pico_sdk_init.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ if (NOT TARGET _pico_sdk_pre_init_marker)
7575
PICO_SDK_POST_LIST_FILES
7676
PICO_CONFIG_HEADER_FILES
7777
PICO_RP2040_CONFIG_HEADER_FILES
78+
PICO_BOARD_CMAKE_OVERRIDES
7879
)
7980

8081
macro(pico_promote_common_scope_vars)

src/boards/include/boards/adafruit_feather_rp2350.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024)
7979
#endif
8080

81+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
8182
#ifndef PICO_RP2350_A2_SUPPORTED
8283
#define PICO_RP2350_A2_SUPPORTED 1
8384
#endif

src/boards/include/boards/datanoisetv_rp2350_dsp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024)
4949
#endif
5050

51+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
5152
#ifndef PICO_RP2350_A2_SUPPORTED
5253
#define PICO_RP2350_A2_SUPPORTED 1
5354
#endif

src/boards/include/boards/defcon32_badge.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
#define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024)
109109
#endif
110110

111+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
111112
#ifndef PICO_RP2350_A2_SUPPORTED
112113
#define PICO_RP2350_A2_SUPPORTED 1
113114
#endif

src/boards/include/boards/gen4_rp2350_24.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
7777
#endif
7878

79+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
7980
#ifndef PICO_RP2350_A2_SUPPORTED
8081
#define PICO_RP2350_A2_SUPPORTED 1
8182
#endif

src/boards/include/boards/gen4_rp2350_24ct.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
7777
#endif
7878

79+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
7980
#ifndef PICO_RP2350_A2_SUPPORTED
8081
#define PICO_RP2350_A2_SUPPORTED 1
8182
#endif

src/boards/include/boards/gen4_rp2350_24t.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
7777
#endif
7878

79+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
7980
#ifndef PICO_RP2350_A2_SUPPORTED
8081
#define PICO_RP2350_A2_SUPPORTED 1
8182
#endif

src/boards/include/boards/gen4_rp2350_28.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
7777
#endif
7878

79+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
7980
#ifndef PICO_RP2350_A2_SUPPORTED
8081
#define PICO_RP2350_A2_SUPPORTED 1
8182
#endif

src/boards/include/boards/gen4_rp2350_28ct.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
7777
#endif
7878

79+
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
7980
#ifndef PICO_RP2350_A2_SUPPORTED
8081
#define PICO_RP2350_A2_SUPPORTED 1
8182
#endif

0 commit comments

Comments
 (0)