Trouble Flashing Keyboard Firmware

First step: get past the Dragon of C++ Warnings That Become Errors (Cannot build keyboard fw, missing pico/multicore.h), which I solved by adding add_definitions(-w) to CMakeLists.txt.

Second step: ran build.sh successfully, but the picotool line spat this out:

No accessible RP2040/RP2350 devices in BOOTSEL mode were found found on bus 1.

I’m fully new to using tools this low-level. Any help greatly appreciated!

Sounds like you want to flash the Pocket Reform keyboard? (the post is in the general category).

If you pull the latest code in the main branch the warnings and errors are solved.

You must put your keyboard in flashing mode, open the keyboard OLED menu and press X. This will disable keyboard input so you will need to invoke the flash command from a remote session or via a USB keyboard.

see section 7.4.2 in the pocket manual

Also, I do not have a Pocket Reform, so I cannot test this myself but I uploaded version 2.0 of the package picotool to unstable today and your line No accessible RP2040/RP2350 looks like you are using this new version of picotool that i just uploaded a few hours ago. It is thus entirely possible that there is a bug somewhere that needs to be fixed. Maybe somebody else who has done this before can try it out?

1 Like

Yes, I am using the version of picotool from unstable. Hopefully we can isolate any issues I might have so we know the source. I’m working on the other aspects of it tonight.

Thanks @nanocodedebug, it looks like I was missing a couple steps there. I’ll make a more careful run at it tonight.

1 Like

I was able to flash the keyboard with the latest picotool package.

Okay, it’s possible I’m misparsing the manual:

You can put the keyboard into programming mode by pressing the X key when the OLED menu is opened. […] So only do this when the flashing script asks you to do so. You can recover from a stuck keyboard by toggling Pocket Reform’s Standby Power Switch off and on.

Am I reading that right, that I run picotool, and during that flashing process, I’ll be asked to put the keyboard into programming mode? If so, I get the above error before I’m ever prompted. If I need to get the keyboard into programming mode before running picotool, then this is straight user error on my part (possibly with an assist from the docs).

you put the keyboard in firmware mode first, then you run picotool.

you can’t run picotool without a keyboard though, so you need an extra keyboard to plug in, or access the pocket over ssh.

2 Likes

Okay, so what about this process isn’t quite right, or do I have it?

  • Do the commands in the manual up to picotool.
  • Plug in another keyboard and put the pocket reform in firmware flashing mode.
  • Run picotool.
  • Shut the reform down.
  • Flip the standby switch off and on to reset the internal keyboard.
  • Boot it back up.

In the past I would just do something like:

sleep 10; <command to flash keyboard>

Then put the keyboard into programming mode during the delay. Only one keyboard needed.

1 Like

For the classic Reform keyboard before RP2040, where one uses dfu-programmer to flash it, there exists an interactive script that uses udevadm to allow to flash the keyboard firmware without a second keyboard:

I do not own the RP2040 keyboards yet, so somebody who does would have to adapt this script for use with it.

Ultimately though, the flashing process is something that should be done using fwupd.

1 Like