Skip to content
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

Temporary solution for FW uploading in windows #28

Open
Gusev-Roman opened this issue Feb 20, 2022 · 2 comments
Open

Temporary solution for FW uploading in windows #28

Gusev-Roman opened this issue Feb 20, 2022 · 2 comments

Comments

@Gusev-Roman
Copy link

Gusev-Roman commented Feb 20, 2022

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!..

@oomek
Copy link

oomek commented Mar 12, 2022

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?

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Jun 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants