2 Replies Latest reply on Nov 12, 2014 7:03 PM by maaashjp

    How to use BSD layer on ThreadX-NetX_Duo stack

    maaashjp

      Hi,

       

      I'm trying to build my app using BSD socket layer.

      I wrote

      #include "netx_bsd_layer/nxd_bsd.h"
      


      but ./make outputs following error:

       

      % ./make snip.udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo
      Making config file for first time
      +-----------------------------------------------------------------------------------------------------+
      | IMPORTANT NOTES                                                                                     |
      +-----------------------------------------------------------------------------------------------------+
      | Wi-Fi MAC Address                                                                                   |
      |    The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt                 |
      |    Ensure each target device has a unique address.                                                  |
      +-----------------------------------------------------------------------------------------------------+
      | MCU & Wi-Fi Power Save                                                                              |
      |    It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz |
      |    reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave   |
      |    Application Note located in the documentation directory if you plan to use powersave features.   |
      +-----------------------------------------------------------------------------------------------------+
      Making .gdbinit
      Building Bootloader
      Finished Building Bootloader
      
      
      Processing resources
      Creating security credentials
      Making DCT image
      Compiling App_udp_sample
      Compiling Platform_ISM43362_M3G_L44
      Compiling NetX_Duo
      Compiling WICED
      Compiling SPI_Flash_Library_ISM43362_M3G_L44
      Compiling WWD_ThreadX_Interface
      Compiling WICED_ThreadX_Interface
      Compiling WWD_NetX_Duo_Interface
      Compiling WICED_NetX_Duo_Interface
      Compiling Supplicant_BESL
      Compiling Lib_HTTP_Server
      Compiling Lib_DNS_Redirect_Daemon
      Compiling Lib_DNS
      Compiling WWD_for_SDIO_ThreadX
      Compiling Lib_Wiced_RO_FS
      Compiling STM32F2xx
      Compiling Lib_DHCP_Server
      Compiling Lib_base64
      Compiling common_GCC
      Compiling STM32F2xx_Peripheral_Drivers
      Compiling Ring_Buffer
      Compiling STM32F2xx_Peripheral_Libraries
      Making snip_udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo.elf
      build/snip_udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo/libraries/App_udp_sample.a(UDPProtocol.o): In function `snip::openUDP()':
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:27: undefined reference to `socket(int, int, int)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:34: undefined reference to `bind(int, sockaddr*, int)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:37: undefined reference to `ioctl(int, int, int*)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:42: undefined reference to `inet_addr(char const*)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:46: undefined reference to `setsockopt(int, int, int, void const*, int)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:51: undefined reference to `inet_addr(char const*)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:53: undefined reference to `setsockopt(int, int, int, void const*, int)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:59: undefined reference to `setsockopt(int, int, int, void const*, int)'
      build/snip_udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo/libraries/App_udp_sample.a(UDPProtocol.o): In function `snip::sendUDP(sonycsl_openecho::Frame&)':
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:81: undefined reference to `socket(int, int, int)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:85: undefined reference to `inet_addr(char const*)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:110: undefined reference to `sendto(int, char*, int, int, sockaddr*, int)'
      build/snip_udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo/libraries/App_udp_sample.a(UDPProtocol.o): In function `snip::receive()':
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:145: undefined reference to `recvfrom(int, char*, int, int, sockaddr*, int*)'
      snip/WICED/WICED-SDK-MFi-3.1.1/apps/snip/udp_sample/UDPProtocol.cpp:154: undefined reference to `inet_ntoa(in_addr)'
      make[1]: *** [build/snip_udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo/binary/snip_udp_sample-ISM43362_M3G_L44-ThreadX-NetX_Duo.elf] Error 1
      make: *** [main_app] Error 2
      %  
      

       

      Compiler successfully found header, but the actual functions don't exist.

      The directory structure assumes WICED/WICED-SDK-MFi-3.1.1/WICED/network/NetX_Duo/ver5.7_sp1/netx_bsd_layer/nxd_bsd.c to exist but it doesn't.

      How can I get nxd_bsd.c or it's compiled library?