CanBoot
CanBoot copied to clipboard
flashtool does not check size prior to flashing?
I have two STM32F042 devices I want to update regularly using Katapult over USB - a Klipper Expander and a "T. Abraham V0-Display" LCD board.
I've been dealing with the Expander for now, and I have encountered a few challenges due to that MCU's paltry 32k of storage.
- I had the flash tool hang and the status LED stop flashing on the Expander, until I realized that my Klipper build plus the 8k offset exceeded 32 kb. Back under that limit it flashes fine. (Did not notice Klipper's own
make
error about this, TODO - double check and open an issue there as well.) - The current version of the code, with double reset click and the status LED enable yields a 4784 byte
katapult.bin
so I have to use an 8kb offset. Take out both and you get down to 4500, ways away from 4096. Would smaller increments be possible (say, 6 kb) or are there alignment constraints at play? - Had to use Klipper's
python3 -c 'import flash_usb as u; u.enter_bootloader("<DEVICE>")'
to get the Expander to play nicely withflashtool.py
, directly using the/dev/serial/by-id
Klipper path as on my other CAN bus machine did not work, it timed out on command CONNECT.