2021-04-15 10:38 AM
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:
Where I am stuck:
What I have:
What I am looking to do, as per the guide:
Solved! Go to Solution.
2021-04-20 11:03 AM
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.
2021-04-16 01:12 AM
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
2021-04-19 11:18 AM
@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.
2021-04-20 08:49 AM
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
2021-04-20 08:50 AM
Yes it is installed.
2021-04-20 08:57 AM
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
2021-04-20 11:03 AM
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.
2021-04-21 12:36 AM
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
2021-04-21 09:24 AM
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?
2021-04-23 04:02 PM
@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.