Problems loading M4 firmware on Colibri iMX8QXP 2GB WB IT using U-Boot

Hi all,

I’m using a Colibri iMX8QXP plus an Iris Carrier board 2.0

First I have compiled the example proyect “Hello World” provided by NXP in their MCUXpresso SDK Dashboard HelloWorld.zip (2.0 MB)
[SDK_2.9.0_MIMX8QX6xxxFZ]

Then, with an USB stick connected to Iris, writing the commands “usb start”, “usb reset” and “ls usb 0” I get this on my terminal

image

… so I understood that I might load the “HelloWorld.bin” file with “fatload usb 0 $loadaddr HelloWorld.bin && dcache flush && bootaux ${loadaddr} 0”, resulting on this

Two RS-232 to Usb converters are both on the Iris serial ports, but on the UARTB one I don’t see any text.

Did I miss a step? Could you give me some info about what could be wrong?

Up

Please, take a look. It’s important.

Finally, I found out that the firmware is loading and starting correctly with the procedure I outlined above.

My first mistake was a wrong MCUXpressoIDE project configuration to compile. Althoug I was getting a binary, this code wasn’t starting.

Later I tried with the .bat scripts included in example projects and I was able to view the blink led in the pin mapped for gpio example.

In other topics (Colibri iMX8X Cortex M4 FreeRTOS - #8 by benjamin.tx) I suspect that were given incomplete information, since debug UART is not configured throug “pin_mux” files.

Instead, debug uart for log messages are configured by BOARD_InitDebugConsole(void) in “board.c”.

I point to the changes I made to get UART output in B port for Iris Carrier Board here

/* Initialize debug console. */
void BOARD_InitDebugConsole(void)
{
    uint32_t freq = SC_133MHZ;

    /* Power on Local LPUART for M4 Core0. */
    sc_pm_set_resource_power_mode(ipcHandle, SC_R_UART_0, SC_PM_PW_MODE_ON);
    /* Enable clock of Local LPUART for M4 Core0. */
    CLOCK_EnableClockExt(kCLOCK_DMA_Lpuart0, 0);
    /* Set clock Frequncy of Local LPUART for M4 Core0. */
    freq = CLOCK_SetIpFreq(kCLOCK_DMA_Lpuart0, freq);

    /* Initialize Debug Console using local LPUART for M4 Core0. */
    DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, freq);
}
/* The UART to use for debug messages. */
#define BOARD_DEBUG_UART_TYPE        kSerialPort_Uart
#define BOARD_DEBUG_UART_BAUDRATE    115200u
#define BOARD_DEBUG_UART_BASEADDR    (uint32_t) ADMA__LPUART0
#define BOARD_DEBUG_UART_INSTANCE    0U
#define BOARD_DEBUG_UART_SC_RSRC     SC_R_UART_0
#define BOARD_DEBUG_UART_CLK_FREQ    6000000u
#define BOARD_UART_IRQ               M4_LPUART_IRQn
#define BOARD_UART_IRQ_HANDLER       ADMA_UART0_INT_IRQn
#define BOARD_DEBUG_UART_CLKSRC      kCLOCK_DMA_Lpuart0
#define BOARD_M4_CPU_RSRC            SC_R_M4_0_PID0 //?
#define BOARD_BASEBOARD_PWR_GPIO     LSIO_GPIO5
#define BOARD_BASEBOARD_PWR_GPIO_PIN 9U

I hope this would help another users.

I am a little sad about not receiveing response at this point…


I also add how to load with a TFTP server called Tftpd64 in windows 10

U-boot dhcp command seems to have a weird behavior (tries to load a default image), but setting connection ip manually loading works fine

image

@Eduardo,

Thanks for your response and related documentation. We’re on the process on rewriting all our HMP-related docs since there are significant changes, especially on the i.MX 8 series SoCs. In most of these SoCs, there’s a dedicated UART for the M core and in many carrier boards these pins are not accessible. Your solution - using regular UART_B - is adequate here. I’ll make sure to mention this in our developer website.