Skip to main content
Visitor II
April 15, 2021
Solved

How to set up the STM32cubeIDE Linux configuration for STM32MP1.

  • April 15, 2021
  • 15 replies
  • 5059 views

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

    This topic has been closed for replies.
    Best answer by VWied.1

    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.

    15 replies

    VWied.1Author
    Visitor II
    April 28, 2021

    Hello Ludovic,

    The device boots with the default software. I got the target status to show. It looks like one of my USB ports only charges and does not have any data lines. I switched the USB from that to another one and it is working now.

    For getting the launch configurations, I am still having the same issue though. I still have 'Connection "" not available' See the image below. When I try to add the configuration like the guide tells me to, I get this:

    VWied.1Author
    Visitor II
    April 28, 2021

    0693W00000AMnsLQAT.png

    VWied.1Author
    Visitor II
    April 28, 2021

    So I found another community.st.com answer that mentioned that this scenario can be because the dependency of openocd is missing. I have apt installed that and I am able to find a connection now. From here, I select the local path and remote path as described in the debugging guide you shared earlier. You can find the setup that I have done for the Run configuration and the error:

    0693W00000AMo42QAD.png 

    0693W00000AMo3sQAD.png

    ST Employee
    April 29, 2021

    Hi VWied.1,

    First point, openOCD is part of STM32CubeIDE delivery and by default this embedded one is used.

    The problem you are facing is a pure network issue:

    . did you check network connection between your Linux workstation and STM32MP15 board?

    . is ping working?

    . target status green light?

    . did you try to select a select a connection?

    Best Regards,

    Ludovic

    VWied.1Author
    Visitor II
    April 29, 2021

    Hello @LudovicR​ 

    I can ping the device.

    The status light is now green.

    I can also do "minicom -D /dev/ttyACM0

    I can ping the device using the IP address that shows up in the bottom right of STM32CubeIDE now.

    I don't know what has changed from yesterday, but I am now able to push a new dtb file to the device which is nice.

    I am able to debug linux userspace projects as well.

    The last thing that I will need to do is be able to build the full image in STM32CubeIDE that I can use DD to copy to an SD card for scaling up. Are you able to build images with CubeIDE?