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

Supply memory bank information from the configuration script #326

Merged
merged 12 commits into from
Sep 13, 2024

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Aug 22, 2024

Summary of changes

This PR updates the configuration scripts to supply memory bank information to Mbed OS. It also updates a number of target definitions and linker scripts to work with this new format.

See the proposal on the wiki for an explanation of what's being changed and why!

Impact of changes

  • mbed_[rom/ram]_[start/size] attributes are no longer processed in the target JSON definitions
  • Instead, use memory_banks (to define the physical memory banks of a target) and memory_bank_config (to restrict the sizes of memory banks that the application uses)
  • A number of target definitions have been refactored to use device_name to refer to cmsis_mcu_descriptions.json5 instead of defining their memory config inline
  • A number of linker scripts (mainly for STM32WB, PSOC6, and STM32H7) have been updated to refer to the new MBED_CONFIGURED_[ROM/RAM] defines instead of the old style ones that now always refer to the physical memory layout
  • Target definitions which used mbed_[rom/ram]_[start/size] have been updated to use memory_bank_config instead
  • All STM32H7 MCUs in cmsis_mcu_descriptions.json5 now have up-to-date memory bank definitions, instead of the decidedly half-assed ones that were in there before (used my MCU info page as a reference)
  • STM32H745 and STM32H747 linker scripts unified as it was easier if I was going to change them all at once.

Migration actions required

See the proposal

Documentation

See the proposal


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[X] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
tools/python/mbed_tools/build/_internal/memory_banks.py Outdated Show resolved Hide resolved
@VictorWTang
Copy link

Looks good to me!

@multiplemonomials multiplemonomials merged commit 232d767 into master Sep 13, 2024
10 checks passed
@multiplemonomials multiplemonomials deleted the dev/memory-bank-information branch September 13, 2024 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants