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.

Building full EtherCAT application with AM335X ICE

Other Parts Discussed in Thread: SYSBIOS

I am able to get the 0.03 version of the industrial sdk to patch against the version 5.0 slave stack code, and I am able to import into CSS 5.

 

when I try to build the application, I receive the following errors, it appears to be a linking error:

 

**** Build of configuration Debug for project ecat_appl ****

C:\ti\ccsv5\utils\bin\gmake -k all

'Building file: ../app.cfg'

'Invoking: XDCtools'

"C:/ti/xdctools_3_23_03_53/xs" --xdcpath="C:/ti/bios_6_33_05_46/packages;C:/ti/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.A8Fnv -p ti.platforms.evmAM3359 -r release -c "C:/ti/ccsv5/tools/compiler/tms470_4.9.5" --compileOptions "-g --optimize_with_debug" "../app.cfg"

making package.mak (because of package.bld) ...

generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...

configuring app.xea8fnv from package/cfg/app_pea8fnv.cfg ...

generating custom ti.sysbios library makefile ...

Starting build of library sources ...

making C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/src/sysbios/sysbios.lib ...

clea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/BIOS.c ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm.asm ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/TaskSupport_asm.asm ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/exc/Exception_asm.asm ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/a8/TimestampProvider_asm.asm ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/a8/Mmu_asm.asm ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/a8/Cache_asm.asm ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/a8/intcps/Hwi_asm.s470 ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/family/arm/a8/intcps/Hwi_asm_switch.s470 ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/timers/gptimer/Timer_asm.s470 ...

asmea8fnv C:/ti/bios_6_33_05_46/packages/ti/sysbios/timers/dmtimer/Timer_asm.s470 ...

area8fnv BIOS.obj arm_IntrinsicsSupport_asm.obj arm_TaskSupport_asm.obj exc_Exception_asm.obj a8_TimestampProvider_asm.obj a8_Mmu_asm.obj a8_Cache_asm.obj intcps_Hwi_asm.obj intcps_Hwi_asm_switch.obj gptimer_Timer_asm.obj dmtimer_Timer_asm.obj ...

Build of libraries done.

clea8fnv package/cfg/app_pea8fnv.c ...

'Finished building: ../app.cfg'

' '

        1 file(s) copied.

making ../src/sysbios/sysbios.lib ...

gmake[1]: Nothing to be done for `all'.

'Building file: ../EcatStack/tiescappl.c'

'Invoking: TMS470 Compiler'

"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7A8 --code_state=32 --float_support=VFPv3D16 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/src" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/EcatStack" --include_path="../../firmware" --include_path="../../../../drivers/include" --include_path="../../../../platform/am335x/evmam335x/include" --include_path="../../../../starterware/starterware-starterware-src/include" --include_path="../../../../starterware/starterware-starterware-src/include/hw" --gcc --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="EcatStack/tiescappl.pp" --obj_directory="EcatStack" --cmd_file="./configPkg/compiler.opt"  "../EcatStack/tiescappl.c"

'Finished building: ../EcatStack/tiescappl.c'

' '

'Building file: ../EcatStack/tiescbsp.c'

'Invoking: TMS470 Compiler'

"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7A8 --code_state=32 --float_support=VFPv3D16 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/src" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/EcatStack" --include_path="../../firmware" --include_path="../../../../drivers/include" --include_path="../../../../platform/am335x/evmam335x/include" --include_path="../../../../starterware/starterware-starterware-src/include" --include_path="../../../../starterware/starterware-starterware-src/include/hw" --gcc --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="EcatStack/tiescbsp.pp" --obj_directory="EcatStack" --cmd_file="./configPkg/compiler.opt"  "../EcatStack/tiescbsp.c"

"../EcatStack/tiescbsp.c", line 199: warning #1219-D: arithmetic on pointer to void or function type

"../EcatStack/tiescbsp.c", line 207: warning #1219-D: arithmetic on pointer to void or function type

"../EcatStack/tiescbsp.c", line 536: warning #69-D: integer conversion resulted in a change of sign

"../EcatStack/tiescbsp.c", line 826: warning #1219-D: arithmetic on pointer to void or function type

"../EcatStack/tiescbsp.c", line 851: warning #1219-D: arithmetic on pointer to void or function type

"../EcatStack/tiescbsp.c", line 857: warning #1219-D: arithmetic on pointer to void or function type

"../EcatStack/tiescbsp.c", line 880: warning #1219-D: arithmetic on pointer to void or function type

'Finished building: ../EcatStack/tiescbsp.c'

' '

'Building file: ../EcatStack/tieschw.c'

'Invoking: TMS470 Compiler'

"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7A8 --code_state=32 --float_support=VFPv3D16 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/src" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.0.0.3/sdk/protocols/ethercat/ecat_appl/EcatStack" --include_path="../../firmware" --include_path="../../../../drivers/include" --include_path="../../../../platform/am335x/evmam335x/include" --include_path="../../../../starterware/starterware-starterware-src/include" --include_path="../../../../starterware/starterware-starterware-src/include/hw" --gcc --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="EcatStack/tieschw.pp" --obj_directory="EcatStack" --cmd_file="./configPkg/compiler.opt"  "../EcatStack/tieschw.c"

"../EcatStack/tieschw.c", line 461: warning #225-D: function declared implicitly

"../EcatStack/tieschw.c", line 563: warning #225-D: function declared implicitly

"../EcatStack/tieschw.c", line 565: warning #225-D: function declared implicitly

"../EcatStack/tieschw.c", line 568: warning #225-D: function declared implicitly

"../EcatStack/tieschw.c", line 570: warning #225-D: function declared implicitly

'Finished building: ../EcatStack/tieschw.c'

' '

'Building target: ecat_appl.out'

'Invoking: TMS470 Linker'

"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7A8 --code_state=32 --float_support=VFPv3D16 --abi=eabi -me -g --gcc --diag_warning=225 --display_error_number -z -m"ecat_appl.map" -i"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/lib" -i"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --reread_libs --warn_sections --rom_model -o "ecat_appl.out" -l"./configPkg/linker.cmd"  "./EcatStack/tieschw.obj" "./EcatStack/tiescbsp.obj" "./EcatStack/tiescappl.obj" -l"../../../../platform/am335x/evmam335x/lib/evmam335x.lib" -l"../../../../starterware/starterware-starterware-src/binary/armv7a/cgttms470_ccs/am335x/drivers/drivers.lib" -l"../../../../starterware/starterware-starterware-src/binary/armv7a/cgttms470_ccs/am335x/evmAM335x/platform/platform.lib" -l"../../../../drivers/lib/sys_bios_driver.lib" -l"rtsv7A8_A_le_n_v3_eabi.lib" "../am335x.cmd"

<Linking>

undefined           first referenced        

  symbol                 in file             

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

ECAT_CheckTimer     ./EcatStack/tiescappl.obj

MainInit            ./EcatStack/tiescappl.obj

MainLoop            ./EcatStack/tiescappl.obj

OBJ_GetEntryOffset  ./EcatStack/tiescappl.obj

OBJ_GetObjectHandle ./EcatStack/tiescappl.obj

PDI_Isr             ./EcatStack/tieschw.obj 

PDO_InputMapping    ./EcatStack/tiescappl.obj

bRunApplication     ./EcatStack/tiescappl.obj

pEEPROM             ./EcatStack/tiescbsp.obj

error #10234-D: unresolved symbols remain

error #10010: errors encountered during linking; "ecat_appl.out" not built

>> Compilation failure

gmake: *** [ecat_appl.out] Error 1

gmake: Target `all' not remade because of errors.

**** Build Finished ****

  • Scott,

    did you copy the patched sources into the project?

    Regards.

  • Hi,

     

    Yes, I got it to build now.  The README file in the \patches directory for the 0.03 sdk is incorrect; it states to place the EtherCAT source code in to the \ecat_appl directory, but the online instructions state to place the code in the \EcatStack folder. Once all of the *.c and *.h files were in the EcatStack\src folder, it built (although with warnings).

    once I realized that, and deleted / resintalled from scratch, it worked.... 

     

    So I have 2 more questions:

    1) Do I need to generate a new ESI header file before building the ecat_appl application?

    2) Once I have the binary file ecat_appl_SD.bin, do I simply copy it to the micro SD card and place the card into the ICE board, or is there a special tool I need to make the SD card bootable with that file?\

     

    Thank you

     

  • Scott,

    Great!

    1) no, as long as you don't change the application code or any objects you can use the supplied ESI for ecat_appl (see the esi folder). Obviously you need new ESI files for your own products and applications.

    2) Copy and change name to "app". The SPI bootloader will check the SD for that file and load it. So we are not really booting from SD and there is no special bootable SD needed.

    Regards.

  • I've been able to load the default full application to the SD card, and when watching the terminal screen I can see the bootloader is able to find the application, copy to RAM, and run it...

     

    But, when I go into the Beckhoff tool, I am not able to communicate with the device.  I have other off the shelf EtherCAT slave devices that do indeed work, but I don't seem to have any response from this as a slave device.

     

    What is the application supposed to do?

  • Hi,

    So you get below message in console and see rolling LED pattern in digital output LEDs? Please make sure to connect Ethernet cable from master to J2 port which is EtherCAT IN port of ICE.

    EtherCAT Device

    TI Industrial SDK Version - 1.0.0.4

  • Everything is working, thank you again.

     

    --Scott