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.

AM335x Processor SDK RTOS NDK

Genius 5785 points
Other Parts Discussed in Thread: SYSBIOS

Hello,

I'm trying running NDK on BBB. It seems like no response to issue PING from my pc to 192.168.1.4. I referred to the following text and altered a definition from EVM_AM335X to BBB_AM335X. Then I created new project attached. I didn't change any source codes and configuration file. The IP address of my pc is fixed address. (192.168.1.1 or 192.168.1.2)

C:\ti\pdk_am335x_1_0_1\packages\ti\transport\ndk\nimu\example\am335x\armv7\bios\NIMU_BasicExample_evmAM335x_armExampleproject.txt

The outputs of serial terminal and ccs console are below.

// Terminal
SetPhyMode:21e1 Auto:1, FD10:64, HD10:32, FD100:256, HD100:128, FD1000:8192 LPBK:0

SYS/BIOS Ethernet/IP (CPSW) Sample application
ENETPHY_FindingState: PhyNum: 0
ENETPHY_DisablePhy(0)
Enable Phy to negotiate external connection
NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
Negotiated connection: FullDuplex 1000 Mbs

// Console
[CortxA8] Network Added: If-1:192.168.1.4

My software environments are below:
  CCS: v6.1.2
  Compiler: GNU v4.8.4
  XDC: v3.31.2.38(core)
  Processor SDK RTOS: v2.0.1.7
  PDK: v1.0.1
  NDK: v2.24.3.35
  SYS/BIOS: v6.45.0.19

Do I need to call any functions? Please give me some advice.

Regards,
Kazu

2867.NDK_test.zip

  • I've moved your thread to the device forum.

    Todd
  • Kazu Kon said:
    Enable Phy to negotiate external connection
    NWAY Advertising: FullDuplex-1000 FullDuplex-100 HalfDuplex-100 FullDuplex-10 HalfDuplex-10
    Negotiated connection: FullDuplex 1000 Mbs

    BBB does not have a 1000Mbps Ethernet connection. The code will need to be modified by you to correctly support the network connection on BBB.

  • Hello Biser,

    Thank you for your quick reply. I recreated a project as AM3358EVM and ran a program on the EVM. I saw same message in a terminal, "Negotiated connection: FullDuplex 1000 Mbs". It's working fine to respond PING.

    Actually I'd like to run a program as BSD socket API. I added small client.c to my project while referring to NDK API UG(SPRU524I / 3.4.1 Using the BSD Sockets Compatibility Layer). But some compile errors occur as below. It looks caused to the definition for _types_fd_set. The project is attached. Please give me some advice.


    **** Build of configuration Debug for project NDK_test_BSD ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../nimu_evm.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_31_02_38_core/xs" --xdcpath="C:/ti/bios_6_45_00_19/packages;C:/ti/ndk_2_24_03_35/packages;C:/ti/pdk_am335x_1_0_1/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p ti.platforms.beaglebone -r release -c "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3" "../nimu_evm.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring nimu_evm.xa8fg from package/cfg/nimu_evm_pa8fg.cfg ...
    generating custom ti.sysbios library makefile ...
     Linking with library ti.transport.ndk.nimu:./lib/am335x/armv7/ti.transport.ndk.nimu.am335x.aa8fg
     Linking with library ti.board:./lib/evmAM335x/armv7/ti.board.aa8fg
     Linking with library ti.drv.gpio:./lib/armv7/ti.drv.gpio.aa8fg
     Linking with library ti.drv.i2c:./lib/armv7/ti.drv.i2c.aa8fg
     Linking with library ti.drv.uart:./lib/armv7/ti.drv.uart.aa8fg
     Linking with library ti.osal:./lib/tirtos/armv7/ti.osal.aa8fg
    Starting build of library sources ...
    making C:/WORK/CCSv6/AM335x_ProcessorSDK/NDK_test_BSD/src/sysbios/sysbios.aa8fg ...
    gmake[1]: Entering directory `C:/WORK/CCSv6/AM335x_ProcessorSDK/NDK_test_BSD/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `C:/WORK/CCSv6/AM335x_ProcessorSDK/NDK_test_BSD/src/sysbios'
    Build of libraries done.
    cla8fg package/cfg/nimu_evm_pa8fg.c ...
    'Finished building: ../nimu_evm.cfg'
    ' '
    'Building file: ../UART_soc.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -DSOC_AM335x -DEVM_AM335X -Dam3352 -I"C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd" -g -gstrict-dwarf -Wall -MMD -MP -MF"UART_soc.d" -MT"UART_soc.d" -c -MMD -MP -o"UART_soc.o" @"configPkg/compiler.opt" "../UART_soc.c"
    'Finished building: ../UART_soc.c'
    ' '
    'Building file: ../client.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -DSOC_AM335x -DEVM_AM335X -Dam3352 -I"C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd" -g -gstrict-dwarf -Wall -MMD -MP -MF"client.d" -MT"client.d" -c -MMD -MP -o"client.o" @"configPkg/compiler.opt" "../client.c"
    In file included from C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:45:0,
                     from ../client.c:44:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h: In function 'FD_ZERO':
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:123:33: error: '_types_fd_set' has no member named 'count'
     #define NDK_FD_ZERO(p)      ((p)->count=0)
                                     ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:118:5: note: in expansion of macro 'NDK_FD_ZERO'
         NDK_FD_ZERO(set);
         ^
    In file included from ../client.c:44:0:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h: In function 'FD_CLR':
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:129:5: warning: passing argument 1 of 'fdsetRemoveEntry' from incompatible pointer type [enabled by default]
         NDK_FD_CLR((SOCKET)fd, set);
         ^
    In file included from C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:45:0,
                     from ../client.c:44:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:111:21: note: expected 'struct fd_set *' but argument is of type 'struct _types_fd_set *'
     extern void         fdsetRemoveEntry( fd_set *pSet, void *hEntry );
                         ^
    In file included from ../client.c:44:0:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h: In function 'FD_ISSET':
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:140:5: warning: passing argument 1 of 'fdsetTestEntry' from incompatible pointer type [enabled by default]
         return (NDK_FD_ISSET((SOCKET)fd, set));
         ^
    In file included from C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:45:0,
                     from ../client.c:44:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:112:21: note: expected 'struct fd_set *' but argument is of type 'struct _types_fd_set *'
     extern unsigned int fdsetTestEntry( fd_set *pSet, void *hEntry );
                         ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h: In function 'FD_SET':
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:115:36: error: '_types_fd_set' has no member named 'count'
     #define NDK_FD_SET(n, p)    {if((p)->count<NDK_FD_SETSIZE){(p)->fd[(p)->count++]=(n);}}
                                        ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:151:5: note: in expansion of macro 'NDK_FD_SET'
         NDK_FD_SET((SOCKET)fd, set);
         ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:115:63: error: '_types_fd_set' has no member named 'fd'
     #define NDK_FD_SET(n, p)    {if((p)->count<NDK_FD_SETSIZE){(p)->fd[(p)->count++]=(n);}}
                                                                   ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:151:5: note: in expansion of macro 'NDK_FD_SET'
         NDK_FD_SET((SOCKET)fd, set);
         ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:115:71: error: '_types_fd_set' has no member named 'count'
     #define NDK_FD_SET(n, p)    {if((p)->count<NDK_FD_SETSIZE){(p)->fd[(p)->count++]=(n);}}
                                                                           ^
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:151:5: note: in expansion of macro 'NDK_FD_SET'
         NDK_FD_SET((SOCKET)fd, set);
         ^
    In file included from ../client.c:44:0:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h: In function 'select':
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:263:5: warning: passing argument 2 of 'fdSelect' from incompatible pointer type [enabled by default]
         return fdSelect(nfds, readfds, writefds, exceptfds, timeout);
         ^
    In file included from C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:45:0,
                     from ../client.c:44:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:331:15: note: expected 'struct fd_set *' but argument is of type 'struct _types_fd_set *'
     extern int    fdSelect( int width, fd_set *readfds, fd_set *writefds,
                   ^
    In file included from ../client.c:44:0:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:263:5: warning: passing argument 3 of 'fdSelect' from incompatible pointer type [enabled by default]
         return fdSelect(nfds, readfds, writefds, exceptfds, timeout);
         ^
    In file included from C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:45:0,
                     from ../client.c:44:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:331:15: note: expected 'struct fd_set *' but argument is of type 'struct _types_fd_set *'
     extern int    fdSelect( int width, fd_set *readfds, fd_set *writefds,
                   ^
    In file included from ../client.c:44:0:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:263:5: warning: passing argument 4 of 'fdSelect' from incompatible pointer type [enabled by default]
         return fdSelect(nfds, readfds, writefds, exceptfds, timeout);
         ^
    In file included from C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/sys/socket.h:45:0,
                     from ../client.c:44:
    C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd/socketndk.h:331:15: note: expected 'struct fd_set *' but argument is of type 'struct _types_fd_set *'
     extern int    fdSelect( int width, fd_set *readfds, fd_set *writefds,
                   ^
    gmake: *** [client.o] Error 1
    'Building file: ../main_evmAM335x.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard -DSOC_AM335x -DEVM_AM335X -Dam3352 -I"C:/ti/ndk_2_24_03_35/packages/ti/ndk/inc/bsd" -g -gstrict-dwarf -Wall -MMD -MP -MF"main_evmAM335x.d" -MT"main_evmAM335x.d" -c -MMD -MP -o"main_evmAM335x.o" @"configPkg/compiler.opt" "../main_evmAM335x.c"
    'Finished building: ../main_evmAM335x.c'
    ' '
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****


    Regards,
    KazuNDK_test_BSD.zip

  • Yes, this is normal. The AM335X GP EVM does have a 1000Mbps Ethernet connection. I will ask the software team to help on your software questions.
  • Hello Biser,

    I found the known issue in the release note. I added a compile option of _POSIX_SOURCE definition to application file (client.c). It looks like no errors.

    software-dl.ti.com/.../ndk_2_24_03_35_release_notes.html

    Regards,
    Kazu