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:使用 SNTP 时 RTOS 构建失败

Guru**** 2539500 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/699864/processor-sdk-am437x-rtos-build-fails-with-sntp

器件型号:PROCESSOR-SDK-AM437X

我使用 的是 processor_sdk_rtos_AM437X_4_03_00_05、并尝试使用 NDK 中提供的 SNTP 组件进行构建。

 NDK API 参考 SNTP 客户端页面中的信息指出、SNTP 现在已从 NDK 中弃用、但它仍包含在 nettools 文件夹中。 它还指出、使用 SNTP 的模块必须符合 BSD 层、而不使用常规套接字。

我创建了一个任务、使用 SNTP 进行测试、包括以下内容。

#include

#include

#include

但是、我得到以下错误。

C:/ti/ndk_2_26_00_08/packages/ti/ndk/inc/bsd/sys/socket.h:314:19:错误:"选择"的类型冲突
静态内联 int select (int NFD、fd_set * readfds、fd_set * writefds、
^~~~~~μ A
在包含在 c:\ti\gcc-arm-none-eabi-6-2017-Q1-updates\arm-no-eabi\include\sys\types.h:68:0中的文件中、
从 c:\ti\gcc-arm-none-eabi-6-2017-Q1-updates\arm-no-eabi\include\stdio.h:61、
从./TestTask.c:11:
C:\ti\gcc-arm-none-eabi-6-2017-Q1-updates\arm-none-eabi\include\sys\select.h:73:5:注意:之前的'select'声明在这里
int select __P ((int __n、fd_set *__readfds、fd_set *__writefds、
^~~~~~μ A

该项目配置为使用 XGCONF 的 NDK、因此添加了包含路径、并且我根据 SNTP 客户端 API 参考页面添加了 BSD 包含路径。

包含 SNTP 似乎是一项简单的工作、但任何包含 I 使用的组合似乎都会导致问题。 对于该处理器、是否有使用 SNTP 的任何示例代码?