Under the pdk_c6657_1_1_2_6/pacakges/ti/drv/emac directory I used "gmake clean" and "gmake all" commands to rebuilt the emac and got the error.
gmake -f ./lib/ti.drv.emac.ae66.mk lib/ti.drv.emac.ae66 gmake[1]: Entering directory `C:/ti/pdk_C6657_1_1_2_6/packages/ti/drv/emac' cle66 src/emac_drv.c ... if [ ! -d lib/src ]; then mkdir -p lib/src ; fi; rm -f lib/src/emac_drv.oe66.dep C:/ti/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c -mo -o3 -q -k -eo.o -mv6600 --abi=eabi -dEMAC_DEBUG -dC6657 -mv6600 -i./src -i. -i./test -Dti_targets_elf_C66 -DMAKEFILE_BUILD -eo.oe66 -ea.se66 -fr=lib/src -fs=lib/src -ppa -ppd=lib/src/emac_drv.oe66.dep -I. -I/packages -IC:/ti/ccsv5/tools/compiler/c6000_7.4.2/include -I/home/gtbldadm/ti/ipc_1_24_03_32/packages -I/home/gtbldadm/ti/bios_6_33_06_50/packages -I/home/gtbldadm/ti/xdctools_3_23_04_60/packages -I/packages -I/home/gtbldadm/ti/pdk_C6657_1_1_2_6/packages/ti/csl -I../../.. -fc src/emac_drv.c "src/emac_drv.c", line 55: fatal error: could not open source file "csl_emac.h" 1 fatal error detected in the compilation of "src/emac_drv.c". Compilation terminated.
The original makefile from the PDK has a INCDIR
export INCDIR := $(EDMA3LLD_BIOS6_INSTALLDIR)/packages;$(C6X_GEN_INSTALL_PATH)/include;/home/gtbldadm/ti/ipc_1_24_03_32/packages;/home/gtbldadm/ti/bios_6_33_06_50/packages;/home/gtbldadm/ti/xdctools_3_23_04_60/packages;$(UIA_INSTALLDIR)/packages;/home/gtbldadm/ti/pdk_C6657_1_1_2_6/packages/ti/csl;$(ROOTDIR)
Then I tried using the XDC command to regenerate the makefile and rebuilt emac, but got similar error.
gmake -f ./lib/ti.drv.emac.ae66.mk lib/ti.drv.emac.ae66 gmake[1]: Entering directory `C:/ti/pdk_C6657_1_1_2_6/packages/ti/drv/emac' cle66 src/emac_drv.c ... if [ ! -d lib/src ]; then mkdir -p lib/src ; fi; rm -f lib/src/emac_drv.oe66.dep C:/ti/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c -mo -o3 -q -k -eo.o -mv6600 --abi=eabi -dEMAC_DEBUG -dC6657 -mv6600 -i./src -i. -i./test -Dti_targets_elf_C66 -DMAKEFILE_BUILD -eo.oe66 -ea.se66 -fr=lib/src -fs=lib/src -ppa -ppd=lib/src/emac_drv.oe66.dep -I. -I../../.. -IC:\ti\xdctools_3_23_04_60/packages -IC:\ti\PDK_C6~1\packages/. -IC:/ti/ccsv5/tools/compiler/c6000_7.4.2/include -IC:/ti/edma3_lld_02_11_05_02/packages -I -I../../.. -fc src/emac_drv.c "src/emac_drv.c", line 55: fatal error: could not open source file "csl_emac.h" 1 fatal error detected in the compilation of "src/emac_drv.c". Compilation terminated.
The regenerated makefile has a INCDIR, ti/csl is not in the path.
export INCDIR := ../../..;$(XDC_INSTALL_PATH)/packages;$(PDK_INSTALL_PATH)/.;$(C6X_GEN_INSTALL_PATH)/include;$(EDMA3_LLD_INSTALL_PATH)/packages;;$(ROOTDIR
The next thing I tried is manually modify the makefile and change /home/gtbldadm/ti/pdk_C6657_1_1_2_6/packages/ti/csl to c:/ti/pdk_C6657_1_1_2_6/packages/ti/csl then the rebuild worked.
Which file should I modify (config.bld? package.bid?) to regenerate the makefile with the correct INCDIR?