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

15 REPLIES 15
LudovicR
ST Employee

Hi VWied.1,

Sorry for the delay.

There are several points to check:

  • when your STM32MP157F-DK2 is powered, can you see something on its screen?

If not, please check SD-Card and boot pins: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

  • if your device is correctly booted, then check connection to your Linux workstation:
  1. with on-board ST-Link connected you should get a /dev/ttyACMx x=0 on the Linux workstation. It should be visible in the Target Status, please check https://wiki.st.com/stm32mpu/wiki/How_to_use_target_status_in_STM32CubeIDE
    1. If a console is detected in Target Status, you can then click on 0693W00000AMkENQA1.png Open console on MPU serial device icon, to get Linux console output. Then let's check network: ifconfig command should give you a usb0 network interface.
    2. Connecting USB C cable corresponding to USB Gadget, you should IP address 192.168.7.1 on usb0 of your device, and a new network interface on your Linux workstation: delta to be checked with ifconfig, this new network interface should have an IP address in the sub-net: 192.168.7.x In case of issue in your network set-up you can configure manually an IP address for example 192.168.7.2. Then try to ping 192.168.7.1 from your Workstation. you should get a green Target Status !

Hope this help,

Ludovic

VWied.1
Associate III

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.1
Associate III

0693W00000AMnsLQAT.png

VWied.1
Associate III

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

LudovicR
ST Employee

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.1
Associate III

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?