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.

TMDX654IDKEVM: NIMU ICSSG example build

Part Number: TMDX654IDKEVM

Hi all,

I am trying to build and execute the Nimu_icssg_example application from CCS. I have included all the source code and flags as described in the makefile of the example into my CCS project, and then edited the .cfg file to include the necessary driver components as described in the makefile as well. The components required are:

Now I have included the required components in the .cfg file (see .cfg file here nimuExample_a53.cfg), and I got the following error messages:

This took me quite a while to solve, and after hours online, I placed the configuration of Udma above that of the Emac, and the project built successfully. However, when I upload the project onto the A53_0 core, I cannot ping the board. When I build from the makefiles however, and upload the binary, I can successfully ping the board.

I believe the problem has to do with the linking of the ti.transport.ndk.nimu_icssg.aa53fg, as currently the ti.transport.ndk.nimu.aa53fg library gets linked from the .cfg file and I need the first mentioned library according to the makefile. See my build log: 

NIMU build log.txt
**** Clean-only build of configuration Debug for project PRUSS_EMAC_TEST ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 clean -O 
 
DEL /F  "PRUSS_EMAC_TEST.hex"  "configPkg\linker.cmd" "configPkg\compiler.opt"  "PRUSS_EMAC_TEST.out" 
DEL /F "emac_fw_config_dual_mac.o" "main_am65xx.o" "test_utils_k3.o" 
DEL /F "emac_fw_config_dual_mac.d" "main_am65xx.d" "test_utils_k3.d" 
RMDIR /S/Q  "configPkg\" 
Kan C:\PRU_EMAC_TEST1\PRUSS_EMAC_TEST\Debug\PRUSS_EMAC_TEST.hex niet vinden
Finished clean
 

**** Build Finished ****

**** Build of configuration Debug for project PRUSS_EMAC_TEST ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
 
Building file: "../emacUnitTest_a53.cfg"
Invoking: XDCtools
"C:/ti/xdctools_3_51_01_18_core/xs" --xdcpath="C:/ti/bios_6_75_02_00/packages;C:/ti/pdk_am65xx_1_0_5/packages;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A53F -p ti.platforms.cortexA:AM65X -r release -c "C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf" "../emacUnitTest_a53.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring emacUnitTest_a53.xa53fg from package/cfg/emacUnitTest_a53_pa53fg.cfg ...
	 SoC Type is 
	 SoC Type is am65xx
generating custom ti.sysbios library makefile ... 
	Linking with library ti.drv.pruss:./lib/am65xx/a53/release/ti.drv.pruss.aa53fg
	Linking with library ti.drv.emac:./lib/am65xx/a53/release/ti.drv.emac.aa53fg
	Linking with library C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/udma/./lib/am65xx/mpu1_0/release/udma.aa53fg
	Linking with library ti.board:./lib/am65xx_idk/a53/release/ti.board.aa53fg
	Linking with library ti.drv.i2c:./lib/a53/release/ti.drv.i2c.aa53fg
	Linking with library C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/sciclient/./lib/am65xx/mpu1_0/release/sciclient.aa53fg
	Linking with library ti.drv.uart:./lib/am65xx/a53/release/ti.drv.uart.aa53fg
	Linking with library ti.osal:./lib/tirtos/a53/release/ti.osal.aa53fg
	Linking with library ti.csl:./lib/am65xx/a53/release/ti.csl.aa53fg
Starting build of library sources ...
making C:/PRU_EMAC_TEST1/PRUSS_EMAC_TEST/src/sysbios/sysbios.aa53fg ...
Build of libraries done.
cla53fg package/cfg/emacUnitTest_a53_pa53fg.c ...
Finished building: "../emacUnitTest_a53.cfg"
 
Building file: "../emac_fw_config_dual_mac.c"
Invoking: GNU Compiler
"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-gcc.exe" -c -mcpu=cortex-a53+fp+simd -mtune=cortex-a53 -fno-exceptions -Dam6548 -Dcore0 -DAARCH64 -DSOC_AM6X -Dam65xx_idk -DSOC_AM65XX -Dam65xx -DUSE_BIOS -DBUILD_MPU1_0 -DBUILD_MPU -DEMAC_TEST_APP_ICSSG -I"C:/PRU_EMAC_TEST1/PRUSS_EMAC_TEST" -I"C:/ti/pdk_am65xx_1_0_5/packages/ti/board/src/am65xx_evm/include" -I"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/aarch64-elf/include" -O0 -g -gdwarf-3 -gstrict-dwarf -Wall -Werror -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -mabi=lp64 -MMD -MP -MF"emac_fw_config_dual_mac.d" -MT"emac_fw_config_dual_mac.o"  @"configPkg/compiler.opt" -o"emac_fw_config_dual_mac.o" "../emac_fw_config_dual_mac.c"
Finished building: "../emac_fw_config_dual_mac.c"
 
Building file: "../main_am65xx.c"
Invoking: GNU Compiler
"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-gcc.exe" -c -mcpu=cortex-a53+fp+simd -mtune=cortex-a53 -fno-exceptions -Dam6548 -Dcore0 -DAARCH64 -DSOC_AM6X -Dam65xx_idk -DSOC_AM65XX -Dam65xx -DUSE_BIOS -DBUILD_MPU1_0 -DBUILD_MPU -DEMAC_TEST_APP_ICSSG -I"C:/PRU_EMAC_TEST1/PRUSS_EMAC_TEST" -I"C:/ti/pdk_am65xx_1_0_5/packages/ti/board/src/am65xx_evm/include" -I"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/aarch64-elf/include" -O0 -g -gdwarf-3 -gstrict-dwarf -Wall -Werror -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -mabi=lp64 -MMD -MP -MF"main_am65xx.d" -MT"main_am65xx.o"  @"configPkg/compiler.opt" -o"main_am65xx.o" "../main_am65xx.c"
Finished building: "../main_am65xx.c"
 
Building file: "../test_utils_k3.c"
Invoking: GNU Compiler
"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-gcc.exe" -c -mcpu=cortex-a53+fp+simd -mtune=cortex-a53 -fno-exceptions -Dam6548 -Dcore0 -DAARCH64 -DSOC_AM6X -Dam65xx_idk -DSOC_AM65XX -Dam65xx -DUSE_BIOS -DBUILD_MPU1_0 -DBUILD_MPU -DEMAC_TEST_APP_ICSSG -I"C:/PRU_EMAC_TEST1/PRUSS_EMAC_TEST" -I"C:/ti/pdk_am65xx_1_0_5/packages/ti/board/src/am65xx_evm/include" -I"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/aarch64-elf/include" -O0 -g -gdwarf-3 -gstrict-dwarf -Wall -Werror -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -mabi=lp64 -MMD -MP -MF"test_utils_k3.d" -MT"test_utils_k3.o"  @"configPkg/compiler.opt" -o"test_utils_k3.o" "../test_utils_k3.c"
Finished building: "../test_utils_k3.c"
 
Building target: "PRUSS_EMAC_TEST.out"
Invoking: GNU Linker
"C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-gcc.exe" -mtune=cortex-a53 -fno-exceptions -Dam6548 -Dcore0 -DAARCH64 -DSOC_AM6X -Dam65xx_idk -DSOC_AM65XX -Dam65xx -DUSE_BIOS -DBUILD_MPU1_0 -DBUILD_MPU -DEMAC_TEST_APP_ICSSG -O0 -g -gdwarf-3 -gstrict-dwarf -Wall -Werror -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -mcpu=cortex-a53+fp+simd -Wl,-Map,"PRUSS_EMAC_TEST.map" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/bios_6_75_02_00/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/emac/lib/am65xx/a53/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/uart/lib/am65xx/a53/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/osal/lib/tirtos/am65xx/a53/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/csl/lib/am65xx/a53/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/pruss/lib/am65xx/a53/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/udma/lib/am65xx/mpu1_0/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/board/lib/am65xx_evm/a53/release" -L"C:/ti/pdk_am65xx_1_0_5/packages/ti/drv/sciclient/lib/am65xx/mpu1_0/release" -Wl,--defsym,CORE0=1 -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 -o"PRUSS_EMAC_TEST.out" "./emac_fw_config_dual_mac.o" "./main_am65xx.o" "./test_utils_k3.o" -Wl,-T"../emac_linker_a53.lds" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lgcc -lm -lrdimon -lc -Wl,--end-group 
Finished building target: "PRUSS_EMAC_TEST.out"
 

**** Build Finished ****

The ti.transport.ndk.nimu_icssg.aa53fg library according to me uploades the firmware to the relevant PRU and RTU by defining the symbol NIMU_ICSSG, whereas the ti.transport.ndk.nimu.aa53fg library does not. However I can not seem to include this library successfully into my project. I can not call var Nimu =xdc.loadPackage(' ti.transport.ndk.nimu_icssg') as one normally would, and defining NIMU_ICSSG does not make a difference at all. 

When manually linking the libraries from Project Properties->GNU Linker, I again get the errors that there is an undefined reference to the Cache, as mentioned at the beginning of this thread. When rearranging the order, the problem does not go away. Could anyone please assist as to how I can include this library without having to go and include each individual header file in my project?

The following is true for my project:

CCS  Version: 9.1.0.00010 

XDC tools: xdctools_3_51_01_18_core

PDK: pdk_am65xx_1_0_5

NDK: ndk_3_60_00_13

BIOS: bios_6_75_02_00

As mentioned, the project build, upload to the development board and executes successfully, however I cannot ping the board. This suggest to me that the firmware is not uploaded correctly. Any assistance would be much appreciated as soon as possible!

Kind regards,

Johhny

  • So removing var Nimu = xdc.loadPackage('ti.transport.ndk.nimu') from the .cfg file, defining NIMU_ICSSG in Project Properties->GNU Compiler->Symbols, and including nimu_eth.c and nimu_eth.h from v7 of the nimu driver, the project builds successfully and I can ping the board successfully.

    Is there no easier way of importing these libraries as xdc packages? Importing every source file individually, for me, defeats the purpose of a XDC package.

    Kind regards,

    Johnny

  • Hi, 

    Thanks for reporting your solution. I'll see if I can get you some feedback on alternatives to make it easier.

  • Hi Johnny,

    Sorry for the inconvenience. As you can see, we are moving away from the CCS projects and use makefile based build instead.

    Here is how the makefile works when building the nimu_icss example:

    pdk_am65xx_1_0_5\packages\ti\transport\ndk\nimu\nimu_component.mk

          pdk_am65xx_1_0_5\packages\ti\transport\ndk\nimu\build\makefile_icssg.mk (defined NIMU_ICSSG)

                pdk_am65xx_1_0_5\packages\ti\transport\ndk\nimu\src\v7\src _files_v7.mk

          pdk_am65xx_1_0_5\packages\ti\transport\ndk\nimu\example\am65xx\icssg\makefile (defined NIMU_APP_ICSSG)

    The reason you cannot include Nimu_icss = xdc.loadPackage('ti.transport.ndk.nimu_icss') is that the XDC package "ti.transport.ndk.nimu_icss" does not exist. If you look at the pdk_am65xx_1_0_5\packages\ti\transport\ndk\nimu\package.xdc. The only XDC package defined is "package ti.transport.ndk.nimu". Both nimu and nimu_icss libraries are part of the XDC package. 

    The most straightforward way to convert a makefile build project into a CCS project is to start with the xyz_component.mk (nimu_component.mk) file, then follow the sub-makefiles for the libraries (makefile_icssg.mk and src _files_v7.mk) and the application (example\am65xx\icssg\makefilemakefile). You can include all the source file in one project or separate them in library project and application project.

    Unfortunately there is no tools to convert the makefile to CCS project files directly.

    Hope it helps for your future CCS project creation.

    Ming

  • Hi Ming,

    Thanks for your reply. Yes I know there is now nimu_icssg package, only the nimu package, which is why I got stuck because I was not sure as to how to include the correct library into my project as I felt including each individual source file is a bit tedious. Linking it from Project Settings->GNU Linker also gave errors.

    However going forward I think it would be best for us to just create  library projects for all the driver components required.

    Thanks again,

    Regards,

    Johnny

  • Hi Johnny,

    >> However going forward I think it would be best for us to just create  library projects for all the driver components required.

    Agreed. This way, it is easier to set up the dependency.

    Ming

  • Hi Johnny,

    Would you mind mark this thread as "Resolved"?

    Thanks!

    Ming