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.