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.

AM5728: Module load error

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Hello!

When am flashing the EcMasterDemo.out(binary)of the AM572X OF ICSS Configuration into the TI AM5728 IDK board and compiling in the Teraterm am gtng the following error. Am using only the Master Board.

The kernel loader cannot load vxe's.  Use "rtp exec" or "rtpSp" to start executables or specify LOAD_FULLY_LINKED to load fully linked modules.

What the error related to?Can anyone help!!!

Thanks,

Swarna.

 

  • What software is this? Which version? Which board?
  • EcMasterDemo of AM572X i builded in the CCS6.1.3 the binaries i got flashed into the TI AM5728 IDK board. When i checked the output onto the Teraterm am getting the error.

    Regards,
    Swarna
  • Is this Linux or RTOS? Which version? Where did you get this EcMasterDemo from?
  • I got the EcMasterDemo from the Acontis site EcMaster Eval2.9.
  • Thanks. The EtherCAT experts have been notified. They will respond here.
  • Hello Swarna,

    For me it is not clear, what have you done. At Acontis site, there is no EcMasterDemo.out file. Which file has you flashed? Do you really flashed or just coppied to SD card?

    Teraterm is not a compiler. How have you compiled with it? Could you please attach whole Teraterm output log?

    Thanks,

        Vladimir

  • Hi Vladimir,


    From acontis site i got EcmasterDemo application form EcMatser v2.9 and i builded in CCS6.1.3 then in binaries i got the EcMasterDemo.out file . I renamed it to APP and along with MLO of AM572X i copied into the SDCARD and tried to boot in the AM5728 IDK Board and trying to see in the Teraterm console am getting the error of "INVALID MAGIC NUMBER ".
    Presently i don't have the board so that i can send logs.Sorry for that inconvinence.


    Thanks,
    Swarna.
  • Swarna,

    I've used EcMasterDemo.out with debuger only. I never tried to copy it on SD card and start it without debugger.

    I know that for AM35xx you cannot use .out file directly. It should be converted with postbuild script. Your "INVALID MAGIC NUMBER " looks like binary was not created for SD card.

    I think TI Guru can answer it in details.

    Another question. Why do you want to use ICSS and not CPSW ports?
    Could you try please to use binaries from acontis site? There possibly will be errors becuase of slave mismatch, but at least you will that Ec-Master started or not.

    Thanks,
    Vladimir
  • Hi Swarna, in order to use SD card you need to create convert .out to a binary which has the correct headers. But maybe easier, if, as a first step, you use a JTAG connection.  You can connect your IDK AM572x board using an USB/uUSB cable and configuring in CCS your target configuration connection to XDS100v2 (attached snapshot)

    thank you,

    Paula

  • Vladimir,

    As we can use CPSW ports ,I want to see how it works with ICSS ports. Can i know how we can get binaries from acontis site ? Is there a possibility to get binaries from Acontis site?

    Thanks,
    Swarna
  • Hi Paula ,

    I just renamed the .out file to APP and copied to SDCARD is that the correct way? I didn't convereted to a binary i just renamed!!
  • Hi Swarna, just renaming and copying won't work.

    I would suggest start with JTAG, and when you have your setup working then convert and move app to SD card.

    Few links for your reference:

    Processor SDK RTOS Creating a SD Card with Windows

    Test application binary creation usign Processor SDK (PDK install scripts and tools)

    Example paths to use for AM57xImageGen.bat:
    set BIN_PATH=C:\Users\EC-Master_folder\Workspace\SYSBIOS_AM57x\EcMasterDemo\Debug --> location of your .out
    set App_MPU_CPU0=C:\Users\xx\Desktop\Temporal\EcMasterDemo_ICSS.out --> name of your .out

    thank you,

    Paula

  • Hi Paula,

    Is there a necessary to create APP and MLO ? Can't we use the MLO which is already present in the PDK of AM57X?

    Thanks and Regards,
    Swarna
  • Hi Swarna, you will create your "app" from your EC-Master application .out. But you can reuse MLO from PDK
    thank you,
    Paula
  • Hi Paula,


    I used the MLO from the PDK and after building the application in CCS 6.1.3 i got the EcMasteDemo.out i renamed it to app and copied to SDCard . In my SDCard i have APP,MLO and CONFIG Files .When am trying to boot SDCard on the AM5728 IDK Board am getting the INVALID MAGIC NUMBER error?What could be the exact reason for the error? Am a newbie for such things ,even after a lots of search i couldn't find the answer for the INVALID MAGIC NUMBER error , could you please help me ?


    Thanks,
    Swarna
  • Swarna,

    The secondary bootloader(MLO) on the AM572x expect the app imga to be in RPRC format so that it can parse application binaries for multiple cores and load it to device memory. This is different from how we traditional loaded apps on Sitara devices as AM572x is multi-core device with a DSP and M4 so the secondary bootloader is designed to load ARM, DSP and M4 binaries. The RPRC header starts with a MAGIC NUMBER followed by information regarding CORE ID, Load address and size of binary, etc.

    After the MLO boots it will try to read the app image and it appears since your app is not in RPRC format, it reports an INVALID MAGIC NUMBER. Did you use the pdkAppImageCreate script or the use the out2rprc and MulitcoreImageCreate Utility provided in the Processor SDK RTOS.

    This has been described in the boot section of the Processor SDK documentation:
    processors.wiki.ti.com/.../Processor_SDK_RTOS_BOOT_AM57x  

    The pdkAppImageCreate script is a scripted way to generate the boot image so will not need to deal with COREID and the utilities, you will only need to invoke the script with the correct options as you can see from post build step in any PDK example for AM57xx. If you have only rename the .out to app and then the image will not boot. Please follow the boot generation process and let us know if you still observe this issue.

    Regards,
    Rahul

  • Thanks Rahul,

    I got your point that i have to generate APP from thePdkAPImage script and am following the link that you have sent.But the problem is , i cannot the find this particular path APP_MPU_CPU0=%TI_PDK_INSTALL_DIR%\packages\ti\boot\sbl\binary\idkAM572x\example\armv7\bin\sbl_app.out in my PDK

    no path i.e., example\armv7\bin\ is not there in the pdk_am57xx_1_0_4 , so i created the example ,armv7 and bin folders. Is that the correct way?

    Do i have to change the path in the batch file i.e., in the AM57xImageGen.bat ?

    Thanks and Regards,
    Swarna.
  • Hi Swarna, yes you have to change the paths, steps below

    open a command windows, and go to your PDK packages (example below)

    >cd C:\TI\pdk_am57xx_1_0_2\packages

    Run script to setup environment

    >pdksetupenv.bat

    go to ti\boot\sbl\tools\scripts

    >cd ti/boot/sbl/tools/scripts

    Set the output binary path and the path from where .out is located (below example paths)

    >set BIN_PATH=C:\Users\alice\EC-Master

    >set App_MPU_CPU0=C:\Users\alice\EC-Master\EC_Master_SysBios_Am572x\Workspace\SYSBIOS_AM57xx\EcMasterDemo\Release\EcMasterDemo.out

    Run script for creating "app"

    >AM57xImageGen.bat

    You should see "app" at C:\Users\alice\EC-Master location

    Pleas see below links for additional information

    Processor SDK RTOS Creating a SD Card with Windows

    Test application binary creation using Processor SDK (PDK install scripts and tools)

    Thank you,

    Paula

  • Thanks Paula,

    Following your steps i got the APP file . Thank you so much. It helped me alot. :)

    Thanks and Regards,
    Swarna
  • HI Paula,

    After following your steps am getting the APP file and able to boot the SDCard and am editing the path of APP_MPU_CPU0 in the batch file after reset on the board am getting the following
    " SD Boot - file open completed successfully
    Jumping to MPU CPU0 Application..."

    Am following the below guide in the link
    www.ti.com/.../tidubz1b.pdf

    according to that guide i have to get logs in the console but am getting only the following lines
    " SD Boot - file open completed successfully
    Jumping to MPU CPU0 Application..."

    What could be the problem of missing logs?Is there any problem in the binaries?

    Thanks and Regards,
    Swarna.
  • Swarna,

    The app note refers to bootloader from Industrial SDK 2.x for AM437x, can you confirm that you are using the MLO from Processor SDK RTOS for AM572x corresponding to IDK platform? If there are no UART logs, do you see any LEDs come up? You didn`t provide full log from the UART console, the SBL first detects the board and the revision number and configures pinmux/DDR/UART accordingly. Do you see that printed out?

    Is this issue only with EtherCAT slave application or have you tried to test other app images in the SDK , like a simple LED blink example

    Regards,
    Rahul
  •  Rahul,

    Am using the MLO from the AM57XX PDK .Am using only the AM5728 IDK Master board no slave boards.Am getting logs as above.But i have to get the logs as mentioned in the guide EtherCAT® Master Reference Design for Sitara™ AM57x.

    Thanks,

    Swarna

  • Hi Swarna, please confirm you are using MLO from the PDK version you used for building the application (I believe you used pdk_am57xx_1_0_4). Also, I have seen this behaviour before, but after pressing "warm reset" in the board things usually come up OK.

    Thank you,

    Paula 

  • Hi Paula , I used the MLO from the  pdk_am57xx_1_0_4. Even after the warm reset am not the getting the logs as in the guide. What could be the exact problem?

    Thanks,

    Swana

  • Hi Swana, no sure what can be wrong, but maybe you can test that your SD card is formatted correctly, and you MLO works OK while using another application.

    For a test, you can download pre-build EtherCAT slave 1.0.1 (which uses PDK 1.0.4), inside there is a pre-build app.

    Below log from my setup (after warm-reset):

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    **** PDK SBL ****
    **** Copying Application Image to DDR ****

     SD Boot - file open completed successfully
    Jumping to MPU CPU0 Application...


    Version - Ethercat Slave 1.0.1.0
    Board name      : AM572IDK
    Chip Revision   : 1.3BEtherCAT Device

    SYS/BIOS EtherCAT Demo application3.3.0boardName: AM572IDK

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Also, Board's  LEDs are ON with the right pattern.

    You can test with this "app" so we can start ruling-out possible issues.

    thank you,

    Paula

  • Hi Paula,

    I checked with the pre-build app from the ethercat slave.i got the logs as you mentioned.

    **** PDK SBL ****
    **** Copying Application Image to DDR ****

     SD Boot - file open completed successfully
    Jumping to MPU CPU0 Application...


    Version - Ethercat Slave 1.0.1.0
    Board name      : AM572IDK
    Chip Revision   : 1.3BEtherCAT Device

    SYS/BIOS EtherCAT Demo application3.3.0boardName: AM572IDK

    But when trying the my app even after the wam reset  am getting the logs as

    **** PDK SBL ****
    **** Copying Application Image to DDR ****

     SD Boot - file open completed successfully
    Jumping to MPU CPU0 Application...

    This is the problem am facing ! I dont know where to find the solution .Could you please help me how to display the logs?

    Thanks,

    Swarna

  • Hi Swarna, it seems there is something wrong with your EcMasterDemo binary (app). By the way, did you try to run EcMasterDemo.out using JTAG as I recommended before?

    thank you,
    Paula
  • Hi Paula ,

    I tried running Ecmaster.out using JTAG and seen the output logs in the CCS console.

    I followed the below steps to see the output on the console .

    Create a target configuration
    (a) Navigate to View→Target Configuration.
    (b) Right-click New Target Configuration
    (c) Create a file name (for example, AM572x_IDK.ccxml)
    (d) Set the connection to XDS100v2 USB Emulator for the onboard JTAG
    NOTE: The onboard JTAG is slow. If possible, TI recommends using an external JTAG such as
    a Spectrum Digital XDS560v2 STM USB.
    (e) Set the board or device to AM572x
    (f) Click Target Configuration and select Cortex-A15_0
    (g) Enter the initialization script as follows: ..\..\emulation\boards\am572x\gel\idk_am572x.gel
    (h) Click the Save button
    (i) Right-click AM572x_IDK.ccxml to launch the configuration
    (j) Right-click CortexA15_0 to connect to the target
    (k) Click Scripts→Default
    (l) Click OnTargetConnect_API
    (m) Click on Load Program, and then click Browse Project
    (n) Click EcMasterDemo
    (o) Click on Debug or Release
    (p) Click EcMasterDemo.out
    (q) Click the Resume button


    I loaded the program of Ecmasterdemo.out of DEBUG configuration. After doing this control going to the main function then it is stopping nothing is displayed on the console.

    When i checked with the few PRINTF statements i goto know there is a function (Board_init) called but the function is not present. In the memory mapthe function is located in the PDK (pdk_am57xx_1_0_5) which is not installed in my PC . How the memory map can link the PDK which is not present in my PC? Memory map is created only when the build is successful Even if the PDK present in memory map is not present how can be the build successful?Can u please help me out?

    Thanks and Regards,
    Swarna
  • Hi Swarna, maybe PDK path is pointing to the wrong version?, attached snapshot example. If so, no sure how the project can be built, but any how please check and rebuild and let us know.

    thank you,

    Paula

  • Hi Paula ,

    When  i changed the PDK path am getting the following logs while debugging.

    Can you say what is the defect?

    Thanks and Regards,

    Swarna

  • Hi Paula,

    Can you please help me out ? During JTAG Debugging after loading the program from the EcMasterDemo.out. The control going to main function then to the Function BOARD_INIT() then it is stopping I don't see any logs anything I cannot understand where the control going to ? How to check the control flow using JTAG Debugging?

    Thanks & Regards,

    Swarna.

  • Hi Paula,

    While using JTAG-Debugging and debugging step by step when the control going to the BOARD_INIT() Function am getting the error as CortexA15_0: Unhandled ADP_Stopped exception 0x20023

    How to handle this error?

    Thanks and Regards,
    Swarna
  • Hi Swarna, apologize my delayed response, I was out of office for few days, and only now I can take a look to this.

    From acontis - TI processor web page I tried EC-Master-V2.9.0.06-SYSBIOS_AM57x-Protected package (which works on AM572x CPWS port (J12). My observations below.

    - In order to compile it, I used PDK 1.0.2 and changed the location path for files: AM57x_board.c, I2C_soc.c, and UART_soc.c, from "C:\TI\tirex-contex\pdk_am57xx_1_0_2" to "C:\TI\pdk_am57xx_1_0_2". This is due to my CCS "TI_PRODUCTS_DIR" points to "C:\TI\tirex-contex". Note: in order to change a project file path, do right click on the file, go to properties, Resource and "Edit.." location

    - In order to run it correctly, I changed MasterENI.c file, so it can work with my slave (I used an AM335x as EtherCAT slave)

    - I Connected slave to J12 (CPSW Gb Ethernet1 port)

    After these changes I was able to build and run EtherCAT master on AM572x IDK CPSW port.

    However, when trying to run the demo using PRU-ICSS emllICSS lib (from EC-Master-ICSS-V2.9.0.06-SYSBIOS_AM57x-Protected package). I faced some issues.

    - First I added "LINKLAYER_ICSS" in the project properties -> Build -> Symbols -> Define symbols.  

    - Second I added "emllICSS" library on Project properties -> GNU Linker -> Libraries

    - Then I build the project. But I got some errors due to some a PDK mismatch (emllICSS used PDK1.0.4 and EC-Master from EC-Master-V2.9.0.06-SYSBIOS_AM57x-Protected package uses PDK1.0.2).

    Let touch bases with acontis, in order to see how we can align this, the options that I can see is updating EC-Master project to work with PDK1.0.4, or to create another EC-Master package for PRU-ICSS .

    In the meantime, do you think you can use EC-Master w/ CPSW port instead?

    thank you,

    Paula

     

  • Hi Paula,

    Thanks for the response but I need AM5728 to be work in the PRU-ICSS Debug mode .
    I did including the symbol LINKLAYER_ICSS and tired with the updated PDK eventhough am not getting the correct logs .Can you please tell me how to start and what is correct procedure?

    Thanks & Regards,
    Swarna
  • Hi Swarna, could you please send me your project, so I can try to reproduce your issue in my setup?

    thank you,

    Paula

  • Hi Paula,

    I tried uisng the CPSW ports am getting the correct logs .But i need the logs in PRU-ICSS .Am using the PDK1.0.4.
    The following is the link i downloaded the application
    www.acontis.com/.../ethercat.html

    Could you please check and solve the issue?

    Thanks and Regards,
    Swarna
  • Hi Swarna, let me align with acontis and come back to you soon.
    thank you,
    Paula
  • Hi Paula ,
    Thanks for helping . Can you please inform me as soon as you find the solution which helps me alot.

    Thanks & Regards,
    Swarna
  • Hi Swarna, acontis updated "EC-Master-ICSS-V2.9.0.06-SYSBIOS_AM57x-Protected.zip" with "libemllICSS.a" library build using PDK1.0.2. in their webpage. Please download it.

    Current, "EC-Master-V2.9.0.06-SYSBIOS_AM57x-Protected" from acontis webpage  uses PDK 1.0.2 as well.

    I tested this package and ibemllICSS.a (PDK1.0.2) with below changes, and I was able to build and run the demo using PRU2 ETH0 port:

    • Copy “libemllICSS.a” inside “EC-Master-V2.9.0.06-SYSBIOS_AM57x-Protected\SDK\LIB\SYSBIOS\am57x\Protected” folder
    • Add LINKLAYER_ICSS symbol (could be in the undefined section by default)
    • Add emllICSS, ICSS_emac, PRUSS libraries (also add new library paths)

    Below snapshots:

    Software tools versions:

    - AM57xSYS/BIOS ProcessorSDK v2.0.2.11
    - Compiler GNUv4.8.4 or higher
    - SYS/BIOS 6.45.01.29
    - XDC v3.32.00.06_core
    - AM572x PDK v1.00.02

    Please let me know if this works for you.

    Thank you,

    Paula 

     

  • Hi Paula ,

    Thanks for the help and guidance i builded the application usIng PDK 1.00.02 and i got the binaries but while debugging using XDS100v2 JTAG debugger . I need to get the logs like below  but am getting the logs as

    MY LOGS

    (boardName: AM572IDK
    board type is AM572IDK
    SYS/BIOS EcMaster Sample application )

    LOGS THAT SHOULD DISPLAY

    (boardName: AM572IDK

    board type is AM572IDK
    SYS/BIOS EcMaster Sample application
    Full command line: -auxclk 2000 -v 2 -t 10000 -perf -icss 2 1 0
    Run demo now with cycle time 2000 usec Using AuxClock
    ==========================
    Initialize EtherCAT Master
    ==========================
    EC-Master V2.8.1.12 (Protected) for SYSBIOS Copyright acontis technologies GmbH @ 2016
    Unlicensed version, stop sending ethernet frames after 60 minutes!
    Bus scan successful - 1 slaves found
    1 identical messages skipped)

    While debugging it is stopping at the file HWI.C

    After this LED'S on the left of my IDK board are getting off.What could be actual problem? Is the IDK board fault or any fault during building?

    Thanks & Regards,

    Swarna

  • Hi Swarna,

    do you have call stack?

    Thanks,

        Vladimir

  • Hi Swarna, we could try to debug this, but really it is strange as it works for me.. Could you please have a fresh setup, meaning downloading again from acontis "EC-Master-ICSS-V2.9.0.06-SYSBIOS_AM57x-Protected" and "EC-Master-V2.9.0.06-SYSBIOS_AM57x-Protected" and then apply the changes suggested in my previous post?

    Thank you,

    Paula