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.

Start Profinet example on Sitara AM3359

Other Parts Discussed in Thread: AM3359, SYSBIOS

Hey guys,

this is my first contact with the Sitara AM3359 ICE V2 Board.

I want to use the board for Profinet communication. Therefor it is an example from ti available.

I downloaded the "am335x_sysbios_ind_sdk_1.1.0.4" Software, which include the Profinet-examples from http://www.ti.com/tool/sysbiossdk-ind-sitara  .

After i have imported the profinet-project and test the connection over "XDS100v2 USB Emulator"  to the board successfully, i builded the project successfully.

In the debug-window are now four prozessors:

- M3_wakeupSS_0

- Cortex A8

- PRU_0

- PRU_1

For Cortex A8 is a "profinet_slave.out" file generated by building the code, but what's with the other prozessor?

When i try to start the "M3_wakeupSS_0",  the following Error-Log appear:

Error-Log:

---------------------------------------------------------------------------------------------------------------

Error connecting to the target:

(Error-1266 @ 0x0)

Devive is held in reset. Take the device out of reset, and retry the operation.

(Emulation package 5.1.232.0)
-----------------------------------------------------------------------------------------------------------------------

Do you know the problem? Or do you know what i have to do?


Furthemore is there anywhere a "guide", where i can see step by step what i have to do for using the sitara with profinet?

( I have read the "AM335x SYSBIOS Industrial SDK Getting Started Guide" and "AM335x SYSBIOS Industrial SDK 01.01.00.04 User Guide", but there aren't enough information!

Can someone help me, to start the sitara with the profinet-example?

Regards,

Sebastian

  • Sebastian,

    don't touch the M3 or the PRUs if you want to run the examples.

    Get a Siemens PLC (S7) and import the GSD. Then you can connect ICEv1 to the PLC and control the I/Os. Without a Profinet controller the Profinet device example is of no use...

    Regards,

  • Hey Frank,

    thanks for this fast answer. Ok if you say i should don't touch the m3, i will do this.

    But, when i only start the A8, the processor run, but the processor do nothing! The stackpointer always shows zero!

    Or does the programm only run if on RJ45 a subscriber is connectet? Is this what you mean with "the example is of no use" without a profinet controller?

    Regards,

    Sebastian

  • Sebastian,

    I don't know what you are doing. Obviously you need to load the application code and start if you run this from the debugger. If you start from SDcard this is automatically done. So please see the IA-SDK documentation (the process is the same for all the examples).

    And yes, the Profinet device examples really only makes sense if you have a PLC. It is a communication application so you need something to drive the comms... But of course the app will run and wait for comms input. It might even blink a LED...

    Regards,

  • Sebastian,

    Please follow the instructions given here to load and debug an application via CCS.

    You can also find some info on the Profinet application available in ISDK here

    Regards,
    Vinesh

  • Hey,

    thanks for all these answers. But the system still doesn't run!!

    I used the instructions and applications you said.

    I imported the example.

    I built the project.

    I create the "Target configuration" und connect the PC succesfully with the board.

    After this i loaded the "GEL-File" und made succesfully the initialization.

    Then i loaded  the"....out"-file.

    At the end of loading the following error is shown:
    -----------------------------------------------------------------------------------------------------------

    CortxA8: Breakpoint Manager: Retrying with a AET breakpoint
    CortxA8: Trouble Setting Breakpoint with the Action "Process CIO" at 0x800661b2: (Error -1066 @ 0x3340) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 5.1.232.0)
    CortxA8: Breakpoint Manager: Retrying with a AET breakpoint
    CortxA8: Trouble Setting Breakpoint with the Action "Terminate Program Execution" at 0x800682a8: (Error -1066 @ 0x3340) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 5.1.232.0)
    CortxA8: Breakpoint Manager: Retrying with a AET breakpoint
    CortxA8: Trouble Setting Breakpoint with the Action "Finish Auto Run" at 0x80025fe4: (Error -1066 @ 0x333C) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 5.1.232.0)

    ---------------------------------------------------------------------------------------------------------------------------

    The A8 is running, but there is no blinking LED on the Sitara!

    There are these errors!!!!

    I don't start the M3 and a Siemens-PLC is succesfully connected to the board. The PLC run. The Sitara-LED on the "ETH0"-Port is on.

    But there is no blinking LED and no communication!

    Do you know these problem?

    Regards,

    Sebastian

  • Sebastian,

    maybe you should start with a more basic example....

    Generally you should not see the emulation errors. If you load a program by default it will run to main() and stop there. Then only when you press run it will start your application on the ARM core. So there is still something wrong with your setup.

    What hardware are you using? ICEv1 or V2? Each one has a dedicated GEL.. Also you usually need to do a CPU Reset(HW) before you apply the GEL and load the program.

    Regards,

     

  • Sebastian,

    Please check the "Notes" section of this.

    Also, as Frank suggested, make sure you are using the correct GEL file and try executing a basic example(Eg: i2c_led)

    Regards,
    Vinesh

  • Hey,

    i tried to do what you say. I delete all projects and start the examples from the beginning.

    At first, i imported the i2C_led - example. But when i started the .cfg-file from the example, the following error is showing:

    ------------------------------------------------------------------------------------------------------------------------------------------------
    xdc.tools.configuro: Error: Can't find the platform package 'ti.platforms.evmAM3359'.  TI platforms are no longer shipped as part of XDCtools (C:\ti\xdctools_3_30_01_25_core).  Please ensure you are either using a pre-3.30 version of XDCtools or you have added a product that includes your platform support along the path 'C:/ti/bios_6_35_04_50/packages;C:/ti/ccsv5/ccs_base;C:\ti\xdctools_3_30_01_25_core/packages'.  Check that this path names a directory containing the necessary platform support and that the platform name is properly spelled.    .xdchelp    /i2c_led    line 51    C/C++ Problem
    -------------------------------------------------------------------------------------------------------------------------------------------------------

    what does this mean? all these directories exist, but i didn't find the file 'ti.platforms.evmAM3359' ! Where should this file be?

    ---------------------------------------------------------------------------------------------------------------------------

    After this, i imported the profinet - example. When i started the .cfg-file from the example, the RTSC-configuration was built sucessfully! But when i build the project, it shows the following errors:

    ----------------------------------------------------------------------------------------------------------------------------------

    gmake: *** No rule to make target `C:/Users/Sebastian/Workspace_TI/protocols/profinet_slave/drivers/iPNDrv.c', needed by `iPNDrv.obj'.
    gmake: *** No rule to make target `C:/Users/Sebastian/Workspace_TI/protocols/profinet_slave/drivers/iRtcDrv.c', needed by `iRtcDrv.obj'.
    gmake: *** No rule to make target `C:/Users/Sebastian/Workspace_TI/protocols/snmp/drivers/snmp_ndk_interface.c', needed by `snmp/snmp_ndk_interface.obj'.

    ---------------------------------------------------------------------------------------------------------------------------------------------

    These files doen't exist in the "am335x_sysbios_ind_sdk_win32setup_01_01_00_04" software from TI.

    I read the "Getting Started Guide" and the "Notes" from Vinesh and did it on the same way! But it doesn't run!!

    Have anyone an idea?

    Regards,

    Sebastian

  • And yes i use the Sitara V2!

  • From the logs I understand you are using CCSv6. Please check the software requirements here

    Also, I'm not sure why you can't see those files. Please recheck the installation paths.

    Regards,
    Vinesh

  • No, i use Code Composer Studio version CCS 5.5.0.00077 !

    And i use

    The problem with XDCTOOL was dissolved by using an older version. (Version 3.25.3.72).

    The Version "xdctools_3_30_01_25"  creates the errors above!

    So now i can build the project and can connect with the sitara ICE V2! But before i load the ".out file", i load the GEL-files. When i start initialization of the GEL files, the following error result:

    ---------------------------------------------------------------------------------------------------------------------------------

    CortxA8: Trouble Writing Memory Block at 0x4c0000e4 on Page 0 of Length 0x4: (Error -1065 @ 0x4C0000E4) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.232.0)
    AM3359_ICE_Initialization() cannot be evaluated.
    Target failed to write 0x4C0000E4
        at *((unsigned int *) (0x4C000000+0x0E4))=(unsigned int) 0x07 [TMDXICE3359_v2_1A.gel:281]
        at DDR3_EMIF_Config() [TMDXICE3359_v2_1A.gel:374]
        at AM3359_ICE_Initialization()

    --------------------------------------------------------------------------------------------------------------

    I try to use a lower TCLK, but without any result!

    Do you have an idea?

    Regards,

    Sebastian

  • And yes i push the reset button on the board, before initialization of GEL-files!

    And i try the "TMDXICE3359.gel" and "TMDXICE3359_v2_1A.gel" files, which were in the GEL-folder in the example-project. Both files deliver this error-log!

  • If you are using ICEv2, please use only TMDXICE3359_v2_1A.gel . Please try the 3rd point mentioned in the Notes section of this (shared earlier).

    Regards,
    Vinesh

  • Hey Vinesh,

    I used "TMDXICE3359_v2_1A.gel " and yes i  used "Texas Instruments XDS100v2 USB Emulator" too.

    And i tryed different examples. (profinet, led, ethercat )

    I don't use a SD-card. I only debug over CCS. Is this the problem?

    Regards,

    Sebastian

  • Sebastian,

    Follow these steps

    • Launch Target configuration(XDS100v2)
    • Connect to CortexA8
    • Put a "Hardware Breakpoint" at 0x402f_0400 or 0x0800_0000(Depending on the boot mode)
    • Reset the board(System Reset on CCS)
    • Execute the GEL script
    • Load the binary

    Regards,
    Vinesh

  • Hey Vinesh,

    thanks a lot. It looks better now, but the blue LED from the profinet-example doesn't blink.

    I have:

    • Launch Target configuration(XDS100v2) -> check
    • Connect to CortexA8 -> check
    • Put a "Hardware Breakpoint" at 0x402f_0400 or 0x0800_0000(Depending on the boot mode) -> check
    • Reset the board(System Reset on CCS) -> check
    • Execute the GEL script -> it only run sucessfully, if the processor stop and the breakpoint is active! but can i use the example without the breakpoint settings?
    • Load the binary -> it's only sucessfully, if i had copied the example into workspace, if i build the example in the download folder without workspace copy, there occurs an error!
    • When the CortxA8 run and i make a break, there occurs an error to like this:

    ------------------------------------------------------------------------------------------------------------------------------

    CortxA8: Trouble Removing Breakpoint with the Action "Finish Auto Run" at 0x80025fe4: (Error -1066 @ 0x3332) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 5.1.232.0)

    -----------------------------------------------------------------------------------------------------------------------------------------------

    Do you know why the LED doesn't blink, although there is an Siemens S7 connected via Profinet?

    Regards,

    Sebastian

  • Sebastian,

    When you reset the board without a breakpoint, the default application residing in the flash will execute automatically. If you require to skip this step, then just make sure that there is no application in the flash memory(SPI/NOR).

    You have to stop CortexA8 as soon as you connect the target.

    The example paths are relative to an environment variable IA_SDK_HOME. So copying the example alone might cause issues(cross-check the paths, you can configure it accordingly)

    For ICEv2, I do not think there is a blue LED, instead a blinking orange LED will indicate the alive status.

    As for the LEDs(I suppose you are referring to the Digital outputs), you need to make sure the PLC is configured properly(with the proper GSD), and also you need a jumper connected as mentioned in the user guide

    Regards,
    Vinesh

  • Sebastian,

    I very rarely do hardware reset of the board. Usual sequence is:

    - connect to Cortex-A8
    - use CPU Reset(HW) in CCS
    - run GEL (should have no errors!)
    - load the binary (usually runs to main() using CCS generated breakpoint)
    - start and debug the app

    Regards,

  • Hey together,


    last but not least the example run!!


    Here is my way to run a AM3359 V2 with Profinet:

    - Import the example into workspace (check the copy-box)

    - start the .cfg-file (maybe there is an error by using a newer version of XDCTOOLS -> check the correct version)

    - build the project (maybe there is a wrong path by building, so you have to correct the path)

    - create a target configuration with "Texas Instruments USBV2" and use AM3359 (maybe you have to reinstall the sitara processor (AM3359) by using the ccs.exe)

    - start debug by target configuration

    - tools -> GEL -> load GEL-files (with right mouse)

    - set breakpoint at 0X80000000

    - reset the board (without reset you get errors by initialization of a new GEL-file)

    - script -> start system initialization

    -  remove breakpoint

    - load the file.out

    - run!!!!!

    Thanks for your help!!!!

    Regards,

    Sebastian