请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MCU-PLUS-SDK AM263X 工具与软件:
大家好、团队成员:
我正在使用 am263x MCU_PLUS_SDK 中提供的 lwip 示例、并尝试将多个 UDP 客户端连接到 UDP 服务器。 我只能连接4个套接字、在创建套接字的其余部分、我收到错误消息、表示套接字创建失败。 是内存限制吗? 有人能帮我启用更多套接字吗?
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.
工具与软件:
大家好、团队成员:
我正在使用 am263x MCU_PLUS_SDK 中提供的 lwip 示例、并尝试将多个 UDP 客户端连接到 UDP 服务器。 我只能连接4个套接字、在创建套接字的其余部分、我收到错误消息、表示套接字创建失败。 是内存限制吗? 有人能帮我启用更多套接字吗?
注意:本指南适用于 MCU_PLUS_SDK 中的所有器件。 为了便于参考、常见问题解答中使用了 AM263x。 要将其用于其他器件、只需将 AM263x 基准替换为您选择的器件即可。
您好!
LwIP 协议栈和 am26x 器件能够支持大量的同时 TCP/UDP 连接。 开箱即用 LwIP 协议栈配置为同时具有3个原始连接、4个 UDP 连接和5个 TCP 活动连接。 这是为了避免 LwIP 协议栈 bloating。 例如、 如果您需要总共20个活动连接、请按照以下步骤操作:
无法从 CCS 重新编译 LwIP 库。 执行以下步骤重新编译 LwIP 堆栈:
在顶级 MCU_PLUS_SDK 文件夹中、运行以下命令。 (确保在链接到 CCS 工程的 SDK 中运行这些步骤)。
# Add PROFILE=debug to build for debug # replace nortos with freertos if you want to build freertos based lwip libs # CLEAN gmake -sj -f makefile.am263x lwipif-cpsw-nortos_r5f.ti-arm-clang_clean gmake -sj -f makefile.am263x lwip-nortos_r5f.ti-arm-clang_clean gmake -sj -f makefile.am263x lwip-contrib-nortos_r5f.ti-arm-clang_clean # BUILD gmake -sj -f makefile.am263x lwipif-cpsw-nortos_r5f.ti-arm-clang gmake -sj -f makefile.am263x lwip-nortos_r5f.ti-arm-clang gmake -sj -f makefile.am263x lwip-contrib-nortos_r5f.ti-arm-clang
其他参考资料:
此致、
Shaunak