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

Migrate memory regions from tools/arm_pack_manager/index.json to targets.json #271

Open
Patater opened this issue Apr 21, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Patater
Copy link
Contributor

Patater commented Apr 21, 2021

Is your feature request related to a problem? Please describe.
I'd like to be able to use MBED_ROM_START macros to know in my C code (which might perhaps be a custom bootloader) where different memory regions start and end. This seems to come from targets.json. However, many targets don't have the memory map described in targets.json.

Describe the solution you'd like
Could we migrate the memory region information tools/arm_pack_manager/index.json to targets.json? Is that a good way forward?

Describe alternatives you've considered
We could also update mbed-tools to parse tools/arm_pack_manager/index.json. It's unclear what automation is currently in place to keep this file up-to-date, however, if any. The file targets.json seems like a good place to hold the memory map for targets given that when porting a new target, you have to set properties in this file anyway.

We might also standardize on common-across-all-targets linker-defined symbols for marking the start and end of regions, and use those in place of MBED_ROM_ or MBED_RAM_ macros. We generally define symbols for the regions today, but this may not be aligned across all targets yet. We'd need to put tests in place to ensure alignment. Using linker-defined boundary symbols might be a good alternative to using MBED_ROM_START and friends in my C code (which may be a custom bootloader).

Additional context
Please refer to the discussion thread in PR #270 for some more context and detail. See also #222 for more detail about the possible use cases of these defines.

@Patater Patater added the enhancement New feature or request label Apr 21, 2021
@40Grit
Copy link

40Grit commented May 13, 2021

I'd rather we all just come together and define some MCU address space partitioning standards, along with some standards to enable dynamic placement of firmware images in a partition and then develop a minimum viable '0th stage' bootloader to interpret the partitions and boot the dynamic images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants