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.Be aware of this issue.
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
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