Skip to content
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

feat: linker support for firmware in external flash #5290

Merged
merged 2 commits into from
Jul 26, 2024
Merged

Conversation

raphaelcoeffic
Copy link
Member

@raphaelcoeffic raphaelcoeffic commented Jul 12, 2024

This PR is a preparation for a number of new targets (mostly H7 based) that need a more flexible linker layout. It also adds some compatibility to the flash driver for new MCUs.

Summary of changes:

  • separate code storage address from runtime location
  • add possibility to use a different memory layout for bootloaders
  • refactored flash driver to allow for more compatibility with new stm32 MCUs

@raphaelcoeffic raphaelcoeffic marked this pull request as ready for review July 12, 2024 07:30
@raphaelcoeffic raphaelcoeffic changed the title feat: support for firmware in external flash feat: linker support for firmware in external flash Jul 12, 2024
@raphaelcoeffic raphaelcoeffic force-pushed the fw-ext-flash branch 3 times, most recently from 16062b5 to 3360675 Compare July 16, 2024 11:20
@raphaelcoeffic raphaelcoeffic added this to the 2.11 milestone Jul 16, 2024
@pfeerick
Copy link
Member

pfeerick commented Jul 18, 2024

TX16, TX12, TX12MK2, X9D+, EL18 and T20 all booting into bootloader and main app normally with DFU flash.

Er... but writing firmware (admittedly older 2.9/2.10 builds) using bootloader on TX12/TX12MK2 and T20 results in main app not booting... 🤯 TX16S was fine (I stopped after 4 radios).

@3djc
Copy link
Collaborator

3djc commented Jul 24, 2024

@pfeerick , after #5321 gets merged, I'll rebase and check this one for the issue you mention

@3djc
Copy link
Collaborator

3djc commented Jul 25, 2024

Ok. there is indeed a serious issue, trying to narrow it down (it does also affect colorlcd)

@3djc
Copy link
Collaborator

3djc commented Jul 26, 2024

Tested OK, on BW and Colorlcd, with firmware generated using that PR, 2.11 and 2.10 branches

@raphaelcoeffic
Copy link
Member Author

@pfeerick we should be good now, there was an issue with how the sector address was computed.

@pfeerick
Copy link
Member

LGTM here also... TX16S, T20 and X9D+ all booting happily after DFU flash + flash via bootloader. Thank you both! :)

@pfeerick pfeerick merged commit 3d8854a into main Jul 26, 2024
47 checks passed
@pfeerick pfeerick deleted the fw-ext-flash branch July 26, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants