cancel
Showing results for 
Search instead for 
Did you mean: 

Debug STM32MP1 M4 core with STM32CubeIDE

Pawel85
Associate II

Hello

I am trying to debug M4 firmware on my custom STM32MP157C board.
I have a reference operating system built with yocto on which this works correctly.
I have to build system with a changed configuration and debugging of the same firmware is not working.

Of course I saw this video https://www.youtube.com/watch?v=YIhzzgJmop0
When I click the Debug button, the application correctly uploads however it won't start.
I get the message:

Error in final launch sequence:
Failed pre launch
Failed pre launch
Firmware remoteproc load failed, please:
1. make sure that /lib/firmware on your target has space
2. make sure that /lib/firmware has write access

Of course my target has space and write access - in other case file transfer will not be successful.

Starting the firmware manually works ok with this commands:
echo OpenAMP_raw_CM4.elf > /sys/class/remoteproc/remoteproc0/firmware
echo start >/sys/class/remoteproc/remoteproc0/state

 

Question: how to determine more precisely what failed?
Or maybe any hints what can I check?

 


Additionally in file ($HOME)/STM32CubeIDE/workspace_1.15.0/.metadata/.log I found:

!ENTRY org.eclipse.core.resources 4 368 2024-10-15 16:52:49.781
!MESSAGE Resource '/OpenAMP_raw' does not exist.
!STACK 0
java.lang.Exception: Resource '/OpenAMP_raw' does not exist.
at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:367)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:241)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:183)
at org.eclipse.core.internal.resources.Project.getDescription(Project.java:430)
at com.st.stm32cube.common.projectcreation.core.ProjectUtilities.hasProjectNature(ProjectUtilities.java:167)
at com.st.stm32cube.common.projectcreation.core.ProjectUtilities.hasProjectNature(ProjectUtilities.java:223)
at com.st.stm32cube.ide.mcu.analytics.core.MCUAnalyticsUtils.getRootProject(MCUAnalyticsUtils.java:176)
at com.st.stm32cube.ide.mcu.analytics.core.MCUAnalyticsRegister.send(MCUAnalyticsRegister.java:467)
at com.st.stm32cube.ide.mcu.analytics.core.MCUAnalyticsRegister.send(MCUAnalyticsRegister.java:350)
at com.st.stm32cube.ide.mcu.analytics.core.MCUAnalytics.lambda$1(MCUAnalytics.java:193)
at java.base/java.lang.Thread.run(Thread.java:833)

!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2024-10-15 16:52:55.974
!MESSAGE Error in final launch sequence:

Failed pre launch
!STACK 1
org.eclipse.core.runtime.CoreException: Failed pre launch
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:112)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:252)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:109)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:97)
at com.st.stm32cube.ide.mcu.debug.launch.DSFDelegate.launch(DSFDelegate.java:336)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:805)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:716)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1040)
at org.eclipse.debug.internal.ui.DebugUIPlugin$1.run(DebugUIPlugin.java:1243)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.core.runtime.CoreException: Firmware remoteproc load failed, please:
1. make sure that /lib/firmware on your target has space
2. make sure that /lib/firmware has write access

> you can open a Console View for this..
at com.st.stm32cube.ide.mpu.debug.launching.MPUPreLaunch.execute(MPUPreLaunch.java:140)
at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepPreLaunch(LaunchSequenceUtil.java:88)
at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepPreLaunch(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:94)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160)
at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475)
at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437)
at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391)
at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
!SUBENTRY 1 com.st.stm32cube.ide.mcu.debug.launch 4 0 2024-10-15 16:52:55.974
!MESSAGE Failed pre launch
!STACK 1
org.eclipse.core.runtime.CoreException: Firmware remoteproc load failed, please:
1. make sure that /lib/firmware on your target has space
2. make sure that /lib/firmware has write access

> you can open a Console View for this..
at com.st.stm32cube.ide.mpu.debug.launching.MPUPreLaunch.execute(MPUPreLaunch.java:140)
at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepPreLaunch(LaunchSequenceUtil.java:88)
at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepPreLaunch(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:94)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160)
at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475)
at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437)
at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391)
at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
!SUBENTRY 2 com.st.stm32cube.ide.mpu.debug 4 0 2024-10-15 16:52:55.974
!MESSAGE Firmware remoteproc load failed, please:
1. make sure that /lib/firmware on your target has space
2. make sure that /lib/firmware has write access

1 ACCEPTED SOLUTION

Accepted Solutions
SLasn.1
Senior

Not that I know anything, but when debugging in production mode (A7 is running), I have seen this error which was solved by changing the SSH connection properties.

In Window -> Preferences -> Remote Development -> Remote Connections

Min was set to Public key auth, I set it to Password based. And since my A7 does not have /bin/bash, I also had to change in Advanced -> Login shell command (changed to /bin/sh).

View solution in original post

3 REPLIES 3
PatrickF
ST Employee

Hi @Pawel85 ,

latest ecosystem related information might be found in https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4

Hope this help.

Regards.

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.
Pawel85
Associate II

Hi
Thank you for answer, but unfortunately I don’t find any new information in suggested link.
I will try to better explain.
I have one version of M4 firmware and one hardware platform, but two version of operating systems. One first system all works perfectly, on second system debug won’t start.
Based on this I suppose STM32CubeIDE and M4 firmware is configured properly.
The problem is with operating system. SSH, serial console, file transfer, M4 firmware starting - all is working ok. And at this moment I don’t have any clue where the problem could be.
Is any method to retrieve more detailed log about STMCube32IDE operation (debug launching)?

Regards

SLasn.1
Senior

Not that I know anything, but when debugging in production mode (A7 is running), I have seen this error which was solved by changing the SSH connection properties.

In Window -> Preferences -> Remote Development -> Remote Connections

Min was set to Public key auth, I set it to Password based. And since my A7 does not have /bin/bash, I also had to change in Advanced -> Login shell command (changed to /bin/sh).