Skip to content

new Cortex_M MPU config facility#460

Open
pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
pat-rogers:add_mpu_configuration
Open

new Cortex_M MPU config facility#460
pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
pat-rogers:add_mpu_configuration

Conversation

@pat-rogers
Copy link
Copy Markdown
Contributor

Note that when used this will fix the LTDC "slew" problem too.

@pat-rogers pat-rogers changed the title new general MPU config facility; also fixes LTDC slew new Cortex_M MPU config facility; also fixes LTDC slew Mar 28, 2026
@pat-rogers pat-rogers changed the title new Cortex_M MPU config facility; also fixes LTDC slew new Cortex_M MPU config facility Mar 28, 2026
@pat-rogers pat-rogers force-pushed the add_mpu_configuration branch from a5a0c7b to 875ea06 Compare April 12, 2026 20:42
@pat-rogers
Copy link
Copy Markdown
Contributor Author

Looks like the Microbit build is failing. I guess that is not V2, ie not Cortex M4, and is instead an M0 and so doesn't have MPU support. But that's just a guess.

Comment on lines +32 to +40
-- This package provides subprograms to configure the Memory Protection
-- Unit (MPU) on the Cortex-M7 family of CPU.
--
-- On Cortex-M7, the MPU is required when the D-cache is enabled in order
-- to prevent speculative reads from causing bus contention on external
-- memory interfaces (e.g., FMC/SDRAM). Without MPU configuration, the
-- default memory map treats all external memory as Normal, allowing the
-- CPU to issue speculative reads that can starve bus masters such as the
-- LTDC display controller.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As this is specific to the Cortex-M7 I suggest to move the file to arch/ARM/cortex_m/src/cm7. This should also fix the build failure. The failure is caused by the builds using Cortex-M0 failing as they pull this unit but don't provide an SVD for that.

If that unit is supposed to work on other Cortex-M I suggest to add the MPU SVD for Cortex-M0. According to the documentation I could find the M0 should also come with an MPU.

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.

2 participants