platform-raspberrypi
platform-raspberrypi copied to clipboard
Temporary solution for FW uploading in windows
platformio.ini [env:pico] platform = raspberrypi board = pico framework = arduino upload_protocol = mbed upload_port = E:
platforms/raspberrypi/builder/main.py
` if upload_protocol == "mbed":
upload_actions = [
env.VerboseAction(env.AutodetectUploadPort, "Looking for upload disk..."),
env.VerboseAction(env.UploadToDisk, "Uploading $SOURCE")
]`
must be replaced to
` if upload_protocol == "mbed":
target_firm = join("$BUILD_DIR", "${PROGNAME}.uf2")
env.Replace(
UPLOADER="copy",
UPLOADERFLAGS=target_firm,
UPLOADCMD="$UPLOADER $UPLOADERFLAGS $UPLOAD_PORT >NUL")
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]
`
now uploading works!..
Thanks, but now I have to unplug and hold the button. Is there any way to join both actions: forcing the board into bootsel from picotool and copying the file as you described?
upload_protocol = mbed UF2 upload is fixed by #36.
Is there any way to join both actions: forcing the board into bootsel from picotool and copying the file as you described?
Once a firmware from the Arduino core has been uploaded, it accepts a 1200bps reset-to-bootloader through the USB Serial interface it creates. Just delete any upload_protocol = .. line from the platformio.ini after, it's the default protocol. You don't need to re-plug / reset your board manually.