请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F28388D 主题中讨论的其他器件:C2000WARE
您好!
是否有人可以在 tcpEcho 示例中显示配置静态 IP 而不是动态 IP 的步骤?
谢谢你。
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.
您好!
是否有人可以在 tcpEcho 示例中显示配置静态 IP 而不是动态 IP 的步骤?
谢谢你。
您好!
您可以将项目中 NDK_tirtos.c 文件的 initIP()函数更新为以下内容,以将 DHCP 客户机更改为自动 IP。 它基本上添加 了 CFGTAG _IPNet 配置。
/* Add our global hostname to hCfg (to be claimed in all connected domains) */
CfgAddEntry(hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 0,
strlen(hostName),
(unsigned char *)hostName, 0);
/* Configure IP address manually on interface 1 */
CI_IPNET NA;
CI_ROUTE RT;
/* Setup manual IP address */
bzero(&NA, sizeof(NA));
NA.IPAddr = inet_addr("192.168.0.4");
NA.IPMask = inet_addr("255.255.255.0");
strcpy(NA.Domain, "yash.com");
NA.NetType = 0;
CfgAddEntry(hCfg, CFGTAG_IPNET, 1, 0,
sizeof(CI_IPNET), (unsigned char *)&NA, 0);
/*
* Add the default gateway. Since it is the default, the
* destination address and mask are both zero (we go ahead
* and show the assignment for clarity).
*/
bzero(&RT, sizeof(RT));
RT.IPDestAddr = 0;
RT.IPDestMask = 0;
RT.IPGateAddr = inet_addr("192.168.99.1");
CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, 0,
sizeof(CI_ROUTE), (unsigned char *)&RT, 0);
您可以参阅此 e2e 中提及的文档 以获得进一步帮助。
此致、
Yashwant
感谢你的答复。 我已经进行了这些更改。 但我得到了这些误差
Building file: "../ndk_tirtos.c" Invoking: ARM Compiler "C:/ti/ti-cgt-arm_18.12.2.LTS/bin/armcl" -mv7M3 --code_state=16 --float_support=none -me --include_path="C:/ti/ns_2_60_01_06/source/ti/net/bsd" --include_path="C:/ti/nsp_1_10_03_15/packages/ti/ndk" --include_path="C:/ti/bios_6_76_01_12/packages/ti/posix/ccs" --include_path="C:/ti/ns_2_60_01_06/source" --include_path="C:/ti/ndk_f2838x_3_61_01_01/source" --include_path="C:/Users/Sahan Sanjaya/workspace_v10/tcpEchoF2838X" --include_path="C:/ti/ti-cgt-arm_18.12.2.LTS/include" --define=ccs -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="ndk_tirtos.d_raw" --cmd_file="configPkg/compiler.opt" "../ndk_tirtos.c" "../ndk_tirtos.c", line 257: warning #225-D: function "bzero" declared implicitly "../ndk_tirtos.c", line 213: warning #179-D: function "serviceReport" was declared but never referenced Finished building: "../ndk_tirtos.c" Building target: "tcpEchoF2838X.out" Invoking: ARM Linker "C:/ti/ti-cgt-arm_18.12.2.LTS/bin/armcl" -mv7M3 --code_state=16 --float_support=none -me --define=ccs -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --ual -z -m"tcpEchoF2838X.map" --heap_size=0 --stack_size=256 -i"C:/ti/ns_2_60_01_06/source/ti/net/lib/ccs/m4" -i"C:/ti/ndk_f2838x_3_61_01_01/source/ti/ndk/drivers/f2838x/lib" -i"C:/ti/ndk_f2838x_3_61_01_01/source/ti/ndk/slnetif/lib" -i"C:/ti/ndk_f2838x_3_61_01_01/source" -i"/driverlib/f2838x/driverlib_cm/ccs/Release" -i"C:/ti/ti-cgt-arm_18.12.2.LTS/lib" -i"C:/ti/ti-cgt-arm_18.12.2.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="tcpEchoF2838X_linkInfo.xml" --rom_model -o "tcpEchoF2838X.out" "./main_tirtos.obj" "./ndk_tirtos.obj" "./tcpecho.obj" "./tcpechohooks.obj" "../TMS320F2838X.cmd" -l"configPkg/linker.cmd" -lslnetsock_release.a -ldriverlib_cm.lib -l"ti/ndk/slnetif/lib/slnetifndk.aem4" -l"ti/ndk/netctrl/lib/netctrl_min_ipv4.aem4" -l"ti/ndk/nettools/lib/nettool_ipv4.aem4" -l"ti/ndk/hal/ser_stub/lib/hal_ser_stub.aem4" -l"ti/ndk/hal/userled_stub/lib/hal_userled_stub.aem4" -l"ti/ndk/os/lib/os.aem4" -l"ti/ndk/stack/lib/stk.aem4" -lemac_f2838x.aem4 -lslnetifndk.aem4 -l"ti/ndk/hal/timer_bios/lib/hal_timer.aem4" -llibc.a <Linking> error #10008-D: cannot find file "driverlib_cm.lib" warning #10247-D: creating output section ".binit" without a SECTIONS specification undefined first referenced symbol in file --------- ---------------- SysCtl_enablePeripheral C:/ti/ndk_f2838x_3_61_01_01/source/ti/ndk/drivers/f2838x/lib/emac_f2838x.aem4<ethernet.oem4> SysCtl_resetPeripheral C:/ti/ndk_f2838x_3_61_01_01/source/ti/ndk/drivers/f2838x/lib/emac_f2838x.aem4<ethernet.oem4> error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "tcpEchoF2838X.out" not built