We have been using Lisa/M and had recently had some upload problems.
I have identified more precisely the cause of the problems:
-USB transfer error
The consequences were the following:
*random memory error undetected during programming procedure
*control message badly formated resulting in a stall, and then a broken pipe.
As a result, we have also experienced random lisa freeze, either just after programming,
or later, when running code with error.
The problem was experienced after increasing the length of the USB cable, by soldering
4 flying wires between lisa and a remote USB connector.
ST DFU documentation states that USB should handle error and thus no further checking
Apparently some errors are able to go through the USB integrity checks.
One solution could be to use a shielded cable, but I decided to update the bootloader with the help
I have made some modification to the luftboot host and firmware:
-crc validation of every block of received memory, if error, 5 retries of the block
-crc validation of the whole program memory at the end of upload.
-speed increase (for 12s to 6s on my computer) by tuning the USB pollTimeout
-progress bar, looks nice in a terminal, no so in the paparazzi center.
-return -1 when error, return 0 when ok
-change the usb stall response to a STATUS_ERR response in cas of wrong address (no more
-if no valid DFU is found, wait displaying dots
I have tested on various lab situations, and been able to program even when receiving 4 or 5
errors during transfer.
The commit is available on the github fork I made:
I will do more testing, but in the meantime, if anyone want to test it, and give some feedback.
For the merge with the paparazzi branch:
-I'm sorry I made only one commit...
-what is the pull request procedure?
For installing the new luftboot firmware, I used the serial bootloader as described on the wiki.
I patched stm32loader.py to include flash unlock before programming. Ask if you need the patch.