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: Loading RTOS code from Linux

Part Number: AM6548
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hello,

Environment:

  • Hardware: AM65x EVM board
  • Software: TI-RTOS on R5F and Linux on CA53

Before w/o Linux I m able to download code with CCS and run it on R5F.  Now I need Linux on CA53 as well, so I did things like: (1) Boot Linux (2) Connect M3 and R5F in CCS (3) Download code to R5F in CCS as before.

However, the R5F did not run my code but went to the function  ti_sysbios_family_arm_exc_Exception_excHandlerAsm__I. Can someone provide any comments or right PDF files to use Linux and TI-RTOS at the same time?

Regards,
Hungwei

  • Hello Hungwei,

    I am taking a look at this. Did you make any changes to the Linux device tree before trying to connect to the cores with CCS?

    Regards,

    Nick

  • Hello Nick,

    >Did you make any changes to the Linux device tree before trying to connect to the cores with CCS?

    No. I m using the Linux in the shipped SD card. I did not build the Linux image or dtb file myself.

  • Hello Hungwei,

    You should not need to modify the Linux device tree. We want the slave cores to be enabled in the Linux device tree so that all of the proper clocks get enabled, etc. If the code is already loaded to the R5F by Linux, then you need to load Symbols in CCS. That makes sure that the debugger is aware of the correlation between the source code and the compiled firmware.

    A common debug method if Linux pre-loads the firmware you are testing is to halt the core by using a forever loop. Then you can connect CCS to the core and start debugging the application.

    Potentially useful youtube links:

    https://youtu.be/ycknoB55ytI

    https://youtu.be/08wzw6HG-Pw

    https://youtu.be/f2hzuNwCjKk

    Regards,

    Nick

  • More information about how Linux interacts with the R5F core can be found in our IPC for AM65x documentation.

  • Hello Nick,

    Thanks for the reply! I have two questions for you.

    1. I m following the steps in chapter 3.7 IPC and fail to find resource_table and name in remoteproc/. Is there anything I miss?
      1. /sys/kernel/debug/remoteproc/remoteproc8/resource_table:  Name trace:r5f0
      2. /sys/kernel/debug/remoteproc/remoteproc8/name:41000000.r5f
    2. I do not understand what this sentence "then remoteproc8 is the node for the r5f core. ( Note the remoteprocx can change to for example remoteproc4):" means. Why can we change to use remoteproc4 instead of remoteproc8?

  • Hello Hungwei,

    the label "remoteproc0", "remoteproc1", etc is not guaranteed to match with a particular core. To figure out which core is associated with which remoteprocX value, I do the following:

    ls /sys/class/remoteproc/
    remoteproc0 remoteproc11 remoteproc3 remoteproc6 remoteproc9
    remoteproc1 remoteproc12 remoteproc4 remoteproc7
    remoteproc10 remoteproc2 remoteproc5 remoteproc8
    
    cat /sys/kernel/debug/remoteproc/remoteproc*/name
    41000000.r5f
    b034000.pru
    b204000.rtu
    b238000.pru
    b206000.rtu
    b004000.rtu
    b038000.pru
    b006000.rtu
    b134000.pru
    b104000.rtu
    b138000.pru
    b106000.rtu
    b234000.pru
    

    so I know that remoteproc0 is the r5f, remoteproc1 is b034000.pru, remoteproc10 is b204000.rtu, etc.

    Regards,

    Nick