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

Fix STM32H7 dual-core device files #83

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

chris-durand
Copy link
Member

@chris-durand chris-durand commented Apr 9, 2022

  • Remove OPENAMP and RESMGR_UTILITY software IPs from device files for H7 dual core devices.
  • Fix Cortex-M4 core type (must be cortex-m4f, not cortex-m4fd)
  • Fix memory layout for size g devices

@chris-durand chris-durand requested a review from salkinium April 9, 2022 21:30
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Did you find this out just by looking at the data, or is there a test we could add to the CI to detect this?

@chris-durand
Copy link
Member Author

I am trying to compile a blink example for a Nucleo H755ZI-Q. Compilation fails without the fix because the Peripheral enum has the entry OpenampCortex-m4 which is not a valid identifier.

@chris-durand
Copy link
Member Author

Please don't merge yet. I have found another issue. There is no Cortex-M4 with a double-precision FPU but the device file has cortex-m4fd.

@chris-durand chris-durand changed the title [dfg] Remove all software IPs for STM32H7 dual core devices Fix STM32H7 dual-core device files Apr 9, 2022
@chris-durand
Copy link
Member Author

The memory layout is not correct for size g devices. The flash address space is not contiguous on those devices. Flash bank 0 ends at 0x807F FFFF whereas bank 1 starts at 0x8100 0000. The reason for this design choice is to have the same boot address for the M4 core at 0x8100 0000 on both 1MB and 2MB flash devices. It is intended to use one bank for each core. The boot addresses are configurable by writing option bytes, though.

@salkinium
Copy link
Member

Then the flash memories should be separated and given to each core separately, the merging will then tag it per core.

@chris-durand
Copy link
Member Author

chris-durand commented Apr 10, 2022

Then the flash memories should be separated and given to each core separately, the merging will then tag it per core.

You mean we should assign a core to each half in the device file? Also for size i devices?

This would hard-code the default usage in the device file. There is nothing that prevents you from reconfiguring the core boot addresses in the option bytes or only using a part of a bank for one core. It's a user choice and not a property of the hardware.

I am fine with that limitation for modm but a potential external user of the device files might not. (Is there actually someone using modm-devices for another purpose that is not modm?).

@salkinium
Copy link
Member

Good points. Then we need to split the Flash into two areas, not sure what will break in modm if anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants