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

FlashIAPBlockDevice should have a way to know the free flash region #248

Open
multiplemonomials opened this issue Feb 11, 2024 · 0 comments
Labels
New Feature Usability This makes Mbed harder to use, and needs to be cleaned up.

Comments

@multiplemonomials
Copy link
Collaborator

Mbed provides the incredibly useful FlashIAP class for programming an MCU's built-in flash, and the handy FlashIAPBlockDevice class which allows you to access that flash like a regular block device. However, one area where it falls short is determining the correct area for FlashIAPBlockDevice to work in. It's a bit silly -- the FlashIAP driver test works by going backward from the end of the flash address space, and the FlashIAP driver seems to rely on manual configuration.

I believe that the best way to do this would be for targets which support FLASH to define a linker script symbol indicating where the used region of flash memory ends. This way, FlashIAPBlockDevice would be able to automatically know where is a safe location to store data.

@multiplemonomials multiplemonomials added Usability This makes Mbed harder to use, and needs to be cleaned up. New Feature labels Feb 11, 2024
@multiplemonomials multiplemonomials changed the title FlashIAPBlockDevice should have a way to know the free flash space FlashIAPBlockDevice should have a way to know the free flash region Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature Usability This makes Mbed harder to use, and needs to be cleaned up.
Projects
None yet
Development

No branches or pull requests

1 participant