Debug STM32MP1 M4 core with STM32CubeIDE
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
