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.

[C6678] Adding DHCP server to NDK hello project

Hi,

I got some NDK related questions from my customer. They are saying that they want to realize DHCP server with NDK on C6678.

Well I got the latest ProcessorSDK (version 03.01.00) and generated NIMU_emacExample_EVMC6678C66BiosExampleProject by referring the following instructions:

All PDK examples were generated successfully. So I built NIMU_emacExample_EVMC6678C66BiosExampleProject (it is one of generated PDK example code) and it worked with auto IP configuration on C6678EVM.
Next, I changed the code to work with static IP. It worked also.

Now I'm trying to add a DHCP server to this project. My setup looks like this:

C6678EVM(StaticIP/DHCP server) <----------crossover cable-----------> PC(AutoIP)

I was expecting an IP address was leased from C6678 to PC, but unfortunately it did not work.

What i did for NIMU_emacExample_EVMC6678C66BiosExampleProject were :
1. changing static IP address in helloWorld.c:

char *HostName = "tidsp";
char *LocalIPAddr = "192.168.1.2";
char *LocalIPMask = "255.255.255.0";
char *GatewayIP = "192.168.1.1"; 
char *DomainName = "demo.net"; 
char *DNSServer = "0.0.0.0";

2. adding DHCP server configuration in cfg file:

var DhcpServer = xdc.useModule('ti.ndk.config.DhcpServer');
var dhcpServer0Params = new DhcpServer.Params();
dhcpServer0Params.ipAddrPoolBase = "192.168.1.100";
dhcpServer0Params.ipAddrPoolCount = 155;
var dhcpServer0 = DhcpServer.create(dhcpServer0Params);

That's all. The build itself was done successfully. When I load the executable on the EVM, some logs were printed on CCS console:

[C66xx_0] QMSS successfully initialized 
CPPI successfully initialized 
PA successfully initialized 

TCP/IP Stack 'Hello World!' Application

StackTest: using localIp
Network Added: If-1:192.168.1.2

It seems network is up with the pre-defined IP address at EVM side, but there is no log about DHCP server. And in fact, PC did not get an IP address starting from 192.168.1.100.

Maybe, I'm missing something, but it would be appreciated if you had any suggestion for this issue.

Best Regards,
Naoki

P.S.
The build itself was completed successfully, but I saw the following errors at link time. What's this ?

C:/ti/pdk_c667x_2_0_3/packages/pdkAppImageCreate.bat C:/ti/pdk_c667x_2_0_3/packages C:/ti/ti-cgt-c6000_8.1.0 C:/ti/pdk_c667x_2_0_3/packages/MyExampleProjects/NIMU_emacExample_EVMC6678C66BiosExampleProject/Debug NIMU_emacExample_EVMC6678C66BiosExampleProject C6678 dsp

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>set PDK_PATH=C:/ti/pdk_c667x_2_0_3/packages 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>set CG_TOOL_PATH=C:/ti/ti-cgt-c6000_8.1.0 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>set APP_PATH=C:/ti/pdk_c667x_2_0_3/packages/MyExampleProjects/NIMU_emacExample_EVMC6678C66BiosExampleProject/Debug 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>set APP_NAME=NIMU_emacExample_EVMC6678C66BiosExampleProject 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>set SOC=C6678 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>set PROCESSOR=dsp 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>if C6678 == AM437x (goto SOC_AM3_AM4 ) 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>if C6678 == AM335x (goto SOC_AM3_AM4 ) 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>if C6678 == AM572x (goto SOC_AM57XX ) 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>if C6678 == AM571x (goto SOC_AM57XX ) 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>else ( 

C:\ti\pdk_c667x_2_0_3\packages\MyExampleProjects\NIMU_emacExample_EVMC6678C66BiosExampleProject\Debug>echo ERROR: Invalid SOC 
ERROR: Invalid SOC