cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX includes different MPU

Mark81
Associate III

If you try to generate code for, say, STM32MP151AAA you will find inside the dts files, some includes related to another MPU (like STM32MP157C):

#include "stm32mp157c.dtsi"
#include "stm32mp157caa-pinctrl.dtsi"
#include "stm32mp157c-security.dtsi"

And no one for the desired target. Is it correct? Why?

1 REPLY 1
Olivier GALLIEN
ST Employee

Hi @Mark81​ 

Yes it's normal, ST make the choice to provide dts tree for the most capable part number, up to the user to make the required adaptation to fit its target.

It seems this approach is a bit complex to customers and we will manage to change it but in long term. (mid 2020)

In the meantime we will work to provide some guidance under wiki.

To unlock you this is some hints :

From what is generated by CubeMX you should first follow recommendation of the following page for TF-A :

https://wiki.st.com/stm32mpu/wiki/How_to_create_your_board_device_tree

Then this is quick guideline for kernel :

Currently in stm32mp157c.dtsi all nodes below are disable and re-enabled in the board variant dts file .

mcan1

mcan2

gpu

dsi

Manage to keep them "disabled" in the board variant dts file.

For cpu1 node , remove the node.

Better is also to suppress the SMP load balancing feature in the kernel.

(CONFIG_SMP=n in menu config)

Hope it help

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.