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/PROCESSOR-SDK-AM65X: CCS/PROCESSOR-SDK-AM65X

Part Number: PROCESSOR-SDK-AM65X
Other Parts Discussed in Thread: AM6548

Tool/software: Code Composer Studio

I followed the example:

http://software-dl.ti.com/processor-sdk-rtos/esd/docs/05_02_00_10/rtos/index_examples_demos.html

1. Imported the following project into a blank workspace folder:

C:\ti\processor_sdk_rtos_am65xx_5_02_00_10\demos\rtos_template_app\am65xx\evmAM65xx\A53\template_app\rtos_template_app_am65xx_a53_evmAM65xx.projectspec

2. Followed section 9.1.4.2, Task 2 to import and rebuild.

3. Followed section 10.3.1.3.1. CCS Host Setup to have my target configurations saved in a folder.

The instructions become ambiguous at this point. In any case, I launched my target configuration .ccxml file named AM65x_EVM_XDS100.ccxml (Note the project template has its own .ccxml file called AM6548.ccxml). Connected CCS to DMSC_Cortex_M3_0; connected CCS to CortexA53_0_0. I often got the following error message:

CortexA53_0_0: GEL: Error while executing OnTargetConnect(): Target failed to read 0x0000000002988030

at (Read_MMR((0x02988000U+0x00000030U))&(0x80000FFF==0x80000FFF)) [M4_R5orA53_Startup.gel:37]

at OnTargetConnect()

Power cycle the EVM did not fix it. HW reset to CortexA53 sometimes fixed it. I'd like to know why but this is not the main reason why I am writing.

Once DMSC_Cortex_M3_0 and CortexA53 were connected successfully, I loaded C:\Users\209211\PROCESSOR_SDK\rtos_template_app_am65xx_a53\Debug\rtos_template_app_am65xx_a53.out and got this message:

CortexA53_0_0: AutoRun: Target not run as the symbol "main" is not defined

I hit run anyway and the serial port terminal is stuck here:

  

After this point, I think the code crashed. There is no debug symbols so I cannot debug. HW Reset won't work either, I got this after hitting HW reset:

CortexA53_0_0: Failed CPU Reset(HW)

Here are my questions:

1. What went wrong?

2. How to make the code run to main() and continue on from "Board Init complete"?

3. One in a blue moon, I did get the CCS to complete the "while ======== Application tasks created successfully ========" but I do now know how I did this. There is no repeatable way for me.

4. What does the connection to DMSC_Cortex_M3_0 do? Is there a way to eliminate a separate target configuration/CCS connection and simply import the project spec, build, and go?

Thanks.

 

  • Hi,

    Once DMSC_Cortex_M3_0 and CortexA53 were connected successfully, I loaded C:\Users\209211\PROCESSOR_SDK\rtos_template_app_am65xx_a53\Debug\rtos_template_app_am65xx_a53.out and got this message:

    CortexA53_0_0: AutoRun: Target not run as the symbol "main" is not defined


    This is a known issue that is still not fixed unfortunately. See: e2e.ti.com/.../751207

    4. What does the connection to DMSC_Cortex_M3_0 do? Is there a way to eliminate a separate target configuration/CCS connection and simply import the project spec, build, and go?


    Cortex M3_0 does the processor initialization, when you connect to it you can see the initialization messages on CCS console. You cannot skip the target configuration step, as it initializes your board (sets plls, ddr, etc..). Without this you cannot run any code on the processor (this is an equivalent of the bootloader in RTOS or Linux).

    As for the code not getting past the Board Init message, I also encountered this problem. Let me check this further and I will update.

    Best Regards,
    Yordan
  • Hi Yordan,

    Thanks for the quick response. I think the "code not getting past the Board Init message" problem needs to be solved soon. Together with the "symbol main not defined" problem make the SDK useless. The other post you mentioned says the code is still running correctly even with the "symbol main not defined" problem. But this is not the case here. The code clearly stalled somewhere after "Board Init" message.  Note if I am lucky and wait there for 10 to 20 minutes. It does run past the board init. But it is a rare event. Are we missing some clock settings?

    Thanks.

  • Okay. Here is a "sweep the bug under the carpet" workaround:

    1. Drag "GPIO_v0.c" and "GPIO_v0.h" from PDK to "rtos_template_app_am65xx_a53" project.
    2. In "GPIO_v0.c", comment out lines 522-543 and add one line in "GPIO_setConfig_v0()":

    /* Configure SOC interrupt path if any */
    //if(hwAttrs->socConfigIntrPath!=NULL) {
    // ret_socIntrPath = (*hwAttrs->socConfigIntrPath)(portNum,pinNum,hwAttrs,TRUE);
    //}
    ret_socIntrPath=CSL_PASS;

    3. This will get past the "Board Init" message but now get stuck after "======== Application tasks created successfully ========". There should be a GPIO LED test and UART test but they are not happening - probably related to the code I commented out.

    The real problem in "GPIO_setConfig_v0()" is in "Sciclient_service()" which is several levels down. Please fix the problem in the library and send me an update. Also, please see if you can find out why the peripheral tests are not happening.

    Thanks.

  • Hi,

    Thanks for sharing your findings.
    Please fix the problem in the library and send me an update.

    This is probably being looked at by the development team and should be fixed in the next Processor SDK RTOS releases.

    Best Regards,
    Yordan
  • Do you know when? I will take any interim solution or ideas of a fix. If it is CSL configuration/compiler flags, you should be able to just post a suggestion here. If it is a faulty library, then it is affecting all examples that use the library. Please make sure this is elevated to proper level.

    Thanks.

  • Hi,

    Could you make sure:

    1. you use the No boot - debug mode on your EVM?
    2. you use the Advanced setup which sets up the DMSC firmware using the am65xx_launch.js script

    before running the RTOS template APP?

    Best Regards,
    Yordan
  • Hi Yordan,

    Yes on 1, not sure on 2. How do I do that? I simply import the project spec, launch the "AM65x_EVM_XDS100.ccxml", connect the two targets, load and run the code. See the first post of this thread. Here is my end goal of this exercise. Perhaps you can help me with this instead:

    1. I need to create a "PING example" on CortexA53 core of TMDX654GPEVM (AM654x GP EVM). The CPSW "PING example" can be found at Section 4.10.2.5.1:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_Foundational_Components.html#examples

    2. Please help me create a CCS project running CPSW "PING example". I am using Windows environment. As you can see from my first post. I was using Processor SDK RTOS 05_02_00_10. I noticed the example is in 05.03.00.07 only. So I downloaded 05.03.00.07 as well.
     
    Thanks.

  • Chris,

    On AM65x devices, the traditional approach only to setup the GEL files for software development doesn`t work. The DMSC/Cortex M3 is designed to be the resource, power/clock management and security manager on this device. For run time services, we provide a firmware for the M3 that needs to be loaded as part of the target connect process which board library calls to setup clocks and enable all modules.

    The basic setup using GEL files is only meant for board bring up where users need a simpler mechanism to setup EMIF for configuring the external DDR interface. Any development beyond this requires the DMSC/M# firmware setup as the firmware is used in setup of clock, allocation of UDMA resources, setting up firewalls and other power management services.

    This advanced setup for automating load of DMSC firmware and associated initialization is described here: (Do not skip any step)
    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_how_to_guides.html#advanced-am65x-debug-setup-with-dmsc-firmware-load

    Processor SDK RTOS v5.03 was released yesterday so you may have tried to access it when the update was not completed. We recommend updating to the newer SDK especially if there some new feature that was not available in the previous version.

    Regards,
    Rahul

  • Hi Rahul,

    Thanks for the quick response. I did have the "AM65x_EVM_XDS110.ccxml" created, launched, and connected. The DMSC/Cortex M3 is always connected first. I have not debugged the GEL file.

    Please direct me the correct contact to help me creating a "PING example" with CCS in Windows on CortexA53 core of TMDX654GPEVM (AM654x GP EVM).

    I found the CPSW "PING example" in Section 4.10.2.5.1:
    software-dl.ti.com/.../index_Foundational_Components.html

    But the "pdkProjectCreate.bat am65xx" does not work. The cmd prompt says "File not found", "No projects detected" and exits out. Nothing is generated.

    Should I rebuild PDK? The components should already be there. I don't need to change any function so I should not have to rebuild PDK, right?

    Thanks.

  • Chris,

    IF you are using launch_am65x.js  script from sciclient driver then you don`t need to connect to the M3 first. This automatically does all the required SOC initialization and connects to the R5F core. If you connect to M3 after the firmware is loaded and then run code on A53 the Board init will not go through as it expects M3 firmware to be running.  This is critical to ensure that this is setup correctly so please review the link that I provided in my previous post.

    Your user experience for connecting device with this script should look as follows:

    I have addressed the issue of no CCS projects for AM65x using pdkProjectCreate here:

    From respones in the E2E, you will notice that most PDK driver unit tests are makefile based and are not currently setup as CCS projects. To build just CPSW examples, you don`t need to rebuild the PDK. The ping example for CPSW that is part of NIMU can be built using following steps:

    Setup SDK buld envinronment

    cd pdk_am65x_x_x_x\packages

    gmake nimu

    you can also review my responses here to do more targeted build:

    https://e2e.ti.com/support/processors/f/791/t/766596?tisearch=e2e-sitesearch&keymatch=%20user:42495

    Hope this helps.

    Regards,

    Rahul

  • Hi Rahul,

    Many thanks for sharing the information. I watched the video and I built nimu via "gmake nimu". But my goal is to generate a CCS projectspec for the CPSW ping example. Please let me know if all the pieces are there for this task.

    I have also tried the pdkProjectCreate.bat but nothing is generated:

    C:\ti\pdk_am65xx_1_0_4\packages>pdkProjectCreate.bat am65xx
    =========================================================================
    Configuration:
       SOC             :   am65xx
       BOARD           :   all
       ENDIAN          :   little
       MODULE          :   all
       PROJECT_TYPE    :   all
       PROCESSOR       :   arm
       PDK_SHORT_NAME  :   C:\ti\PDK_AM~2\packages\
    =========================================================================
    Checking Configuration...
    Complete
    =========================================================================
       PDK_PARTNO         : AM65XX
       PDK_ECLIPSE_ID     : com.ti.pdk.am65xx
       RTSC_PLATFORM_NAME :
       RTSC_TARGET        :
       CCS_DEVICE         :
    *****************************************************************************
    Detecting all projects in PDK and importing them in the workspace C:\ti\PDK_AM~2
    \packages\\MyExampleProjects
    File Not Found
    No projects detected
    Project generation complete
    *****************************************************************************

    I hacked a CCS project together yesterday based on nimu Makefile but got tons of errors, i.e. missing symbols, etc, so I thought I should approach you guys first before another attempt like that.

    Thanks.

  • Hi,

    There is no CCS example for the EMAC for AM65xx. As stated in the Software Develper's Guide (software-dl.ti.com/.../index_device_drv.html its build type is make file. You should run:
    cd ~/ti/pdk_am65xx_1_0_4/packages
    source pdksetupenv.sh
    make emac
    to build this emac_cpsw application. The full guide for building applications via makefile is located here:
    software-dl.ti.com/.../index_device_drv.html

    Best Regards,
    Yordan
  • After 2 hours of running:

    1. pdksetupenv.bat

    2. gmake emac

    I got the following error messages:

    > C:/ti/pdk_am65xx_1_0_4/packages/ti/binary/Emac_Icssg_TestApp/bin/am65xx_evm/temp_stdout.txt
    powershell -executionpolicy unrestricted -command C:/ti/pdk_am65xx_1_0_4/packages/ti/build/makerules/x509CertificateGen.ps1 -b C:/ti/pdk_am65xx_1_0_4/packages/ti/binary/Emac_Icssg_TestApp/bin/am65xx_evm/EMAC_Icssg_am65xx_evm_mpu1_0TestApp_release.appimage -o C:/ti/pdk_am65xx_1_0_4/packages/ti/binary/Emac_Icssg_TestApp/bin/am65xx_evm/EMAC_Icssg_am65xx_evm_mpu1_0TestApp_release.appimage.signed -c R5 -l 0x41C00100 -k C:/ti/pdk_am65xx_1_0_4/packages/ti/build/makerules/k3_dev_mpk.pem
    Checking for OpenSSL...
    Not found! Please install OpenSSL
    gmake[4]: *** [C:/ti/pdk_am65xx_1_0_4/packages/ti/build/makerules/common.mk:632: C:/ti/pdk_am65xx_1_0_4/packages/ti/binary/Emac_Icssg_TestApp/bin/am65xx_evm/EMAC_Icssg_am65xx_evm_mpu1_0TestApp_release.appimage] Error 1
    gmake[4]: Leaving directory 'C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/emac/test/EmacLoopbackTest'
    gmake[3]: *** [C:/ti/pdk_am65xx_1_0_4/packages/ti/build/comp_top.mk:370: Emac_Icssg_TestApp] Error 2
    gmake[3]: Leaving directory 'C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/emac'
    gmake[2]: *** [C:/ti/pdk_am65xx_1_0_4/packages/ti/build/comp_top.mk:222: mpu1_0_app] Error 2
    gmake[2]: Leaving directory 'C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/emac'
    gmake[1]: *** [C:/ti/pdk_am65xx_1_0_4/packages/ti/build/comp_top.mk:216: am65xx_evm_app] Error 2
    gmake[1]: Leaving directory 'C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/emac'
    gmake: *** [makefile:77: emac] Error 2

    Can I still run the Emac_Cpsw_TestApp example with this failure?

  • How long does it take for ti-processor-sdk-linjux-rt-am65xx-evm-05.03.00.07 to install? It seem to get stuck at "...evm.tar.xz" file. I was using VMWare Ubuntu 16.04 LTS.
  • Hi,

    For the emac build in RTOS, the log says:
    Not found! Please install OpenSSL

    The Processor SDK RTOS Software developers guide states:

    Windows 10 is required for building the SDK.
    Mono is required for building the the SDK on linux. You can check if mono is installed by typing “mono –version” at the linux prompt. If mono is not installed, download and install mono from here
    OpenSSL is required for building the SDK for AM65xx. Check if OpenSSL is is installed by typing “openssl version” at the comamnd prompt. If OpenSSL is not installed, download and install OpenSSL for your OS.
    For Windows : Download and install Strawberry Perl. The Strawberry Perl installer automatically installs and sets up OpenSSL.
    For Linux : Execute the command “sudo apt-get install openssl” at the linux command prompt.
    See: software-dl.ti.com/.../index_overview.html

    For installing Linux SDK it shouldn't take much time. It slows down a bit when extracting the archives (seems as if the installation is stuck), but it shouldn't take much time, maybe the delay on your machine comes from using virtual machine which is slower.

    Best Regards,
    Yordan
  • We now have a fix for the missing symbols when loading A53 which prevents CCS from performing symbolic debug. From what we root caused working with the Linaro GCC toolchain team, there's an issue in GCC where things get corrupted when generating a build-id but then later declaring it as NOLOAD.

    The simplest workaround (in my opinion) is to just disable the build-id feature altogether.

    Go to CCS project properties

    Go to Build -> GNU Linker -> Miscellaneous

    Click '+' to add a miscellaneous flag.

    Enter -Wl,--build-id=none as your flag.

    Here's a screenshot:

    The alternative fix is to remove the NOLOAD in linker.lds for the template app:

    - .note.gnu.build-id (NOLOAD) : { *(.note.*) }

    + .note.gnu.build-id : { *(.note.*) }