1
0
mirror of https://github.com/raspberrypi/pico-sdk.git synced 2025-08-06 06:02:39 +03:00

9 Commits

Author SHA1 Message Date
will-v-pi
6f856ee4eb Add Board Header Check Action (#2519)
* Add action to check board headers when modified

* Fix invalid escape warning

* Check for more board header errors before exiting script

* Also run when action file changes

* Add back newline at end of check_all_board_headers.sh

* Remove python install step

* `e.__str__()` -> `str(e)`
2025-06-26 09:59:32 -05:00
Andrew Scheller
082d9f75cd More board-header checks (followup to #2397) (#2442)
- make the error messages less misleading
- suggest replacing the old comment-style syntax with the new macro-style syntax
2025-04-26 12:15:26 -05:00
Graham Sanderson
fed7188e52 Rework use of pico_cmake_set in board headers to make it slightly less magic/confusing (#2397)
* Rework use of pico_cmake_set in board headers to make it slightly less magic/confusing

- prefer "pico_cmake_set(var, value)" over "// pico_cmake_set var = value"
- prefer "pico_cmake_set_default(var, value)" over "// pico_cmake_set_default var = value"
- move these inside the header include guards as CLion complains

Note that the macros are defined in "pico.h" however that is not explicitly included by the board headers; this
will probably confuse some VS code syntax highligting, so lets see how it looks - i'd prefer to avoid having
to include a header just for this

* Update check_board_header.py with the new pico_cmake_set formats

* Add brackets back around `PICO_FLASH_SIZE_BYTES` settings

The python script checks for an exact match between the #define and the pico_cmake_set_default, so fails without the brackets

* Rename to pico_board_cmake_set and pico_board_cmake_set_default

* Fix support for old versions

---------

Co-authored-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>
2025-04-14 08:50:25 -07:00
Andrew Scheller
c88bd53a68 Ensure that all RP2350 board-headers explicitly define PICO_RP2350A (#2370) 2025-04-04 11:35:42 -05:00
Andrew Scheller
3751bc5f98 Check for the misuse of '#define PICO_RP2350B' in board headers (#2290) 2025-03-18 13:31:21 -05:00
will-v-pi
2692d9a4cb 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
2024-11-21 17:47:51 -06:00
Andrew Scheller
9a41722dd3 More board header checks (#1814)
* Modify check_board_header.py to work with both RP2040- and RP2350-based boards

* Tweaks to the board-header files so that they pass check_board_header.py

* Update tools/check_board_header.py
so that it handles pico_cmake_set_default the same way as cmake/generic_board.cmake does
2024-08-20 12:47:20 -05:00
Andrew Scheller
9f85f25640 Add extra checks to check_board_header.py (#1775)
* Small whitespace fixup

* typo bugfix

* Small refactoring of check_board_header.py

* Make structure of rp2040_interface_pins.json more explicit, so that it can be more easily extended

* Move definition of valid-pins from python to json

* Check that each interface includes all (minimally) expected pins
Note that UART_CTS, UART_RTS & SPI_CSN are classed as optional

* Split "expected_functions" into "required" (all of these pins must be present) and "one_of" (at least one of these pins must be present)
2024-07-25 09:47:26 -05:00
Andrew Scheller
0e5cef3ffa Boards header updates (#1724)
* Add script to automatically validate board header files

* Fix small automatically-found inconsistencies in various board header files

* Tweak and add board header file from abandoned PR #1174
2024-06-21 14:26:45 -05:00