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.

PROCESSOR-SDK-AM62X: Setup the development environment for M4F core

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: AM625SIP

Hi Nick,

This is a follow up questions that is from another thread. You were recommending me to follow the documentation for SDK 09.01.00.39.


e2e.ti.com/.../5103524

(a) But, I think the latest SDK is now 09.02.00.38. Shall I follow the setup for the latest version ?

(b) If it is to use SDK 09.02.00.38, how to decide which hello world example to use as I am not using any of the development board ?


mcu_plus_sdk_am62x_09_02_00_38/examples/hellow_word/am62x-sip-sk

mcu_plus_sdk_am62x_09_02_00_38/examples/hellow_word/am62x-sk

mcu_plus_sdk_am62x_09_02_00_38/examples/hellow_word/am62x-sk-lp

(c) I don't have a HW debugger. So, how to integrate the M4F application into Linux, and let the Linux to start the M4F application ?

Summary, I have installed the necessary tools and able to build the examples with either CCS or make file. But, I don't know how to get the application running at the M4F core.

rgds,

kc Wong

  • Hello KC Wong,

    Yes, we just released SDK 9.2 over the weekend. Feel free to use the latest version of the SDK.

    The easiest way that I know of to get started with software development is to get your projects working on a TI EVM first. That way if you run into an issue, it is easier to debug because you can use the debug interface on the TI EVM while developing your software, and also you know that it is less likely that the issue is caused by something in your hardware design.

    Even if you are using a custom board though, the process for Linux to load the M4F application is exactly the same as described in the academy here:
    https://dev.ti.com/tirex/explore/node?node=A__AckaMLLzyxszvNaSLSFIQg__AM62-ACADEMY__uiYMDcq__LATEST

    I am going to reassign your thread to another team member to comment on what each of those MCU+ EVM folders actually changes, and what you should do to modify the projects for your custom board.

    Regards,

    Nick

  • Hello KC Wong,

    The SK, SK-SIP, and SK-LP have different HW modules and SOC packages supported  on their boards.

    For example, if SK-LP does support NAND boot mode and the same thing is not supported in AM62 SK,.

    And, in SK_LP and SK kits, DDR memory is interfaced to the SOC externally, but in SK-SIP kits, DDR has an internal SOC.

    So, in your custom HW, if your SOC does not have SIP package and does not boot with the NAND boot mode, you can use the SK examples.

    Regards,

    S.Anil.

  • Hi S.Anil.


    Our custom HW is boot from eMMC. And what is the SIP package ?

    We need to enable the M4F core in device tree as below, is that correct ?

    &mcu_m4fss {
    	status = "okay";
    	mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
    	memory-region = <&mcu_m4fss_dma_memory_region>,
    			<&mcu_m4fss_memory_region>;
    };
    

    But, I am seeing below errors after I enabled the M4F core in device tree.

    root@p550:~# dmesg | grep m4f
    [    0.000000] OF: reserved mem: initialized node m4f-dma-memory@9cb00000, compatible id shared-dma-pool
    [    0.000000] OF: reserved mem: initialized node m4f-memory@9cc00000, compatible id shared-dma-pool
    [    8.823530] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
    [    8.879128] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
    [    8.910003] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
    [    8.950517] remoteproc remoteproc0: 5000000.m4fss is available
    [    8.969613] remoteproc remoteproc0: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
    [    8.981342] remoteproc remoteproc0: powering up 5000000.m4fss
    [    8.993361] remoteproc remoteproc0: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
    root@p550:~# dmesg | grep remoteproc0
    [    8.950517] remoteproc remoteproc0: 5000000.m4fss is available
    [    8.969613] remoteproc remoteproc0: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
    [    8.981342] remoteproc remoteproc0: powering up 5000000.m4fss
    [    8.993361] remoteproc remoteproc0: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
    [    9.009212] remoteproc remoteproc0: request_firmware failed: -2
    root@p550:~# ls /lib/firmware/
    regulatory.db  regulatory.db.p7s
    root@p550:~#
    


    How to integrate the M4F application into Linux ? How to include the M4F application at "/lib/firmware" folder in Linux ?

    Do I include the .out file generated by the CCS at "/lib/firmware", for example "ipc_rpmsg_echo_linux_am62x-sk_m4fss0-0_freertos_ti-arm-clang.out" ?

    rgds,

    kc Wong

  • Hello KC Wong,

    Linux device tree

    Yes, if you want Linux remoteproc driver to initialize the M4F core, you need to have that devicetree node defined.

    Error code when loading M4F firmware

    When Linux gives you an error code, try looking it up online! It can often give you useful information.

    For example, error code 2 is "no such file or directory". So the Linux remoteproc driver is looking for /lib/firmware/am62-mcu-m4f0_0-fw, but not finding anything to load.

    Please refer to the AM62x academy here:
    https://dev.ti.com/tirex/explore/node?node=A__AckaMLLzyxszvNaSLSFIQg__AM62-ACADEMY__uiYMDcq__LATEST

    Copy the .out file into your filesystem, and then update the link at /lib/firmware/am62-mcu-m4f0_0-fw to point to your .out file.

    What is the SIP package? 

    Please refer to the product page here:
    https://www.ti.com/product/AM625SIP

    search the technical documentation section for "AM625SIP: System In Package Explained"

    Regards,

    Nick

  • Thanks, Nick for the steps.

    But currently I am not able to copy the .out file to "/lib/firmware" folder or create a symbolic link there because it is read-only on my Linux system.

    I need to fix that before I am able to try the steps.

  • Hello,

    Yes, you will need to be able to modify your filesystem for most development activities.

    The AM62x SK EVM is relatively inexpensive (~$200) - it might be worthwhile to get one to make your software development a bit easier before transitioning over to your custom hardware. https://www.ti.com/tool/SK-AM62B-P1

    Another benefit to using an EVM is if you run into issues using TI code during the development process, if you are using an EVM we can try to replicate your observations on our side. If you run into issues on your custom hardware, all I can do is provide suggestions for you to try out on your hardware.

    If you have not looked at these parts of the AM62x academy, I would suggest reading through these pages. They will be helpful for you:
    System Design: https://dev.ti.com/tirex/explore/node?node=A__AZlJavcbcntz8rG2HG.2yA__AM62-ACADEMY__uiYMDcq__LATEST
    P
    orting to custom hardware: https://dev.ti.com/tirex/explore/node?node=A__AWde9U3fyhQwPQrzBeP7QA__AM62-ACADEMY__uiYMDcq__LATEST 

    Regards,

    Nick