...
If no project that include µC/TCP-IP is available, you should follow the µC/TCP-IP Getting Started Guide to ensure to have a working project which use fix IP address before installing µC/DHCPc. Then you can follow the following steps to build and run a first µC/DHCPc sample example application.
Including Additional Modules to the Project
...
Refer to the following manuals for further information about MIcrium modules:.
Including µC/DHCPc Source Code
Include the following files in your project tree from the µC/DHCPc source code distribution, as indicated in Figure - µC/DHCPc Source Code
Panel | ||
---|---|---|
|
...
As indicated in the Figure - µC/DHCPc Source Code, all the files in the Source folder must be added to your project tree. Furthermore, dhcp-c_os.c/h files of the selected RTOS must be added.
...
\Micrium\Software\uC-DHCPc
\Micrium\Software\uC-DHCPc\OS\<OS type>
\Micrium\Software\uC-TCPIP
\Micrium\Software\uC-<OS-Version>
...
Copying and Modifying Template Files
Copy the files from the uC-DHCPc configuration folder into your application as illustrated in:
Panel | ||
---|---|---|
| ||
dhcp-c_cfg.h
is a configuration file used to setup set up µC/DHCPc module static parameters and features such as ports, timeout, broadcast bit and so on. Refer to section Module Configuration for more details on all the configurations inside dhcp-c_cfg.h
Adding µC/DHCPc application function
Before running the sample example application, you will need to add the new funtion function call, in your app.c file to initialize and setup the µC/DHCPc module. Section Sample Example Application gives an example of how to initialize µC/DHCPc and start DHCP negotiation on an interface.
...
Since the µC/TCP-IP module was added to the sample example project, the following include must be added to the app.c file :
#include <Source/dhcp-c.h>