Code, running on Cortex-M4 (and hardware_init.c from freertos-colibri-imx7/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo_bm example):
#include "string.h"
#include "assert.h"
#include "board.h"
#include "mu_imx.h"
#include "debug_console_imx.h"
int main(void)
{
hardware_init();
/* Print the initial banner */
PRINTF("\r\nRPMSG String Echo Bare Metal Demo...\r\n");
uint32_t volatile tick = 0;
__disable_irq();
for (;;) {
if (++tick == 500000) {
tick = 0;
PRINTF("a\r\n");
}
}
}
The call __disable_irq() is inserted to exclude just in case situation of hanging in IRQ handler.
In case of use 5.4 kernel printing āaā ceases after some iteration, in case of use 4.14 kernel printing goes on.
Do you have any idea how to solve this issue?
Could you provide a full compilable code for M4? Which exactly images you are referring as 4.14 and 5.4 kernels? Are you starting any additional app/services at Linux side?
Well, I donāt know then. But without clk_ignore_unused I have similar symptoms like you, Linux starts and soon M4 stops sending to serial1 (serial@30890000). In contrast if I instead donāt fdt rm serial1, then M4 keeps running but Linux panics and dies.
mst31, check to see if fdt_fixup is being called as you expected. Iām working in a recent setup like yours and it looks like this part of the script environment got changed somehow. I canāt get this stuff to boot either, but manually modifying the DTB gets me closer.
If you dig into the BSP5 release notes, fdt_fixup has been removed from BSP5. Search on ELB-2710.
So the Toradex documentation here to remove the &uart2 node is obsolete. We need to figure out how to use the new overlay system to remove a node, or manually add fdt_fixup back into the uboot environment / boot.scr.
Could you please provide a reference .dtbo for BSP5 to allow us to try this? In my trials with the latest kernel, even removing UART2 does not allow the kernel to boot. Others have mentioned this on this forum as well.
Many of us, especially Qt/Yocto customers, canāt use BSP2.8, and as far as we can see that was the last version that has a working example of A7/M4 working together.