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

Auto Reboot to BOOTSEL mode - PICOTOOL #2676

Closed
hulek-ales opened this issue Dec 11, 2024 · 5 comments
Closed

Auto Reboot to BOOTSEL mode - PICOTOOL #2676

hulek-ales opened this issue Dec 11, 2024 · 5 comments

Comments

@hulek-ales
Copy link

Hello,
due security restrictions on my PC a can't use default upload method and I must use Picotool.
But on my Arduino IDE 2.3.4 and older (WIN 11 PC) RP2040 didn't reboot to BOOTSEL mode automaticly and a have to press button and replug USB.

So I added "tools.picotool.upload.use_1200bps_touch=true" into platform.txt and now RP enter to BOOTSEL automaticly.
Please check my solution.
Bye

@Gavin-Perry
Copy link

This issue is so close to what I want that I didn't open a new one. I'm looking for a simple utility that I can give to users of my Pico powered devices to download a UF2 file.

I read Loading your RPI PICO without bootsel button
and have downloaded OpenOCD but I'm stuck at that point. If some kind person could package a utility that will let a user connect to a Pico that is on a USB com port and download a selected file that would be great. Or just get the drive to open without pressing BootSel and the user can drag and drop. I know it's possible since the Arduino IDE does it but I don't want naïve users to have to deal with the whole IDE environment just to copy my UF2 file onto their device. Not to mention it would be handy in a production line to drop code into a set of devices.

Thanks for the support!

@earlephilhower
Copy link
Owner

It's possible to program the flash using OpenOCD and the SWD connector, but frankly I think that's going to be way harder to get right than just drag-and-dropping a UF2 onto a "USB stick" (which the Pico will appear as, under practically all OSes). The incantation used by the IDE is here

tools.picoprobe_cmsis_dap.upload.pattern="{cmd}/bin/openocd" -f "interface/cmsis-dap.cfg" -f "target/{build.chip}.cfg" -s "{cmd}/share/openocd/scripts" -c "init; adapter speed 5000; program {{build.path}/{build.project_name}.elf} verify; reset; exit"

Note this does NOT use the programmed Pico's USB at all. You need a working DebugProbe hooked up to the SWD port on the Pico to be programmed, and to install the OpenOCD app/dependencies to get it running.

Why can't you just ship the UF2 file and ask the user to hold BOOTSEL and drag-and-drop the 1 file? No drivers, no apps, no problem...

@Gavin-Perry
Copy link

Gavin-Perry commented Feb 6, 2025 via email

@Gavin-Perry
Copy link

Gavin-Perry commented Feb 6, 2025 via email

@earlephilhower
Copy link
Owner

Just tested w/latest release and can't reproduce. Be sure to build and upload with picotool one time before this will work (the picotool USB interface isn't added unless you compile using the picotool upload option).

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