This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: MCU SDK A53 examples don't work with debugger,

Part Number: AM6442
Other Parts Discussed in Thread: SYSCONFIG

Hello,

empty_am64x-sk_a53ss0-0_nortos_gcc-aarch64

and

hello_world_am64x-sk_a53ss0-0_freertos_gcc-aarch64

loop in the sci code.

When suspended according to disassembly the location is after calling Sciclient_secProxyVerifyThread() /* Verify thread status before reading/writing */ status = Sciclient_secProxyVerifyThread(rxThread); from sciclient.c/Sciclient_service().

Linux host configuration:

Ubuntu 22.04.1 LTS

CCS 12.0.0.00009

SDK mcu_plus_sdk_am64x_08_03_00_18

Thanks,

Ilya

  • It should be sk-am64 not am6442 though it is the same SOC.

  • This looping occurs if either Enable UART logging or Enable CCS logging option are enabled in the syscfg project file. 

    If they are not there is no looping but nothing is printed out.

  • Hello I,

    Could you please try changing the UART number in your example code and perform the same test?

    The Hello World example code uses USART0 and you can try changing from USRAT0 to USART1 and do the same test.

    Please confirm if this helps to resolve your issue.

    Regards,

    S.Anil.

  • Hello Swargam,

    Without enabling UART log component in sysconfig putchar_() in ti_dpl_config.c is just an empty stub.

    That explains why with default example configuration nothing is printed out.

    With the component enabled UART instance is Any(UART1) by default. Changing it to UART1 did not help. The core

    is still looping infinitely after the Sciclient_sendMessage() call.

    This is empty_am64x-sk_a53ss0-0_nortos_gcc-aarch64.

    Thanks,

    Ilya

  • Hello Swargam,

    Without enabling UART log component in sysconfig putchar_() in ti_dpl_config.c is just an empty stub.

    That explains why with default example configuration nothing is printed out.

    With the component enabled UART instance is Any(UART1) by default. Changing it to UART1 did not help. The core

    is still looping infinitely after the Sciclient_sendMessage() call.

    This is empty_am64x-sk_a53ss0-0_nortos_gcc-aarch64.

    Here is where it is looping. Looks like it is waiting somewhere around putchar_()

    but it does not get to a breakpoint I set in it:

    void putchar_(char character)
    {
    /* Output to UART console */
    DebugP_uartLogWriterPutChar(character);  <-----here
    }

    Thanks,

    Ilya

  • I'm still debugging but it seems like memcpy() call from Sciclient_sendMessage() 

    never returns.

    /* Write header */
    msg = pHeader;
    for (i = 0U; i < SCICLIENT_HEADER_SIZE_IN_WORDS; i++)
    {
         /*Change this when unaligned access is supported*/
         (void) memcpy((void *)&test, (const void *)msg, 4);
        CSL_REG32_WR(threadAddr, test);
        msg += 4;
        threadAddr+=sizeof(uint32_t);
    }

  • Hello IIya,

    I can reproduce the issue on my end and expect a reply in a day or two days.

    I have a question are you using SD boot mode?

    Regards,

    S.Anil.

  • Hello Swargam,

    Yes, I am using SD boot mode with OSPI null SBL on the SD card.

    But the result does not seem to depend on the boot mode.

    Also I believe what was supposed to be a call to memcpy()  ends up in _fini().

    Thanks,

    Ilya

  • Hello ilya,

    I didn't face any problem while loading Hello World example on A53 core from CCS.

    I have followed the below steps to reproduce the your issue and please let me know if I have made any mistakes in reproducing the your issue.

     

    Steps :

    1. Kept the HW into UART Boot Mode
    2. SBL NULL image Flashed on external Memory ( OSPI )

             3. Kept the HW into OSPI Boot Mode and Removed GEL scripts from the CCS to avoid DDR  initializations again.

             4. Connected to A53_0 Core

             5. Loaded Hello world example on A53_0

    I hope you solved your issue and please let me know if you face any problem .

     

     

    Regards,

    S.Anil.

  • Hello,
    I was able to resolve the A53 hello world issue. The example has to be built with the elf aarch64 compiler though another compiler flavor builds it just fine. The ccs can't easily differentiate between if multiple compilers with the same name prefix are installed. I had to move the elf compiler to another folder, and add/delete ccs compiler path entry as needed. Perhaps this is something that could be added to the documentation..
    Thanks,
    Ilya