2024-10-17 06:41 AM - last edited on 2024-10-17 06:44 AM by Peter BENSCH
Hello Community,
we're trying to debug an STM32 image (kernel-version V6.1.28) on the M4 core using STLINK-V3SET debugger via STM32CubeIDE (V1.16.0) and getting the following error:
Error in final launch sequence: Failed pre launch (s. attached screenshot).
The directory /lib/firmware has space and is writeable.
Does anyone have an idea what the problem is?
The content of our local.conf:
MACHINE ??= 'txmp-1571'
DL_DIR ?= "${BSPDIR}/downloads"
SSTATE_DIR ?= "${BSPDIR}/sstate-cache"
DISTRO ?= 'karo-wayland'
DISTRO_FEATURES:append = " alternatives-symlinks-relative"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
SSTATE_MIRRORS ?= "\
file://.* http://sstate.karo-electronics.de/PATH;downloadfilename=PATH \
"
PACKAGECONFIG:append:pn-qemu-native = " sdl"
PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl"
CONF_VERSION = "2"
BB_HASHSERVE = ""
BB_SIGNATURE_HANDLER = "OEBasicHash"
VIRTUAL-RUNTIME_dev_manager ??= "udev"
ROOT_HOME = "/root"
SANITY_TESTED_DISTROS:append = " devuan-4"
unset SOURCE_DATE_EPOCH
REPRODUCIBLE_TIMESTAMP_ROOTFS = ""
KERNEL_DEBUG_TIMESTAMPS = "1"
DEFAULT_TIMEZONE = "Europe/Berlin"
IMAGE_INSTALL:append = " psplash nano openssh-sftp-server"
2024-10-17 11:28 PM
Hi there,
I maybe have the same issue. I try to debug the M4 core of a STM32MP157. I'm using the latest CubeIDE under Windows 10 LTS. I was able to debug the older Kernel 5.x images. The 6.x Kernel doesn't work at all.
I can debug my FreeRTOS devices (STM32H7 and F7) without any issues.
2024-10-23 03:56 AM
create the folder /lib/firmware by hand. STM32CubeIDE obviously expects it in the file system and is not able to create it by itself if it is not available.
2024-10-24 05:47 AM
When I create this folder manually I get the new error: "Failed to execute MI command":
2024-10-29 09:11 AM
it seems that the openocd server cannot be started correctly. The console output shows:
2024-11-05 07:56 AM
Hello @BuGe @UStei.1 and @DStau.1 ,
Did you follow steps of the following Wiki page?
If yes, could you please confirm that you had the same settings and are still unable to open a debug session?
because I'm able to establish connection with CubeIDE 1.15.1 and latest image version available stm32mp1-openstlinux-6.1-yocto-mickledore-mpu-v24.06.26 following the steps in the mentioned above Wiki page.
Regards
2024-11-12 07:35 AM
Hello STea,
yes I know this Wiki of course and have the same settings. The only thing I changed was setting the interface from SWD to JTAG, because my baseboard provides only a parallel JTAG connector.
Obviously, you changed the debug probe field from OpenOCD to GDB server. Doing that here, I get the following log file attached (st-link_gdbserver_log.txt)
On my Linux debug console, I can see the firmware booting:
root@qsmp-1570:/home# [ 2156.292441] remoteproc remoteproc0: powering up m4
[ 2156.302348] remoteproc remoteproc0: Booting fw image OpenAMP_TTY_echo_CM4.elf, size 2687680
[ 2156.310558] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node vdev0buffer@10042000
[ 2156.320231] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 2156.325501] rproc-virtio rproc-virtio.1.auto: registered virtio0 (type 7)
[ 2156.332357] remoteproc remoteproc0: remote processor m4 is now up
[ 2156.338129] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x400
[ 2156.349738] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x401
also /dev/ttyRPMSG0/1 will be established.
in the Reset behaviour field of the debugger settings I have choosen None.
Is this correct? I wonder that the M4 firmware is obviously started, I would have expected that this is done by the debugger?