Tool/software: TI-RTOS
Hi,
I am getting linking error when I try to include the emac driver on my project. My project properties are same as example project. 'NIMU_BasicExample_bbbAM335x_armExampleProject'. The only difference is that I want to use configuration manager API on my project rather than XGCONF tool. Hence, I created my project from scratch. Here are the versions of different components I am using:
BIOS: 6_73_01_01
compiler: gcc-arm-none-eabi-7-2017-q4-major
EDMA3 LLD: 2.12.5
NDK: 3.40.1.01
am335x PDK: 1.0.13
This is what my build log looks like:
**** Build of configuration Debug for project Echoring_ConfigManagerAPI ****
/home/vishav/ti/ccsv8/utils/bin/gmake -k -j 8 all -O
Building file: "../app.cfg"
Invoking: XDCtools
"/home/vishav/ti/xdctools_3_51_01_18_core/xs" --xdcpath="/home/vishav/ti/bios_6_73_01_01/packages;/home/vishav/ti/ndk_3_40_01_01/packages;/home/vishav/ti/edma3_lld_2_12_05_30C/packages;/home/vishav/ti/pdk_am335x_1_0_13/packages;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p ti.platforms.beaglebone -r release -c "/home/vishav/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major" "../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.xa8fg from package/cfg/app_pa8fg.cfg ...
generating custom ti.sysbios library makefile ...
Linking with library ti.transport.ndk.nimu:./lib/am335x/a8/release/ti.transport.ndk.nimu.aa8fg
Linking with library ti.board:./lib/bbbAM335x/a8/release/ti.board.aa8fg
Linking with library ti.drv.uart:./lib/am335x/a8/release/ti.drv.uart.aa8fg
Linking with library ti.drv.gpio:./lib/a8/release/ti.drv.gpio.aa8fg
Linking with library ti.drv.i2c:./lib/a8/release/ti.drv.i2c.aa8fg
Linking with library ti.drv.emac:./lib/am335x/a8/release/ti.drv.emac.aa8fg
Linking with library ti.osal:./lib/tirtos/a8/release/ti.osal.aa8fg
Linking with library ti.csl:./lib/am335x/a8/release/ti.csl.aa8fg
Starting build of library sources ...
making /home/vishav/workspace_new/Echoring_ConfigManagerAPI/src/sysbios/sysbios.aa8fg ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm_gnu.asm ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/TaskSupport_asm_gnu.asm ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/Cache_asm_gnu.sv7A ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/Mmu_asm_gnu.sv7A ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/TimestampProvider_asm_gnu.sv7A ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/intcps/Hwi_asm_gnu.sv7A ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/exc/Exception_asm_gnu.asm ...
asma8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/timers/dmtimer/Timer_asm_gnu.sv7A ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/BIOS.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/IntrinsicsSupport.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/TaskSupport.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Clock.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Idle.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Intrinsics.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Event.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Mailbox.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Queue.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Semaphore.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Swi.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/knl/Task.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/Cache.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/Core.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/CoreNull.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/Hwi.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/Hwi_stack.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/Hwi_startup.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/Seconds.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/hal/SecondsClock.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/Cache.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/Mmu.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/TimestampProvider.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/rts/gnu/ReentSupport.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/intcps/Hwi.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/exc/Exception.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/gates/GateHwi.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/gates/GateMutex.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/heaps/HeapMem.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/timers/dmtimer/Timer.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/sysbios/family/arm/a8/ti81xx/TimerSupport.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/clock.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/mqueue.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread_barrier.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread_cond.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread_key.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread_mutex.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread_rwlock.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/pthread_util.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/sched.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/semaphore.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/sleep.c ...
cla8fg /home/vishav/ti/bios_6_73_01_01/packages/ti/posix/tirtos/timer.c ...
ara8fg arm_IntrinsicsSupport_asm_gnu.o arm_TaskSupport_asm_gnu.o a8_Cache_asm_gnu.o a8_Mmu_asm_gnu.o a8_TimestampProvider_asm_gnu.o intcps_Hwi_asm_gnu.o exc_Exception_asm_gnu.o dmtimer_Timer_asm_gnu.o _BIOS.o arm_IntrinsicsSupport.o arm_TaskSupport.o knl_Clock.o knl_Idle.o knl_Intrinsics.o knl_Event.o knl_Mailbox.o knl_Queue.o knl_Semaphore.o knl_Swi.o knl_Task.o hal_Cache.o hal_Core.o hal_CoreNull.o hal_Hwi.o hal_Hwi_stack.o hal_Hwi_startup.o hal_Seconds.o hal_SecondsClock.o a8_Cache.o a8_Mmu.o a8_TimestampProvider.o gnu_ReentSupport.o intcps_Hwi.o exc_Exception.o gates_GateHwi.o gates_GateMutex.o heaps_HeapMem.o dmtimer_Timer.o ti81xx_TimerSupport.o tirtos_clock.o tirtos_mqueue.o tirtos_pthread.o tirtos_pthread_barrier.o tirtos_pthread_cond.o tirtos_pthread_key.o tirtos_pthread_mutex.o tirtos_pthread_rwlock.o tirtos_pthread_util.o tirtos_sched.o tirtos_semaphore.o tirtos_sleep.o tirtos_timer.o ...
Build of libraries done.
cla8fg package/cfg/app_pa8fg.c ...
In file included from /home/vishav/ti/ndk_3_40_01_01/packages/ti/ndk/inc/socket.h:43:0,
from /home/vishav/ti/ndk_3_40_01_01/packages/ti/ndk/inc/stacksys.h:86,
from /home/vishav/ti/ndk_3_40_01_01/packages/ti/ndk/inc/netmain.h:39,
from package/cfg/app_pa8fg.c:2782:
/home/vishav/ti/ndk_3_40_01_01/packages/ti/ndk/inc/socketndk.h:94:0: warning: "_SYS_SELECT_H" redefined
#define _SYS_SELECT_H 1 // TODO: still needed for struct timeval conflict
In file included from /home/vishav/ti/bios_6_73_01_01/packages/gnu/targets/arm//libs/install-native/arm-none-eabi/include/sys/types.h:68:0,
from /home/vishav/ti/bios_6_73_01_01/packages/gnu/targets/arm//libs/install-native/arm-none-eabi/include/time.h:28,
from package/cfg/app_pa8fg.c:2746:
/home/vishav/ti/bios_6_73_01_01/packages/gnu/targets/arm//libs/install-native/arm-none-eabi/include/sys/select.h:13:0: note: this is the location of the previous definition
#define _SYS_SELECT_H
package/cfg/app_pa8fg.c: In function 'ti_ndk_config_Global_stackThread':
package/cfg/app_pa8fg.c:2799:9: warning: unused variable 'rc' [-Wunused-variable]
int rc;
^~
Finished building: "../app.cfg"
making ../src/sysbios/sysbios.aa8fg ...
gmake[1]: Nothing to be done for 'all'.
Building file: "/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/transport/ndk/nimu/example/src/nimu_osal.c"
Invoking: GNU Compiler
"/home/vishav/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a8 -march=armv7-a -mtune=cortex-a8 -marm -mfloat-abi=hard -Dam3359 -I"/home/vishav/workspace_new/Echoring_ConfigManagerAPI" -I"/home/vishav/ti/bios_6_73_01_01/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/newlib-nano" -I"/home/vishav/ti/bios_6_73_01_01/packages/ti/posix/gcc" -I"/home/vishav/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"nimu_osal.d" -MT"nimu_osal.o" -std=c99 @"configPkg/compiler.opt" -o"nimu_osal.o" "/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/transport/ndk/nimu/example/src/nimu_osal.c"
Finished building: "/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/transport/ndk/nimu/example/src/nimu_osal.c"
Building file: "../main.c"
Invoking: GNU Compiler
"/home/vishav/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a8 -march=armv7-a -mtune=cortex-a8 -marm -mfloat-abi=hard -Dam3359 -I"/home/vishav/workspace_new/Echoring_ConfigManagerAPI" -I"/home/vishav/ti/bios_6_73_01_01/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/newlib-nano" -I"/home/vishav/ti/bios_6_73_01_01/packages/ti/posix/gcc" -I"/home/vishav/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.o" -std=c99 @"configPkg/compiler.opt" -o"main.o" "../main.c"
../main.c: In function 'StackTest':
../main.c:119:8: warning: implicit declaration of function 'bzero' [-Wimplicit-function-declaration]
bzero( &NA, sizeof(NA) );
^~~~~
Finished building: "../main.c"
making ../src/sysbios/sysbios.aa8fg ...
gmake[2]: Nothing to be done for 'all'.
Building target: "Echoring_ConfigManagerAPI.out"
Invoking: GNU Linker
"/home/vishav/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc" -mtune=cortex-a8 -marm -Dam3359 -Og -g -gdwarf-3 -gstrict-dwarf -Wall -mfloat-abi=hard -Wl,-Map,"Echoring_ConfigManagerAPI.map" -nostartfiles -static -Wl,--gc-sections -L"/home/vishav/ti/bios_6_73_01_01/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard" -L"/home/vishav/ti/ndk_3_40_01_01/packages/ti/ndk/os/lib" -L"/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 --specs=nano.specs -o"Echoring_ConfigManagerAPI.out" "./main.o" "./nimu_osal.o" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lgcc -lm -lnosys -lsoc -lc -lrdimon -l:os.aa8fg -Wl,--end-group
makefile:147: recipe for target 'Echoring_ConfigManagerAPI.out' failed
/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/drv/emac/lib/am335x/a8/release/ti.drv.emac.aa8fg(emac_drv_v4.oa8fg): In function `EMAC_poll_v4':
emac_drv_v4.c:(.text.EMAC_poll_v4+0xe0): undefined reference to `ENETPHY_Tic'
/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/drv/emac/lib/am335x/a8/release/ti.drv.emac.aa8fg(emac_cpsw.oa8fg): In function `EMAC_loopbackSetup':
emac_cpsw.c:(.text.EMAC_loopbackSetup+0x170): undefined reference to `ENETPHY_UserAccessWrite'
emac_cpsw.c:(.text.EMAC_loopbackSetup+0x184): undefined reference to `ENETPHY_UserAccessRead'
emac_cpsw.c:(.text.EMAC_loopbackSetup+0x1a4): undefined reference to `ENETPHY_UserAccessRead'
emac_cpsw.c:(.text.EMAC_loopbackSetup+0x1c8): undefined reference to `ENETPHY_UserAccessWrite'
emac_cpsw.c:(.text.EMAC_loopbackSetup+0x1dc): undefined reference to `ENETPHY_UserAccessRead'
emac_cpsw.c:(.text.EMAC_loopbackSetup+0x1fc): undefined reference to `ENETPHY_UserAccessWrite'
/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/drv/emac/lib/am335x/a8/release/ti.drv.emac.aa8fg(emac_cpsw.oa8fg): In function `EMAC_cpswUpdatePhyStatus':
emac_cpsw.c:(.text.EMAC_cpswUpdatePhyStatus+0x60): undefined reference to `ENETPHY_GetLoopback'
emac_cpsw.c:(.text.EMAC_cpswUpdatePhyStatus+0x80): undefined reference to `ENETPHY_GetSpeed'
emac_cpsw.c:(.text.EMAC_cpswUpdatePhyStatus+0x9c): undefined reference to `ENETPHY_GetPhyNum'
emac_cpsw.c:(.text.EMAC_cpswUpdatePhyStatus+0xf0): undefined reference to `ENETPHY_GetLinked'
emac_cpsw.c:(.text.EMAC_cpswUpdatePhyStatus+0x11c): undefined reference to `ENETPHY_GetDuplex'
/home/vishav/ti/pdk_am335x_1_0_13/packages/ti/drv/emac/lib/am335x/a8/release/ti.drv.emac.aa8fg(emac_cpsw.oa8fg): In function `EMAC_cpswOpen':
emac_cpsw.c:(.text.EMAC_cpswOpen+0x380): undefined reference to `ENETPHY_Init'
emac_cpsw.c:(.text.EMAC_cpswOpen+0x3a8): undefined reference to `ENETPHY_SetPhyMode'
collect2: error: ld returned 1 exit status
gmake[1]: *** [Echoring_ConfigManagerAPI.out] Error 1
gmake: *** [all] Error 2
makefile:143: recipe for target 'all' failed
**** Build Finished ****
Please find attached the cfg file of my project.5756.app.cfg
I request you to please help me with this issue.
Regards
Vishav