openbouffalo / buildroot_bouffalo

Linux Image for the BL808 CPU by Bouffalo Lab
124 stars 33 forks source link

Command line flashing with Python #19

Closed llamaonaskateboard closed 7 months ago

llamaonaskateboard commented 1 year ago

Not an issue but figured this would be the best way to share with the community.

Bouffalolab has some official Python packages for flashing and so the full DevCube is not actually needed: https://pypi.org/project/bflb-mcu-tool/ https://pypi.org/project/bflb-iot-tool/

For whatever reason, the MCU tool doesn't provide any options to flash group1 (the D0 core) even though the included underlying libraries have the capability to do so. I've created a fork over at https://github.com/llamaonaskateboard/bflb-mcu-tool which adds support for group1.

Example usage:

bflb-mcu-tool --chipname bl808 --port /dev/ttyUSB0 --baudrate 115200 --firmware m0_lowload_bl808_m0.bin --firmware-group1 d0_lowload_bl808_d0.bin
bflb-iot-tool --chipname bl808 --port /dev/ttyUSB0 --baudrate 115200 --single --addr 0xD2000 --firmware whole_img_linux.bin
gamelaster commented 7 months ago

This is amazing! I kept note of this, and eventually it might be good idea to put it into README.