23 Commits

Author SHA1 Message Date
William Vinnicombe
c37cc02b51 Fix support for old versions 2025-04-09 17:38:30 +01:00
William Vinnicombe
62671a806d Rename to pico_board_cmake_set and pico_board_cmake_set_default 2025-04-09 11:45:40 +01:00
graham sanderson
c74a695dc3 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
2025-04-04 12:56:36 -05:00
will-v-pi
3241bdc2f5
Fix PICO_PREVIOUS_PLATFORM error (#2357)
`INTERNAL` should be the type of the variable, not placed at the end of the `set` invocation - it implies `FORCE`
2025-03-18 14:18:37 -05:00
Graham Sanderson
eb5c2c3ff0
Clang related fixes (#2231)
* workaround change in llvm picked up by llvm ETA 19

* fix clang compilation not including floating point instructions in build output
2025-02-05 10:55:10 -06: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
78533ec119
Specify minimum cmake version for generic_board.cmake (#1879) 2024-09-27 23:53:44 -05:00
Andrew Scheller
d639292fea
Update extract configs (#1845)
* Update config-extraction scripts to work with multiple chips

* Standardise wording between common options

* Various config-related fixes

* Update pico_rand to use correct busctrl_hw struct-name

* Don't start config descriptions with "The ..."
2024-08-27 11:11:42 -05:00
Andrew Scheller
a700b7784b
Small pico_pre_load_platform.cmake tweak (#1867)
Make one of the messages more accurate, in the event that the user changes `PICO_DEFAULT_RP2350_PLATFORM`
2024-08-24 15:03:54 -05:00
will-v-pi
a6f21b6e10
Include Platform Paths files for the host (#1826)
This fixes searching for installed picotool/pioasm on Windows, and generally improves default find_package behaviour
2024-08-15 11:29:22 -05:00
graham sanderson
efe2103f9b SDK 2.0.0 release 2024-08-08 08:54:38 -05:00
Peter S. Hollander
2de70c79c2
Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags (#1620)
* Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags

Setting CMAKE_${LANG}_FLAGS_DEBUG_INIT specifically only sets the flags for the Debug config the first time it is configured by CMake, pulling the initially-configured flags from CMakeCache.txt on subsequent configurations. This causes PICO_DEOPTIMIZED_DEBUG to not have any effect after the initial configuration, causing breakpoint issues when debugging certain functions.

Clearing the cache of the debug flags allows the flags to be updated every configuration, and appended to appropriately (such as with "-g").

See Issue #1618 and the comments of Pull Request #1620 for further details.

Fixes #1618
2024-06-21 14:37:33 -05:00
Andrew Scheller
115eae7c66
Add scripts to extract PICO_CMAKE_CONFIG and PICO_BUILD_DEFINE entries (#1708)
Tidy up a couple of PICO_CMAKE_CONFIG and PICO_BUILD_DEFINE entries
2024-06-04 19:59:28 -05:00
Graham Sanderson
1ac90374e3
Various small fixes towards building with other compilers (#1285)
* Fix various non-GCC warnings (no effect on GCC)
* Reduce use of typeof since non GCC compilers may not support it
* Introduce PICO_C_COMPILER_IS_GNU, PICO_C_COMPILER_IS_CLANG, PICO_C_COMPILER_IS_IAR to CMake as if (CMAKE_C_COMPILER_ID STREQUAL "xxx") is a bit verbose
* Use "unified_asm" macro for all inline asm (it is "volatile __asm" on GNU with a .syntex unified)
* Use NOLOAD instead of COPY in linker scripts (arguably more correct anyway)
* Use the same style for setting _etext in all 4 linker scripts (to the beginning of .data). Clang aligns .data on a 16 byte boundary. Note ideally we'd
  add a new symbol __data_source, however that would break backwards compatibility with existing user linker scripts
* Use "a" for .stack, .heap sections because clang complains otherwise, and they are explicitly NOLOAD anyway
* Avoid duplicating __sev, __wfe, __wfi which Clang sometimes seems to provide as built-ins
* Add missing kitchen_sink_blocked_ram binary
* Allow build with LLVM Embedded Toolchain Form ARM v 14.0.0 (unsupported atm)
2023-03-01 15:10:18 -06:00
Flaviu Tamas
74b6c1ccc3
Re-enable compiler checks (#1097)
Add a -nostdlib specifically for the check to ensure that it builds
successfully.

The -nostdlib isn't needed normally, because linking against the pico
SDK will add in definitions for the previously-missing function
2023-02-05 16:34:24 -06:00
Andrew Scheller
17c759b6e9
Fix various typos in CMake CONFIG lines. Also add a script that found some of these errors. (#907) 2022-08-02 07:28:37 -05:00
Graham Sanderson
5afa3636d6
Small API additions and minor fixes (#406)
* Add missing DREQ_s

* store actual clock frequency in clock_configure (fixes #368)

* use dma DREQ values defined in dreqs/dma.h

* Fix hw_is_claimed, and add xxx_is_claimed APIs

* Add some PIO irq helper methods

* Add DMA channel IRQ status getter and clear methods

* Implement the correct PIO IRQ status/clear methods (good to have methods here as the h/w interrupt registers are super confusing)

* fix pico_multicore dependencies

* add missing wrapper func __aeabi_f2d

* Further DMA/PIO IRQ API cleanup (and review fixes)

* add PICO_INT64_OPS_IN_RAM flag
2021-06-02 13:12:27 -05:00
Jonathan Reichelt Gjertsen
a531123080
Prevent the literal string DEBUG from being appended to some messages in CMake < 3.15 (#433)
Fixes issue #422
2021-05-25 17:10:55 -05:00
Graham Sanderson
18c39856bd
Some cmake build improvements (#376)
* Change some cmake output to DEBUG level
Make SDK build more consistent with other libraries (use an INTERFACE marker library for inclusion tests)
Add PICO_SDK_PRE_LIST_FILES, PICO_SDK_POST_LIST_FILES build vars

* fix typo

* remove leftover debugging message
2021-05-04 08:40:11 -05:00
Graham Sanderson
b6f812f647
Change various (confusing to user) message to be DEBUG only (#365) 2021-05-04 08:01:11 -05:00
José Simões
304ab7dd92
Fix loading of PICO_TOOLCHAIN_PATH (#262)
- Add double quotes because build option it's a string.
- Remove comment as requested by @kilograham.
- Resolves #258.
2021-03-18 15:02:21 -05:00
Graham Sanderson
fe3408b286
Small fixes (#260)
* pico_stdio_usb: be more explicit about includes, fix warning (#257)

* pico_base: NDEBUG backwards for absolute_time_t (#255)

* pico_util: missing extern C in queue.h (#249)

* build: remove -march which was masking -mcpu, now SVC available (#253)
2021-03-17 18:05:48 +00:00
graham sanderson
26653ea81e Initial Release 2021-01-20 10:44:27 -06:00