Not being able to run M4 elf after installing custom linux

We are trying to run a program that previously worked on the same board, but now with a new custom Linux flashed on it.

On running:

fatload mmc 0:1 ${loadaddr} example.elf
bootaux ${loadaddr}

The terminal responds via UART_B:

data abort
pc : [<9ff5b1a0>]          lr : [<1fffad10>]
reloc pc : [<878001a0>]    lr : [<0789fd10>]
sp : 9df33034  ip : 200000a4     fp : 00000002
r10: 9df65100  r9 : 9df3aed0     r8 : 00000000
r7 : bd088000  r6 : f3af4803     r5 : 4903b11b  r4 : 4b03b508
r3 : 1fffad10  r2 : 00002c78     r1 : 80800320  r0 : 1fff8040
Flags: nzcv  IRQs on  FIQs on  Mode SVC_32
Code: e3a0d013 e169f00d e1a0e00f e1b0f00e (e24dd048)
Resetting CPU ...

resetting ...

We suspect there may be an issue with the DeviceTree. We need to use the UART_B and EIM on the M4. We are running the program on baremetal, no FreeRTOS or similar.

What version of U-boot are you using? There is a regression bug in later versions (probably anything 2020) that causes an abort on bootaux. See this thread:

We are still waiting for Toradex to respond on this.

If you can get back to 2019.07-3.0.4+g26d926eda0, that will work for you.

We just flashed a stock dunfell and we got the same issue.

M4 can be written fine when flashing a 3.0.4 image.

Hi @jaski.tx , can you check on this with the rest of the support team? It seems that in BSP 5 (dunfell) what used to work for writing an ELF file for the M4.

Thanks, Alvaro.