cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up the STM32cubeIDE Linux configuration for STM32MP1.

VWied.1
Associate III

I have an STM32MP157F-DK2 board. I want to be able to build my own image from scratch and I keep hitting knowledge gaps in the how-to guides on the st wiki page.

I have tried to follow multiple guides including this one: https://wiki.st.com/stm32mpu/wiki/How_to_manage_OpenSTLinux_project_in_STM32CubeIDE

What I have done:

  • I have took the default pinout from the STM32MP157F-DK2 from STM32CubeMX and generated the Device tree for that.
  • I have opened the ioc file within STM32CubeIDE.
  • I have setup OpenSTLinux as per the instructions in the how-to guides

Where I am stuck:

  • I don't have any reference for the run or build configurations.
  • I have not found any information to find the Eclipse or build artifiacts as found in the example I have linked:

What I have:

0693W000008zhV1QAI.pngWhat I am looking to do, as per the guide:

0693W000008zhVBQAY.png

1 ACCEPTED SOLUTION

Accepted Solutions
VWied.1
Associate III

Okay, I didn't realize there was a step needed. I thought the top level of the project already had the Linux configuration built in. So what I did was:

Right click your A7 project -> select "Import an OpenSTLinux project" -> Choose linux-5.10.10 -> then build all.

I am currently waiting for that build to finish which I expect to take almost all day since I am assuming it is doing a bitbake? Once this is done, is there a way to export a .raw file so I can use dd on it to flash an SD card? All of the other howto guides from here on seem to have it use the STM32 CLI tools only.

View solution in original post

15 REPLIES 15
LudovicR
ST Employee

Hi VWied.1,

Did you create your project inside STM32CubeIDE 1.6.1 ?

STM32CubeMX is part of it, and the release of STM32CubeIDE is important to get coherency with STM32CubeIDE & OpenSTLinux.

Normal process explained in https://wiki.st.com/stm32mpu/wiki/STM32CubeIDE#OpenSTLinux_project_support_-_Cortex-A is :

. to first install Yocto SDK

. then import OpenSTLinux projects.

Note that if you only want to customize your Linux user space application:

. you need Yocto SDK to be installed

. and follow dedicated article: https://wiki.st.com/stm32mpu/wiki/How_to_debug_a_user_space_application_with_STM32CubeIDE

Hope this help,

Ludovic

VWied.1
Associate III

@LudovicR​ 

I restarted and used your linked guide on how to generate everything from within STM32CubeIDE instead of using STM32CubeMX separately. I am getting stuck on the exact same step.

The issue that I am having is that I do not see any documentation on the middle step where I build the Linux image. I cannot find any information on how to set up a Linux build to generate the Linux image using the STM32CubeIDE tool.

LudovicR
ST Employee

Hi VWied.1,

Did you install the Yocto SDK as mentionned in https://wiki.st.com/stm32mpu/wiki/How_to_install_Yocto_SDK_in_STM32CubeIDE ?

It is mandatory to set it up before importing OepnSTLinux projects.

Ludovic

VWied.1
Associate III

Yes it is installed.

LudovicR
ST Employee

Ok, so now you can import OSTL projects as explained here: https://wiki.st.com/stm32mpu/wiki/How_to_manage_OpenSTLinux_project_in_STM32CubeIDE

I do not see them in your screenshot...

Take care that downloading and installing SDK is quite long. It should end-up with a SDK Install success pop-up.

Ludovic

VWied.1
Associate III

Okay, I didn't realize there was a step needed. I thought the top level of the project already had the Linux configuration built in. So what I did was:

Right click your A7 project -> select "Import an OpenSTLinux project" -> Choose linux-5.10.10 -> then build all.

I am currently waiting for that build to finish which I expect to take almost all day since I am assuming it is doing a bitbake? Once this is done, is there a way to export a .raw file so I can use dd on it to flash an SD card? All of the other howto guides from here on seem to have it use the STM32 CLI tools only.

LudovicR
ST Employee

Hi VWied.1,

If your SD-Card contains Starter Package : OpenSTLinux binaries, and if you want to use a resource on Linux Cortex-A7 side, only an update of Linux device tree is needed.

This can be done with Linux project Build target dts (***.dtb) . Then, you can update your board following https://wiki.st.com/stm32mpu/wiki/How_to_manage_OpenSTLinux_project_in_STM32CubeIDE#Linux_project

Take care to update the extlinux.conf file corresponding to your board in order to take into account your new Device Tree.

This can be check in boot message on the Device Tree prompt in u-boot.

Does this answer to your need?

Ludovic

VWied.1
Associate III

I will try this guide for updating just the .dtb file for debugging.

What I was meaning to ask in my previous question is my end goal for getting Linux images from a separate, automated build server. I am looking to make sure that the output from the STM32CubeIDE is compatible with my build server so I can ensure that I can reproduce the same build that the STM32CubeIDE is making. This will likely be a .sh script that will generate an image that we can put onto our end products. Is there anything like this that can generate the same images that STM32CubeIDE is generating?

VWied.1
Associate III

@LudovicR​ 

I got distracted this week and was not able to deep dive into updating my STM32MP1 Discovery board. So I am trying to follow your guide, and I cannot get the device set up at all.

The information that is completely missing from the getting started guide is that when I try to do this step: Run As->STM32 Cortex-A Linux Deployment I get the following screen. Right away this is different from the guide and has an error message that says: Connection "" not available at the top.

Other guides on your website say that the Target Status should be online. Mine is stuck offline and I don't see any indication on how to set that up either.

I currently have 3 USB connections to the STM32MP1 Discovery board. One USB C to a power supply, One USB C, and a micro USB to my PC.