-
Notifications
You must be signed in to change notification settings - Fork 75
Correct build.variant to match pico-sdk names #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
In pidosdk.py:19 the check for header isfile(join(FRAMEWORK_DIR, "src", "boards", "include", "boards", header)): fails, as pico-sdk names boards using the dot. Otherwise (and without warning) the pico.h header is chosen, leading to false assumptions (e.g. about PICO_DEFAULT_LED_PIN)
Mhm, sadly that's not the right approach -- the Changing the variant to e.g. All these board JSON files are automatically generated by makeboards.py in Arduino-Pico https://github.com/earlephilhower/arduino-pico/blob/master/tools/makeboards.py It would be great if we could adapt that script to have a map / dictionary of the boards to its specific board headers (https://github.com/maxgerhardt/pico-sdk/tree/master/src/boards/include/boards), so we can keep using it to generate all board files. It can store the "picosdk" variant then in a sub-field or object, like "build": {
"picosdk_variant": "...."
} or "build": {
"picosdk": {
"variant": "...",
"some_other_setting": "..."
}
} |
Actually, we might even get away with not storing that information in the board file at all but have that mapping be done by the builder script platform-raspberrypi/builder/frameworks/picosdk.py Lines 18 to 23 in 52853c4
|
Ah I see, thank you for the information. OK, more work to be done ,-)
Well, see my comment in the commit: it's line 20 in picosdk.py that "fails", or at least doesn't find the file under the supplied (Arduino) name. What do You think? |
I've done some work with a script and manual labor to map the current boards to the Pico SDK headers in 0f900eb. So, that mapping is saved in the picosdk.py builder script.
The Arduino core itself doens't use the picosdk header, so only MakeBoard needs to accept an additional default None parameter which it then passes on into MakeBoardJSON. Then of course, the currently mapped board header files would have to be mapped into This is also assuming that PicoSDK doesn't change its header name files often, breaking them. But I think that would be an accepted change into Arduino-Pico. This is also the right place to update the "URL" metadata as you've done for the Waveshare boards. As for now, this lists works fine here as a temporary quick solution. All WaveShare boards and more are mapped. |
In pidosdk.py:19 the check for header
isfile(join(FRAMEWORK_DIR, "src", "boards", "include", "boards", header)):
fails, as pico-sdk names boards using the dot.
Otherwise (and without warning) the pico.h header is chosen, leading to false assumptions (e.g. about PICO_DEFAULT_LED_PIN)