Hi,
we are facing some interesting challenging with our M7 system.
We use remoteproc
to start the M7 firmware.
Usually, the process works fine but we figured out that when the M7 image grows above a certain size (weather only data, only code or a mixture of both is hard to say) remoteproc
fails loading the FW.
This is particularly bad, because we are never able to load a debug build and we always have to build in release mode.
Our FW is all sitting in the TCM (both data and code):
Linker script
MEMORY
{
m_itcm_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
m_itcm_text (RX) : ORIGIN = 0x00000400, LENGTH = 0x0001FC00
m_dtcm_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000
m_ddr_data (RW) : ORIGIN = 0x80000000, LENGTH = 0x01000000
}
Compilation output
m_itcm_interrupts: 680 B 1 KB 66.41%
m_itcm_text: 66340 B 127 KB 51.01%
m_dtcm_data: 62448 B 128 KB 47.64%
m_ddr_data: 0 B 16 MB 0.00%
The error shown while booting is:
[ 7.253579] remoteproc remoteproc0: bad phdr da 0x1de78 mem 0xd5a0
[ 7.259905] remoteproc remoteproc0: Failed to load program segments: -22
The same binary (okay, the .bin
not the .elf
, but the output of the same build) is always running correctly when booting via uboot.
We went for the remoteproc
way 'cause it’s better supported in TCB, if we want to switch to uboot we have than to “hack” the u-boot-initial-env-sd
after having built the image, since we didn’t find a way to pass the necessary u-boot variables in the TCB input parameters.
Thank you for you support.
Additional info:
tdx-info
verdin-imx8mp-15604834:/var/rootdirs/home/torizon# tdx-info
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.54-7.1.0-g3493ccd66900 #1-Torizon SMP PREEMPT Tue Dec 17 21:04:41 UTC 2024
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.0/torizon/a45c8357cdd318d41ef5d9b14198e03a8856550b9b33490848a61855e500cf04/0 clk-imx8mp.mcore_booted=1 firmware_class.path=/var/m7-firmware
Distro name: NAME="Torizon OS"
Distro version: VERSION_ID=7.1.0-build.4
Distro variant: VARIANT="Docker"
Hostname: verdin-imx8mp-15604834
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version: 0058 V1.1B
Serial number: 15604834
Processor arch: aarch64
------------------------------------------------------------