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.

Using NDK/NSP with AM335X ICE

Other Parts Discussed in Thread: OMAPL138, SYSBIOS, OMAP-L138, AM3352, AM3359

I am following instructions from the SPRU523.pdf document regarding creating a project in code composer studio which leverages the NDK/NSP network tools. The platform I have presently is the AM335X ICE development board with the ARM A8 processor.

At build for the project, I receive an error indicating that a library titled "ti.drv.omapl138.aea8fnv" cannot be located. Is this a library that should be dynamically created during the build, or do I need to track down this file and put it in the correct folder?

My latest troubleshooting attempt was to copy the ARM A9 library and rename it, but obviously it results in several unresolved symbol errors.

 

Any help would be appreciated,

 

Garth

  • Specific versions of installed tools are listed below:

     

    CODE COMPOSER STUDIO: 5.4.0.00091

    SDK Industrial SW Development Kit (01.01.00.01)

    IPC (1.25.03.15)

    XDCTools (3.25.02.70)

    SysBIOS (6.35.03.47)

    NDK (2.22.03.20)

    NSP (1.10.02.09)

  • Hi Garth, 

    The driver you are referring to in the post above is for a different device.  The AM335x driver can be found in the Industrial SDK 1.01.00.01 (you have already installed).  Please refer to the User's Guide within the SDK for the exact location.  If this is your first project with the platform, it is also worthwhile to run some of the examples in the SDK and get a better understanding of how the drivers work.

    Thanks,

    -- Emmanuel

  • So far, I have run the following examples:

    i2c_led

    enetLwip_sysbios

    ethercat_slave

    ethernetip_adaptor

     

    These programs have built and run without issue, though features that interface to third party tools have been a little difficult to work with since the state of support they offer is variable.

    As I understand it, the SDK for ICE provide libraries for EtherCAT and Ethernet/IP, but not standard Ethernet as defined in the API for the NDK in spru524.pdf. These protocols supported by the SDK do not have API documents that I can identify, so my ability to build upon the example projects is limited to functions that I can trace in code. Does this sound like an accurate assessment?

    I would also like to get a definitive indication as to whether the NDK offers support for the ARM-A8 core. The ARM-A9 appears to be supported as it is the core that is used in the NDK example project "ndk_evmOMAPL138_arm9_client".

  • Hi Garth,

    The Cortex-A8 is supported in the NDK.  After a little searching I believe the driver you require is called sys_bios_driver.lib.  It can be found: 

    <Industrial SDK Install Dir>\sdk\os_drivers\lib\sys_bios_driver.lib

    Let me know if this works.

    Thanks,

    -- Emmanuel

  • I have the sys_bios_driver.lib library included in the project properties under "Build>ARM Linker>File Search Path". Is there something else I have to do in the project for this library to be utilized in the project?

    The path to the library in the project appears as "${IA_SDK_HOME}/platform/am335x/lib/am335x_platform.lib".

     

    Thanks,


    Garth

  • Hi Garth,

    Seems like you might have some confusion with the libraries for AM335x.  There are two basic libraries every project should have: the peripheral driver library and the platform library.  

    The peripheral driver library contains register addresses, register definitions, bit masks/values and, peripheral functions.  This library is completely platform independent and is part of Starterware (<Industrial SDK Install Dir>\sdk\starterware\binary\armv7a\cgt_ccs\am335x\drivers\driverlib).  

    The platform library, as the name implies, contains a set of functions and defines which are relevant to a particular board featuring the AM335x (Like Starterkit, GP EVM, Beaglebone, ICE, etc.).  This library is built on top of the driver library.  The library for the ICE board is part of the Industrial SDK (<Industrial SDK Install Dir>\sdk\platform\am335x\lib\am335x_platform.lib).

    When using the NDK, an Ethernet driver with special NIMU hooks is required.  All required libraries should be added to your project in "Build>ARM Linker>File Search Path>Include library file or ...".

    Hope this helps,

    -- Emmanuel

  • These are all of the libraries I have linked (listed below). What is the link between these libraries and the ti.drv.omapl138.aeafnv file that prevents this new project from building.

     

    "${IA_SDK_HOME}/protocols/ethernetip_adapter/stack_lib/ethernetip_stack.lib"

    "${IA_SDK_HOME}/platform/am335x/lib/am335x_platform.lib"

    "${IA_SDK_HOME}/os_drivers/lib/sys_bios_driver.lib"

    "${IA_SDK_HOME}/starterware/binary/armv7a/cgt_ccs/am335x/evmAM335x/platform/platform.lib"

    "${IA_SDK_HOME}/starterware/binary/armv7a/cgt_ccs/am335x/drivers/drivers.lib"

    "${IA_SDK_HOME}/starterware/binary/armv7a/cgt_ccs/am335x/system_config/system.lib"

    "libc.a"

     

    Thanks, and sorry for the beginner questions here.

     

  • Hi Garth, 

    The ti.drv.omapl138.aeafnv file is the NDK driver for the OMAP-L138 device.  This driver should not be included in your project, AM335x does not require it.  

    The first driver in the list (ethernetip_stack.lib) is used for Ethernet Industrial Protocol; unless you are planning on using this protocol, the driver should be removed (since you are trying to run a NDK example it is not required).  

    The rest look fine.  If you continue to get errors, please post the build logs and your .cfg file.

    Thanks,

    -- Emmanuel

  • After some time away, I am working on this issue again. Build console is pasted below, and .CFG file is pasted in the next post.

     

    **** Build of configuration Debug for project EtherneXX ****

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

    'Building file: ../app.cfg'

    'Invoking: XDCtools'

    "C:/ti/xdctools_3_25_02_70/xs" --xdcpath="C:/ti/ndk_2_22_03_20/packages;C:/ti/nsp_1_10_02_09/packages;C:/ti/ccsv5/ccs_base;C:/ti/bios_6_35_01_29/packages;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.A8Fnv -p ti.platforms.evmAM3359 -r debug -c "C:/ti/ccsv5/tools/compiler/arm_5.0.4" --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 ...

    Error: Library not found: ti.drv.omapl138.aea8fnv

    Starting build of library sources ...

    making D:/Users/204038600/Documents/NTI_TwoChannel/TI_CCSv5_WorkSpace/EtherneXX/src/sysbios.aea8fnv ...

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

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

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

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

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

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

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

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

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

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

    asmea8fnv C:/ti/bios_6_35_01_29/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.aea8fnv ...

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

    'Building file: ../main.c'

    'Invoking: ARM Compiler'

    "C:/ti/ccsv5/tools/compiler/arm_5.0.4/bin/armcl" -mv7A8 --code_state=32 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --include_path="D:/Users/204038600/Documents/NTI_TwoChannel/TI_CCSv5_WorkSpace/EtherneXX" --include_path="C:/ti/ndk_2_22_03_20/packages/ti/ndk/inc" --include_path="C:/ti/ndk_2_22_03_20/packages/ti/ndk/inc/tools" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/protocols/ethernetip_adapter/firmware" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/protocols/ethernetip_adapter/include" --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/platform/am335x/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/os_drivers/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/os_drivers/include/CPSW" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/os_drivers/include/ICSS" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/starterware" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/starterware/include" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/starterware/include/hw" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/starterware/include/armv7a" --include_path="C:/ti/am335x_sysbios_ind_sdk_1.1.0.1/sdk/starterware/include/armv7a/am335x" --gcc --define=am3352 --define=am3359 --undefine=USE_CPSW_DRIVER --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt"  "../main.c"

    'Finished building: ../main.c'

    ' '

    'Building target: EtherneXX.out'

    'Invoking: ARM Linker'

    "C:/ti/ccsv5/tools/compiler/arm_5.0.4/bin/armcl" -mv7A8 --code_state=32 --abi=eabi -me -g --gcc --define=am3352 --define=am3359 --undefine=USE_CPSW_DRIVER --diag_warning=225 --display_error_number --diag_wrap=off -z --stack_size=0x800 -m"EtherneXX.map" --heap_size=0x800 -i"C:/ti/ccsv5/tools/compiler/arm_5.0.4/lib" -i"C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="EtherneXX_linkInfo.xml" --rom_model -o "EtherneXX.out" -l"./configPkg/linker.cmd"  "./main.obj" -l"C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/protocols/ethernetip_adapter/stack_lib/ethernetip_stack.lib" -l"C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/platform/am335x/lib/am335x_platform.lib" -l"C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/os_drivers/lib/sys_bios_driver.lib" -l"C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/starterware/binary/armv7a/cgt_ccs/am335x/evmAM335x/platform/platform.lib" -l"C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/starterware/binary/armv7a/cgt_ccs/am335x/drivers/drivers.lib" -l"C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/starterware/binary/armv7a/cgt_ccs/am335x/system_config/system.lib" -l"libc.a" "../am335x.cmd"

    <Linking>

    'Finished building target: EtherneXX.out'

    ' '

    "C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk/tools/post_build/post_build.bat" "C:/ti/ccsv5" "C:/ti/ccsv5/tools/compiler/arm_5.0.4" "D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Debug" "EtherneXX" "C:\ti\am335x_sysbios_ind_sdk_1.1.0.1\sdk\tools\isdk_image\" "1" "0" "0x80000000" "0x80000000"

    "COMPILER ARM_5_x"

    warning: duplicate section name

       D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Deb

       ug\EtherneXX.out(.bss) (ignored)

    warning: duplicate section name

       D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Deb

       ug\EtherneXX.out(.neardata) (ignored)

    warning: duplicate section name

       D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Deb

       ug\EtherneXX.out(.rodata) (ignored)

    warning: duplicate section name

       D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Deb

       ug\EtherneXX.out(.stack) (ignored)

    warning: duplicate section name

       D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Deb

       ug\EtherneXX.out(.data) (ignored)

            1 file(s) copied.

    D:\Users\204038600\Documents\NTI_TwoChannel\TI_CCSv5_WorkSpace\EtherneXX\Debug

    Input File - EtherneXX.bin

    Output File - EtherneXX_SD.bin

    Generating TI_Image of [Application] to be stored in [SD Card]

    Input File - EtherneXX.bin

    Output File - EtherneXX_SPI.bin

    Generating TI_Image of [Application] to be stored in [SPI Flash]

    finished

    ' '

    **** Build Finished ****

  • This is the .CFG file for the project. It appears that the "var Emac..." line is where the compiler first acquires reference to the OMAPL138 device. Should this value be changed for the ARM A8 device?

     

    var

    Defaults = xdc.useModule('xdc.runtime.Defaults');

    var

    Diags = xdc.useModule('xdc.runtime.Diags');

    var

    Error = xdc.useModule('xdc.runtime.Error');

    var

    Log = xdc.useModule('xdc.runtime.Log');

    var

    LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');

    var

    Main = xdc.useModule('xdc.runtime.Main');

    var

    Memory = xdc.useModule('xdc.runtime.Memory')

    var

    SysMin = xdc.useModule('xdc.runtime.SysMin');

    var

    System = xdc.useModule('xdc.runtime.System');

    var

    Text = xdc.useModule('xdc.runtime.Text');

    var

    BIOS = xdc.useModule('ti.sysbios.BIOS');

    var

    Global = xdc.useModule('ti.ndk.config.Global');

    var

    Emac = xdc.useModule('ti.drv.omapl138.Emac');

    var

    HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');

    /*

    * Program.argSize sets the size of the .args section.

    * The examples don't use command line args so argSize is set to 0.

    */

    Program.argSize = 0x0;

    /*

    * Uncomment this line to globally disable Asserts.

    * All modules inherit the default from the 'Defaults' module.  You

    * can override these defaults on a per-module basis using Module.common$.

    * Disabling Asserts will save code space and improve runtime performance.

    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;

    */

    /*

    * Uncomment this line to keep module names from being loaded on the target.

    * The module name strings are placed in the .const section. Setting this

    * parameter to false will save space in the .const section.  Error and

    * Assert messages will contain an "unknown module" prefix instead

    * of the actual module name.

    */

    Defaults.common$.namedModule =

    false;

    /*

    * Minimize exit handler array in System.  The System module includes

    * an array of functions that are registered with System_atexit() to be

    * called by System_exit().

    */

    System.maxAtexitHandlers = 4;      

    /*

    * Uncomment this line to disable the Error print function. 

    * We lose error information when this is disabled since the errors are

    * not printed.  Disabling the raiseHook will save some code space if

    * your app is not using System_printf() since the Error_print() function

    * calls System_printf().

    Error.raiseHook = null;

    */

    /*

    * Uncomment this line to keep Error, Assert, and Log strings from being

    * loaded on the target.  These strings are placed in the .const section.

    * Setting this parameter to false will save space in the .const section.

    * Error, Assert and Log message will print raw ids and args instead of

    * a formatted message.

    */

    Text.isLoaded =

    false;

    /*

    * Uncomment this line to disable the output of characters by SysMin

    * when the program exits.  SysMin writes characters to a circular buffer.

    * This buffer can be viewed using the SysMin Output view in ROV.

    */

    SysMin.flushAtExit =

    false;

    /*

    * The BIOS module will create the default heap for the system.

    * Specify the size of this default heap.

    */

    BIOS.heapSize = 0x0;

    /* System stack size (used by ISRs and Swis) */

    Program.stack = 0x400;

    /* Circular buffer size for System_printf() */

    SysMin.bufSize = 128;

    /*

    * Create and install logger for the whole system

    */

    var

    loggerBufParams = new LoggerBuf.Params();

    loggerBufParams.numEntries = 4;

    var

    logger0 = LoggerBuf.create(loggerBufParams);

    Defaults.common$.logger = logger0;

    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    System.SupportProxy = SysMin;

    /*

    * Build a custom BIOS library. The custom library will be smaller than the

    * pre-built "instrumented" (default) and "non-instrumented" libraries.

    *

    * The BIOS.logsEnabled parameter specifies whether the Logging is enabled

    * within BIOS for this custom build.  These logs are used by the RTA and

    * UIA analysis tools.

    *

    * The BIOS.assertsEnabled parameter specifies whether BIOS code will

    * include Assert() checks.  Setting this parameter to 'false' will generate

    * smaller and faster code, but having asserts enabled is recommended for

    * early development as the Assert() checks will catch lots of programming

    * errors (invalid parameters, etc.)

    */

    BIOS.libType = BIOS.LibType_Custom;

    BIOS.logsEnabled =

    false;

    BIOS.assertsEnabled =

    true;

    Global.IPv6 =

    false;

    var

    heapMem0Params = new HeapMem.Params();

    heapMem0Params.instance.name =

    "null";

    heapMem0Params.size = 131072;

    var

    heapMem0 = HeapMem.create(heapMem0Params);

  • Hi Garth,

    The following line is what's causing the OMAPL138 driver to be linked in (as you've guessed already):

        var Emac = xdc.useModule('ti.drv.omapl138.Emac');

    You do not need this in your configuration.  I'm wondering, where did you get your configuration file from?  Was it from an example in the Industrial SDK?  Or did you create your configuration from scratch?  I'm just wondering how that got there.

    Steve

  • This was a project generated from scratch, so I am assuming that code composer chose to include this library based on my component selection, (ARM A8).

    Any ideas on which library should be used for this project? I imagine that if I just remove the existing library, there will be some resources missing that an NDK project normally requires to run successfully.

     

    Thanks,


    Garth

  • Garth,

    Industrial SDK do not support packages, the drivers are included in the SDK as libs. As you have already found out, the NDK driver for AM335x resides in sdk/os_drivers project.

    We do not have a exclusive Ethernet application in the SDK, but Ethernet/IP example works on this. This example would be an excellent reference for an Ethernet application. Please find more details about the NDK driver APIs here http://processors.wiki.ti.com/index.php/AM335x_NDK_Driver_API_Guide .

    Regards,
    Vinesh 

  • HI,

    i am working on am335x ICE v2 .

    getting below error.

    Error: Can't find the platform package 'ti.platforms.evmAM3359'. TI platforms are no longer shipped as part of XDCtools (C:/ti/xdctools_3_30_06_67_core). Please ensure you are either using a pre-3.30 version of XDCtools or you have added a product that includes your platform support along the path 'C:/ti/bios_6_35_03_47/packages;C:/Users/mohammed.asif/workspace_v6_0_ICE/i2c_led/.config;C:/ti/xdctools_3_30_06_67_core/packages'. Check that this path names a directory containing the necessary platform support and that the platform name is properly spelled.

    kindly let me know what is the problem.

    if possible send the procedure to work ICE am3359 with CCS V6

    Regards,

    Mohammed Asif

  • Hi,

    Which example/SDK are you using?

    Regards,
    Vinesh

  • Hi Vinesh,

    Thanks for the response, basic LED example from sdk.

    Regards,

    Mohammed asif.

  • Hi,

    Which version of Industrial SDK?

    Regards,
    Vinesh
  • am335x_sysbios_ind_sdk_1.1.0.8 and am335x_sysbios_ind_sdk_1.1.0.6
  • Hi,

    Couple of things here
    - Are you sure the recommended software is installed? processors.wiki.ti.com/.../AM335x_SYSBIOS_Industrial_SDK_01.01.00.08_User_Guide
    - While importing the project, do NOT select 'Copy to workspace'.

    Regards,
    Vinesh
  • yes i followed the same..