Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4060

SDK • Re: What is the -D PICO_BOARD for Zero ?

$
0
0
Be aware of this issue.
Carrier boards with various RP2 boards added was something I tried to address when the Pico W emerged, and it might be worth revisiting that again now Pico 2, Pico 2W, Pimoroni Pico Plus 2, Pimoroni Pico Plus 2W, and other same footprint boards have arrived.

The way I did it was to create multiple "<carrier_board>_with_<rp2_module>.h" definition files which were entirely self contained, then they could be built using that board and module name, for example "-DPICO_BOARD=vgaboard_with_pico_2w".

The advantage of that approach was that it only had to be done once, whenever the SDK updated, or you added your own, it worked with the older SDK without any additional 'cmake' or SDK changes - Fitted KISS perfectly.

That, I thought, was "job done" at the time, but I hadn't considered "// pico_cmake_set", which I would have discarded as just another unimportant comment, nor what whatever uses those (*) would do when they were in my combined files, if multiples of the same were included.

To create the files I had a Python program and a 'carrier_boards.txt' file which specified what needed creating, abridged -

Code:

vgaboard    pico    pico_w
That would also work for things like Solder Party boards where the modules their carriers accept aren't Pico-range footprint but their own RP2 modules.

It's all easy enough with just two levels of depth but might need some work if deeper.

There also needs to be some tweaking to deal with carrier boards which are named as per a particular RP2 module which could be using some other RP2 module.

(*) What does use the "// pico_cmake_set" comments and its friends ?

Statistics: Posted by hippy — Tue Dec 24, 2024 7:43 pm



Viewing all articles
Browse latest Browse all 4060

Trending Articles