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.

CCS/AM6548: IPC examples load fails

Part Number: AM6548

Tool/software: Code Composer Studio

Hello,

I have followed IPC for AM65x, built IPC examples and got the following errors when I try to load the executable from Linux. 

[ 219.088187] remoteproc remoteproc12: powering up 41000000.r5f
[ 219.099380] remoteproc remoteproc12: Booting fw image am65x-mcu-r5f0-fw, size 4227756
[ 219.107374] remoteproc remoteproc12: erroneous trace resource entry
[ 219.113678] remoteproc remoteproc12: Failed to process resources: -22
[ 219.120276] remoteproc remoteproc12: Boot failed: -22

The following file is the code. The only change I did is modifying 0xA000_0000 to 0x9C00_0000 in linker script and resource table header, since Linux has reserved memory at 0x9C00_0000 with length 8MB for R5F.

AM65XX_linux_elf.zip

  • Hello Hungwei,

    Let me go through the steps on my side - I'll get back to you soon.

    Regards,

    Nick

  • I assume you are using Processor SDK 6.1 for both Linux SDK and RTOS SDK. Note that unknown behavior may occur if you use different SDK versions for Linux and RTOS.

  • Note that SDK 6.1 requires a workaround in order for "make ti-ipc-linux-examples" to work on AM65x. In the Linux Processor SDK:

    --- a/Makefile
    +++ b/Makefile
    @@ -523,7 +523,6 @@ ti-ipc-linux-examples: ti-ipc-rtos-path-check
                    TOOLCHAIN_LONGNAME=$${TOOLCHAIN_SYS} \
                    TOOLCHAIN_INSTALL_DIR=$${SDK_PATH_NATIVE}/usr \
                    TOOLCHAIN_PREFIX=$(CROSS_COMPILE) \
    -               LINUX_SYSROOT_DIR=$(SDK_PATH_TARGET) \
                    $(IPC_TOOLS_PATHS)

    This should be fixed in SDK 6.2.

    If you do not implement the above workaround, then the build will fail with errors like 

    App.c:43:10: fatal error: ti/ipc/Std.h: No such file or directory
     #include <ti/ipc/Std.h>
              ^~~~~~~~~~~~~~ 
    compilation terminated.

  • I am able to build and run the IPC example ex02_messageq with no modifications needed to the linker command file or the resource table. I did note that by default make-ipc-linux-examples only built r5f-0 instead of both r5f-0 and r5f-1, but that is fine for this initial test.

  • Note that the dts file and the default resource table addresses match in SDK 6.1:

    Linux SDK 6.1 dts file places r5f code at 0xA0000000:
    arch/arm64/boot/dts/ti/k3-am654-base-board.dts

            reserved_memory: reserved-memory {
                    #address-cells = <2>;
                    #size-cells = <2>;
                    ranges;
    
    ...
    
                    mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
                            compatible = "shared-dma-pool";
                            reg = <0 0xa0000000 0 0x100000>;
                            no-map;
                    };
    
                    mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
                            compatible = "shared-dma-pool";
                            reg = <0 0xa0100000 0 0xf00000>;
                            no-map;
                    };
    
    ...
    
            };
    

    and the RTOS SDK 6.1 default resource table also places R5F_MEM_IPC_VRING at 0xA0000000:
    ipc_3_50_04_07/packages/ti/ipc/remoteproc/rsc_table_am65xx_r5f.h

    #if defined(AM65X_R5F_1)
    #define R5F_MEM_IPC_VRING       0xA1000000
    #else
    #define R5F_MEM_IPC_VRING       0xA0000000
    #endif
    
    #note this example builds for AM65X_R5F_0, so AM65X_R5F_1 is not defined - Nick