Skip to content

Mbed framework DFU support #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
me21 opened this issue Feb 5, 2019 · 4 comments
Closed

Mbed framework DFU support #192

me21 opened this issue Feb 5, 2019 · 4 comments
Labels

Comments

@me21
Copy link

me21 commented Feb 5, 2019

There are similar issues concerning DFU support in official STM32 Arduino core: #191, #183. Mbed framework doesn't support DFU upload protocol either.

Since all that is needed for DFU support is alternative linker script, I think it can be added even without altering upstream Mbed repo. But even if not, the fix is pretty straightforward. Just add a bunch of linker scripts and pass another option to the linker.

@me21
Copy link
Author

me21 commented Feb 5, 2019

I forgot about interrupt controller configuration. It should use interrupts table at another address with dfu bootloader. So it can't work with linker script alone, it requires editing Mbed framework sources (startup routines).

@me21
Copy link
Author

me21 commented Feb 14, 2019

I've noticed Mbed supports bootloaders in its configuration (mbed_app.json). See https://os.mbed.com/docs/mbed-os/v5.11/tutorials/bootloader.html.
The bootloader for DFU protocol with added platformio.ini file is located at rogerclarkmelbourne/STM32duino-bootloader#49. So it could be built on demand or prebuilt and stored in STM32 platform assets.

Now that STM32 platform supports mbed_app.json file, it should be possible to setup the bootloader usage.

@me21
Copy link
Author

me21 commented Feb 20, 2019

I confirm that Mbed can work with DFU bootloader. But I had no luck configuring it in mbed_app.json file yet. I had to manually patch linker script (offset the flash start and size).

@valeros
Copy link
Member

valeros commented Jul 18, 2019

Should be fixed in the latest release.

@valeros valeros closed this as completed Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants