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.

PROCESSOR-SDK-AM437X: RTOS build fails with SNTP

Part Number: PROCESSOR-SDK-AM437X


I'm using processor_sdk_rtos_am437x_4_03_00_05 and trying to build with the SNTP component supplied in the NDK.

Information from NDK API Reference SNTP client page states that SNTP is now deprecated from the NDK, however it is still included in the nettools folder. It also states that the modules using SNTP must comply with the BSD layer and not use regular sockets.

I have created a task to test with SNTP with the following includes.

#include <stdio.h>

#include <ti/ndk/inc/bsd/socketndk.h>

#include <ti/ndk/nettools/sntp/sntp.h>

However, I get the following error.

C:/ti/ndk_2_26_00_08/packages/ti/ndk/inc/bsd/sys/socket.h:314:19: error: conflicting types for 'select'
static inline int select(int nfds, fd_set *readfds, fd_set *writefds,
^~~~~~
In file included from c:\ti\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabi\include\sys\types.h:68:0,
from c:\ti\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabi\include\stdio.h:61,
from ../TestTask.c:11:
c:\ti\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabi\include\sys\select.h:73:5: note: previous declaration of 'select' was here
int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
^~~~~~

The project was configured to use the NDK using XGCONF, so that added the include paths, and I added the BSD include paths according to the SNTP Client API reference page.

It seems like it should be a simple job to include SNTP, but any combination of includes I use seems to cause a problem. Is there any example code using SNTP for this processor?