cancel
Showing results for 
Search instead for 
Did you mean: 

Populate coprocessor using Yocto and a keil project

RLeve
Associate

Im trying to integrate the firmware we have developed into our distribution on yocto. The documentation in the wiki [1] isn't really clear in how we add our own firmware to populate the MP1 coprocessor on boot. And the eample projects that the m4project.bb compiles seem to have a very rigid file structure compliant only with CubeMX. [2]

STM32 supports the Keil IDE we are wondering how we can use a project such as that in our yocto layer.

If anyone has succeeded in this endeavor please let us know.

[1]: https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_Package#Distribution_Package_for_STM32CubeMP1

[2]: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/thud/recipes-extended/m4projects/m4projects-stm32mp1.bb

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @RLeve​ 

The layer meta-st/meta-st-stm32mp-addons/ is provided to ease integration of CubeMX generated project.

But today it support only SW4STM32 project structure.

Anyway you can also provide the .elf generated by Keil and manage to populate it to userfs and start it at boot.

Please look how this is done in m4projects recipe.

recipes-extended/m4projects/m4projects.inc

recipes-extended/m4projects/files/st-m4firmware-load-default.sh

A default m4 firmware defined in DEFAULT_COPRO_FIRMWARE can be loaded enabling the service "st-m4firmware-load.service" :

SYSTEMD_AUTO_ENABLE_${PN} = "enable"

Hope this 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.

Hi @Community member​ 

I have created a STM32 project using STM32CubeIDE , i need to integrate Cortex-M4 firmware with distribution on yocto.

I copied the STM32CubeIDE project into PATH: openstlinux-5.10-dunfell-mp1-21-03-31/layers/sources/m4projects-stm32mp1/Projects/STM32MP157C-DK2/Examples and included in m4projects-stm32mp1.bb

But the file structure of examples in distribution is different from the STM32CubeIDE project.