cvra / can-bootloader

The bootloader used to flash our CAN-connected boards
BSD 2-Clause "Simplified" License
146 stars 51 forks source link

Handle complex flash layout #82

Closed antoinealb closed 5 years ago

antoinealb commented 6 years ago

This pull request includes support for more complex flash layouts such as those used in STM32F4s. This is done by sending only one erase request for each sector, then one write request for each chunk.

For now the sectors are provided on the command line. This might not be very user-friendly, but I believe that since the flash script already requires so many args, a few extra might not be an issue, yes ? Everyone is flashing that through a script right ?

Fixes #65 see individual commit messages for explanations.

antoinealb commented 6 years ago

Not tested on hardware btw, but the unit tests are still passing and this does not touch anything running on the microcontroller.