Looks like the flash library wezterm uses is using the old flash API. So short of modifying that it’s not easily made compatible with a partition table.
Get the latest version! This is what I did to get it working:
Before v1.4.9, the MicroPython version used a python implementation for the keyboard. I did some research and confirmed the latest MicroPython uses SDK v2.1.1, so when I switched to Blaire’s keyboard driver, I had to add enable_interrupts (as mentioned by pelrun earlier in this thread)
I just wanted to pop in and say a big thanks to @pelrun for all the work you’ve done on this awesome bootloader. I’ve just recently assembled my PicoCalc with a Pimoroni Pico + 2W and am having a blast learning the ins and outs. Tooling like this that allows flashing from the device/sdcard without a separate computer is such a game changer.
I’m trying to create my own program, and I may reload it half a dozen times in an hour. If this was using the USB port and the BootSel button I probably would have given up by now. Instead I’m slowly making progress (emphasis on slowly ).
Dear @pelrun , I have problem making my software work with your uf2 loader on rp2350, maybe you could point me in the right direction?
My software is a ZX Spectrum emulator, zx-picocalc. The application itself works fine when loaded with uf2 loader, but it requires Spectrum software (games, 48BASIC programs) to work. Such a software packages consist of several .z80 image files glued together by a python script, which then executes picotool to load such a bin file into device memory. That works, but whenever I install another firmware using an UF2 loader, the games get erased
There is another way of software distribution: merging application and games together. That’s what I put into release at my github project. But such a package doesn’t work with UF2 loader, “Unexpected error” gets displayed at the bottom of the screen".
I’m using a custom software, called uf2-append, made by someone else (included in my repo). I suspect that software has some problem as it was built for rp2040. I’m definitely not an expert in uf2 files and so I’m stuck. Could you please look at my zx-picocalc-2w.uf2 file - maybe that would be something trivial for you.
Oh yeah, appending files together is a tricky business - you can have various mistakes that the pico rom doesn’t care about but will trip up uf2loader.
Obviously we can improve uf2-append or uf2loader, but that’s solving the wrong problem! The picocalc has an SD card, and that’s a much better place for an emulator to read from than bundling it into the flash.
Yeah, I’m sure it would be a heavy lift, but in the long run for this particular hardware it would probably be worth it to change the application to use the SD card to hold the z80 game images and load them into memory from there rather than from specified offsets in flash. From the end-user perspective it would be a much better experience to be able to just copy rom images to SD and have the application generate the list of available games from there.
Maybe not, then I haven’t looked at the existing zx code so not sure how much work it would be to make such a change from the way it’s currently implemented.
The change wasn’t that hard and now the games may be loaded from an SD card. That version works with uf2loader, at least on 2350. Thanks for your help!
Btw, there is a snapshot size limitation on 2040. I know how to fix it but I don’t have enough time.
I have found an interesting software package: picocalc-wezterm by wezterm. It’s a full-fledged SSH client for PicoCalc with Pico2_w.
Unfortunately, when I tried to install it with uf2loader, I got reboot loop. The whole thing is implemented in Rust, which makes troubleshooting harder, for me at least, but once I figured out how to enable interrupts, it ran!
Or sort of ran, because when I’m trying to enter WiFi SSID/password, I get “Corrupted” error. WiFi parameters are stored in device flash, so that’s the most likely reason.
Anyway, other commands seem to work, so I have decided to share my fork:
Maybe there’s someone here who knows Rust and 2350 flash structure and would be able to help in the “Corrupted” problem.
I’m running into a strange issue with pelrun/uf2loader v2.3 on a Pico 2W.
What I see:
Fresh Pico → flash wezterm-picocalc.uf2 → works without problems.
Then I flash UF2Loader → try to boot wezterm → the board goes into a reboot loop.
After that, flashing wezterm again does nothing. The UF2 file just stays in the USB folder and the board never installs it.
Other UF2 files still work normally.
I tested this on a second brand-new Pico 2W and can reproduce it every time. Once UF2Loader is on the device, wezterm UF2 never works again. Test with 2 different Pico 2W → confirmed.
So my question:
Does UF2Loader leave something behind that can’t be cleaned?
Is there a way to fully wipe/reset the Pico 2W back to real factory state?
I fixed the build for webmite but people had issues with it and I took it back down. Haven’t had time for picocalc work since early October, but I’ll be on holiday in a week with nothing but my laptop and picocalc to play with over Christmas. Hopefully I can get a bunch of stuff sorted out then.
I’ve been pointed at this thread as I’m trying to upgrade my PicoCalc from a Pico-H to a Pico 2W.
I can’t find a previously built .uf2 files, but the build instructions for this uf2loader have a line that I can’t find a reference for?
I don’t know what pico-sdk is being referred to, or which version I might need, or where to get it.
Can anyone ideally point me at a prior build of the uf2loader for a pico 2W, or point me at what I need for the pico-sdk, please?