platformio / platform-raspberrypi

Raspberry Pi: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/raspberrypi
Apache License 2.0
73 stars 96 forks source link

Add board_upload_target option #30

Open episource opened 2 years ago

episource commented 2 years ago

Successful upload via openocd requires a core to be selected. Most recent raspberrypi-openocd has a default selection of core 0 builtin, but the version currently deployed by platformio is missing this preselection. Hence the selection must be made externally.

This PR introduces an option board_upload_target to select the target via platform.ini. Additionally, the default value of recent openocd builds (rp2040.core0) is replicated as default value.

Without targets being selected, flash programming will fail with an error similiar to Warn : no flash bank found for address 0x... .

episource commented 2 years ago

There's also a branch with all my PR's merged together: https://github.com/episource/platform-raspberrypi/tree/my-platform