paparazzi / luftboot

USB DFU bootloader for the stm32 based autopilots
http://paparazziuav.org
27 stars 25 forks source link

Bootloader on MX working with latest LibopenCM3 #8

Open OpenUAS opened 9 years ago

OpenUAS commented 9 years ago

AS a user I want a simple way to upload my AP software to the AP board. the newer Lisa v2 MX has an F4. THe working of flasing by USB are not tested and know to be problematic. Will dig up a board and start testing.

There already exists a bootloader for Lisa MX https://github.com/podhrmic/aggieair-bootloader but it still has to be merged to the main repo, since it is using older version of libopencm3 and needs to be updated.

podhrmic commented 9 years ago

Looks like the main difference is not in the version of the libopencm3, but rather in the makefile process. Using latest libopencm3 (the same as paparazzi master), I can compile luftboot for Lisa MX, and upload code (yes it says *upload successfully completed), but then the code never starts. When I bypass the bootloader by providing 5V on input (and not using USB cable), the program doesn't start.

At the same time, the bootloader from https://github.com/podhrmic/aggieair-bootloader works perfectly. I ll make a pull request with the code changes.

flixr commented 9 years ago

Of course the flags you have to set in the makefile are different for F1 and F4...

OpenUAS commented 9 years ago

If you wanted to experiment with the experimental Lisa MX bootloader some notice sometimes uploading the bootloader will lock the flash... and you won't be able to override the bootloader via SWD.

In that case this sequence of commands seems to work: -in gdb-

target extended-remote /dev/ttyACM0 mon swdp_scan attach 1 mon option erase mon erase_mass disconnect