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/PRU-ICSS-INDUSTRIAL-SW: EtherCAT Slave build error

Part Number: PRU-ICSS-INDUSTRIAL-SW

Tool/software: Code Composer Studio

Hi,

I'm trying to build the ethercat slave inside my ubuntu VM and i'm getting a few errors about undeclared variables that I dont know how to resolve.

I check against my windows build environment. it has these sames variables defined in the same places but the windows build doesn't complain about these variables.

How do I get this to build in linux?

  • Hi Steven,

    Which version of CCS and Processor SDK RTOS were you using?

    And which device (AM335x, AM437x, AM572x...) were you building for?

    Regards,
    Garrett

  • Hi Garrett,

    I am using CCS9.1 with processor sdk rtos am65xx 6.1.0.8 and trying to build PRU ICSS EtherCAT Slave 1.0.7.2.

  • Steven,

    Please use the sdk version 5.1 as noted here - 

    We will be releasing a new EtherCAT package in a week, which is compatible with sdk v6.x

    Regards,

    Garrett

  • Hi Garrett,

    Thanks for getting back to me. I eventually fixed out I have to use SDK5.

    Do you happen to know how to get ethercat slave to work with jailhouse on AM65?

  • Steven,

    We don't have etherCAT ported to AM65x with Jailhouse. It's only available on AM57x.

    Regards,

    Garrett

  • Hi Garrett,

    On this other E2E post, Dave Bell seems to indicate that it is possible to get EtherCAT jailhouse working for AM65.

    I have modified the EtherCAT jailhouse AM57 makefile to suit AM65.

    Now I'm stuck at the board_jh.c file, not sure what to change to initialize the clock.

    3718.Makefile.txt
    EXE = ethercat_slave_demo
    
    #**** rules.mk ***************************************************************
    
    CROSS_COMPILE = $(TOOLCHAIN_PATH_A53)/bin/aarch64-elf-
    CC=$(CROSS_COMPILE)gcc
    LD=$(CROSS_COMPILE)gcc
    AR=$(CROSS_COMPILE)ar
    BIN=$(CROSS_COMPILE)objcopy
    OBJDUMP=$(CROSS_COMPILE)objdump
    BINFLAGS=-O binary
    
    OBJS = $(patsubst %.c,%.o,$(CSRCS))
    OBJS += $(patsubst %.S,%.o,$(ASRCS))
    
    # Install path for PRU-ICSS-EtherCAT_Slave
    # Update the path in the line below as needed and then uncomment the line
    IA_SDK_HOME=/home/lam/ti/ccs910/PRU-ICSS-EtherCAT_Slave_01.00.07.02
    ifeq (,$(IA_SDK_HOME))
    $(error must specify IA_SDK_HOME)
    endif
    
    CCS_COPT=-DSOC_AM65XX -Dam6548 -Dcore0 -DAARCH64 -DECAT_MII -DNO_UART_MSG_APP -DECAT_LIMITED_DEMO \
    	-O2 -Wall
    
    	
    CCS_INCDIRS=-I$(PDK_INSTALL_PATH) \
    	-I$(IA_SDK_HOME) \
    	-I$(IA_SDK_HOME)/examples \
    	-I$(IA_SDK_HOME)/protocols/ethercat_slave/include \
    	-I$(IA_SDK_HOME)/protocols/ethercat_slave/ecat_appl/EcatStack \
    	-I$(IA_SDK_HOME)/protocols/ethercat_slave/ecat_appl/idkAM65xx \
    	-I$(IA_SDK_HOME)/protocols/ethercat_slave/firmware/g_v1.0
    
    GCCOPT = -gdwarf-2 -gstrict-dwarf -Wall -mtune=cortex-a53 \
    	 -g \
    	 
    CCS_L=-DSOC_AM65XX \
     -DNO_UART_MSG_APP \
     -DECAT_LIMITED_DEMO \
     -O2 \
     -ffunction-sections \
     -fdata-sections \
     -nodefaultlibs
    
    
    LDIR=-L$(BIOS_INSTALL_PATH)/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard \
         -L$(IA_SDK_HOME)/third_party/protocols/ethercat_slave/stack_lib/am65xx/a53 \
    
    
    
    INCDIRS = -I$(XDC_INSTALL_PATH)/packages \
    	  -I$(BIOS_INSTALL_PATH)/packages \
    	  $(CCS_INCDIRS)
    
    XDC_OPT = -Dxdc_target_types__="gnu/targets/arm/std.h" \
    	  -Dxdc_target_name__=A53F
    
    CFLAGS = $(GCCOPT) -g $(INCDIRS) $(XDC_OPT) -mcpu=cortex-a53 \
    	 $(CCS_COPT) -D_JAILHOUSE_INMATE
    
    LDFLAGS= $(GCCOPT) -Dam6548 -Dcore0 \
         $(CCS_L) \
         -Wl,-Map,$(EXE).map -nostartfiles \
         -static -Wl,--gc-sections $(LDIR) --specs=nano.specs \
         -Wl,--defsym,CORE0=1 \
         -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 \
         -Wl,--start-group \
         $(OBJS) \
         -Wl,-T$(LDS) \
         -Wl,--start-group -lrdimon -lgcc -lc \
         -lethercat_slave_stack_AM65xx_arm \
         -Wl,--end-group \
    
    #******************************************************************************
    
    VPATH = $(PDK_INSTALL_PATH)/ti/drv/pruss/soc/am65xx \
    	$(PDK_INSTALL_PATH)/ti/drv/gpio/soc/am65xx \
    	$(PDK_INSTALL_PATH)/ti/drv/uart/soc/am65xx \
    	$(IA_SDK_HOME)/examples/board/idkAM65xx \
    	$(IA_SDK_HOME)/examples/board/common \
    	$(IA_SDK_HOME)/examples/ethercat_slave \
    	$(IA_SDK_HOME)/examples/osal \
    	$(IA_SDK_HOME)/protocols/ethercat_slave/ecat_appl/idkAM65xx \
    	$(IA_SDK_HOME)/protocols/ethercat_slave/ecat_appl/EcatStack \
    	./src
    
    
    CSRCS = pruicss_soc.c GPIO_soc.c UART_soc.c \
    	board_phy.c \
    	board_misc.c board_dp83867.c board_dpphy.c tiescutils.c \
    	tiescappl.c tiesc_soc.c tiescphy_dp83867.c delay_us.c \
    	tiesc_fw_cir_buff.c tiescbsp.c tieschw.c \
    	tiescmiscappl.c \
    	board_jh.c TaskP_tirtos.c OSP_tirtos.c
    
    LDS = ./bios/configPkg/linker.cmd
    
    all: $(EXE).bin
    
    $(EXE).out: $(LDS) $(OBJS)
    	$(LD) $(LDFLAGS) -o $@
    
    $(EXE).bin: $(EXE).out
    	sed -i -e 's/org = 0x80000000, len = 0x80000000/org = 0x90000000, len = 0x70000000/g' $(LDS)
    	$(BIN) $(BINFLAGS) $< $@
    
    $(LDS):
    	$(MAKE) -C ./bios sysbios
    
    clean:
    	$(MAKE) -C ./bios clean
    	rm -rf *.o *.map *.a *.bin *.out *.d
    
    install: $(EXE).bin
    	cp $(EXE).bin $(INSTALL_DIR)
    
    -include ../Rules.mk
    
    

  • Hi Steven,

    I noticed further discussion on the thread you referred to, will be closing this one.

    Regards,
    Garrett