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.

RTOS/PROCESSOR-SDK-AM437X: IO LINK Master Example in sdk 05.03.00.07 howto get started?

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: TIDA-010016, AM4379

Tool/software: TI-RTOS

Hello,

we are trying to re-engineer your design of the

8 Port IO-Link Master Reference Design TIDA-010016

now i installed sdk 05.03.00.07 and compiled the IO link master examples 

following this guide http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_pru_icss_fw.html#pru-icss-iolink

now i wonder where i can find the document mentioned there?

IOLINK FIRMWARE Design Guide<PDK>/packages/ti/drv/iolink/docs/IOLINK_FW_DESIGN_GUIDE.pdf 

i coulndt find this file.

I also wonder if there is a CCS importable project instead of application .bin file available for the IO Link-Example ?

thx in advance  

  • Hi, let me find out with our IO link expert and come back to you. Please be patience and he is OOO this week.

    thank you,

    Paula

  • Hi, I got a response that FW design document is located here:

    git.ti.com/.../docs

    Also, there is no CCS project to build the application, please refer to the README of the IO-Link stack test application and SDG on how to build the application.

    thank you
    Paula
  • Hello i tried to build the example but came to a point where im stuck now. 

    I have the IQ2 Development Master Stack for evaluation installed also corrected the IOLINK_STACK_INSTALL_PATH_but 

    when i gmake the example i get multiple errors.

     ioLink_AppDataFlags is not defined in ioLink_printTask.c

    any help ?

    thx

  • Hi Haxor, let me take a look and come back to you
    Paula
  • Hi Haxor, I did a sanity check and it builds OK for me. Let me share what I did.

    I downloaded IQ2 master stack (for our internal use)

    I have a windows machine, so I added "export IOLINK_STACK_INSTALL_PATH" inside C:\TI\pdk_am437x_1_0_14\packages\ti\build\makefile (attached)

    2480.makefile

    In a command line a source PSDK env variables

    > cd C:\TI\pdk_am437x_1_0_14\packages

    > pdksetupenv.bat 

    And then build IO link

    > cd C:\TI\pdk_am437x_1_0_14\packages\ti\drv\iolink

    > gmake apps LIMIT_SOCS=am437x LIMIT_BOARDS=idkAM437x

    Now I see in binary folde some stack files created

    C:\TI\pdk_am437x_1_0_14\packages\ti\binary\IOLINK_Stack_TestApp\bin\idkAM437x

    Note: I didn't rebuild PRU FW

    Hope this helps,

    Paula

  • Hi Paula,

    I think the problem is that the pathes of my IQ2 Master stack Version are different to yours i have the IQ2Master Stack Version 1.1.3.0

    can you recheck with the actual Version of IQ2 Master Stack ? Or do i have to get the older Version ?

    thx in advance

  • Hi Haxor, we don't have IQ2Master Stack Version 1.1.3.0.  If you can get 1.1.2.2. it would be easier to help you debug..

    thank you,

    Paula

  • Hi Paula,

    i got the IQ2 Master Stack Version 1.1.2.2 but still have the same problem. 

    i can see that the path structure is still different from the one you showed before. 

    i also get it to build(by correcting Path structure and adding some includes) till the point of IOLink_AppDataFlags wich are unknown. 

    a text search for IOLink_AppDataFlags from my whole C:\ti folder has no results than the files with missing definitions 

    ioLink_autosenTask.c

    ioLink_printTask.c

    can you tell me where IOLink_AppDataFlags and IOLink_AppData is defined in your Code ?

    thx 

    thx

  • Hi Haxor, IOLink_AppDataFlags and IOLink_AppData are defined in the stack:

    <iolink-iq2-stack-path>\iq_stack_master_v1_1_2_2\mst_appl.h
    <iolink-iq2-stack-path>\iq_stack_master_v1_1_2_2\mst_appl.c

    thank you,
    Paula
  • Hi Paula,

    I can see that this is missing in my mst_appl.c and mst_appl.h

    i also realise that my files have smaller size than yours. Do you made changes on your own to these files ? 

    is it possible for you to send me those mst_appl files of yours ?

    if not how can we get along ?

    thx

  • Hi Haxor, let me share those files with you quickly in a private message. Apologize for the inconvenience. If after using new mst_appl.c and mst_appl.h you still face any issues building running let me know in order to create a patch for the stack.

    thank you,
    Paula
  • Hi Paula,
    I finally managed to Build the example :)
    but i had to correct many switch case errors in the stack where the 'default:' state was missing.
    Also i needed to add a function in mst_appl.c called :

    //added for no errors
    MPL_FUNC_PREFIX MPL_ModeT MPL_GetPortState(PortNumT port)
    {
    /*Internal variable.
    * Can be:
    * #MPL_MODE_INACTIVE,
    * #MPL_MODE_DO,
    * #MPL_MODE_DI,
    * #MPL_MODE_COM1,
    * #MPL_MODE_COM2,
    * #MPL_MODE_COM3*/


    return MPL_MODE_INACTIVE; // TODO what layer ???
    }

    so maybe you can tell me what this Function does or how this looks in your case ??
    i cannot test the application now because i have no time right now but i will report later (next week)
    thank you very much.

  • Hi Paula,

    Im sorry to bother you again but im not sure what are the next steps to run the example.  

    I expected a .bin file wich i could flash to run via Qspi like other examples,  instead i get the IOLINK_Stack_idkAM437x_a9hostTestApp_release.xa9fg File 

    so what i have to do with this now ? 

    I also have problems to download the IOLINK_FW_DESIGN_GUIDE.pdf from git maybe you can send me this via PM.

    Thx

  • Hi Haxor, you can load/run IOLINK_Stack_idkAM437x_a9hostTestApp_release.xa9fg via JTAG + CCS. JTAG. AM4379 IDK board has an XDS100V2 USB Emulation through the MicroUSB AB. If you want to connect load your application in CCS I can help you to create the Target configuration (few clicks ..) and show you how to load/run the application.

    Alternatively, you can also using pdkAppImageCreate.bat to create an app binary that you can run via SD card.

    Steps are:
    1) Setup build environment
    Navigate to C:\TI\pdk_am437x_1_0_14\packages
    Run the script setupenv.bat (Windows) or source setupenv.sh (Linux)

    2) Run application creation script
    pdkAppImageCreate.bat [PDK_PATH] [CG_TOOL_PATH] [APP_PATH] [APP_NAME] [SOC] [PROCESSOR] (Windows)
    pdkAppImageCreate.sh [PDK_PATH] [CG_TOOL_PATH] [APP_PATH] [APP_NAME] [SOC] [PROCESSOR] (Linux)

    Typically this is done automatically in a post-build step in CCS project or via Makefiles.. I will check with the developers as it seems they missed to add this post-build for IOLINK.

    Just FYI:
    A) In makefile you would have something like:
    post-build:
    -$(PDK_INSTALL_PATH)/pdkAppImageCreate.bat $(PDK_INSTALL_PATH) $(TOOLCHAIN_PATH_A9) Debug Debug/AppName AM437x arm

    B) In CCS project -> Properties -> Build -> Post-build steps you would have something like:
    ${PDK_INSTALL_PATH}/pdkAppImageCreate.bat ${PDK_INSTALL_PATH} ${CG_TOOL_ROOT} ${PROJECT_LOC}/${ConfigName} ${ProjName} AM437x arm

    Thank you,
    Paula
  • Hi Haxor, did you were able to run the demo binaries? if any further issues let us know.

    thank you,
    Paula
  • Hi i think i have only some functionality working, when i load and run the io link test program: 

    IO-Link sensor (AO001) gets powered up when connected but i dont see any messages on my Terminal? Same with (AD003). Also the LED's on the TIDA-010016IOLMF2 Board stay dark. 

    I think there is still something missing, i dont know how to configure the stack correctly maybe you can send me your mpl_pl.c and mpl_pl.h files via PM so i can make a diff.

    is there a step by step explanation how the io link example should work in general?

    thx

    haxor

     

  • Hello Haxor,

    I am sorry, we could not provide you the source of mpl_pl.c and mpl_pl.h due to the license issue. Note we are using IQ2 master stack v1.1.2.2, please be sure to get the same version of the stack from IQ2. Paula should be able to provide you the patches on top of the v1.1.2.2, which work with the demo example.

    Regards,

    Hao.

  • Hi Haxor, attached git patch files. 

    Hope this works, please let us know.

    thank you,

    Paula

  • Hi Paula,

    i applied the patches to the original Io Link stack V1.1.2.2 but after correcting som errors im stuck now.  

    in mst_pl.c line 9 the include of ioLinkPruIcssDrv.h the file is missing also a file search on my system showed no result.

    Did i miss something ? Or can you hand me this file ?

    thank you,

    Haxor

  • Hi Haxor, from shared .zip package with patches. I see "0003-Updates-to-integrate-with-iolink-LLD.patch" delete the use of io_link/ioLinkPruIcssDrv.h. So after applying patch 0003, you should be good

    --- a/iq_stack_master_v1_1_2_2/pl/mst_pl.c
    +++ b/iq_stack_master_v1_1_2_2/pl/mst_pl.c
    @@ -6,7 +6,7 @@
    //******************************************************************************

    #include "mst_iol.h"
    -#include <io_link/ioLinkPruIcssDrv.h>
    +#include <ti/drv/iolink/test/iq2_stack_test/src/iq_stack_api.h>

    thank you,

    Paula

  • Haxor, just FYI, we opened a JIRA request to include this patches in the next Processor SDK release, so it would be easier to reproduce IO link master demo.

    thank you,

    Paula

  • Hi Paula,

    thanks to your patches my IO Link Master example is now working correctly. :)   

    thank you very much!!!

    In the next step i want to combine The Ethercat Slave Full Demo with the IO-link Master Demo so that i will have some io-link data accesible via EtherCAT.

    Can you point me to the right direction how i can archieve this or how to get startet ? Which hardware changes i have to do on the idk ?   

    I assume that both examples run on PRU0 so wich one is easier to move to PRU1 ? And how to do this ? (should i open new thread for this ?)

  • Hi Haxor, great news!!.. yes please open another thread. And let's close this one.

    In the meantime you can start downloading our PRU-ICSS Ethercat slave, and getting familiar with its user guide:

    http://software-dl.ti.com/processor-industrial-sw/esd/PRU-ICSS-ETHERCAT-SLAVE/latest/index_FDS.html 

    Thank you,

    Paula