This demo application demonstrates the HTTPServer demo on lwIP TCP/IP stack with bare metal SDK or different RTOSes.
Overview
This is an HTTPServer set up on lwIP TCP/IP stack with bare metal SDK or different RTOSes. The user uses an Internet browser to send a request for connection. The board acts as an HTTP server and sends a Web page back to the PC.
Supported RTOS
- Freescale MQX™ RTOS
- FreeRTOS
- µC/OS-II
- µC/OS-III
- Bare Metal (no RTOS)
Supported Hardware
These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis software development kit HTTPServer demo.
- FRDM-K64F
- TWR-K60D100M
- TWR-K64F120M
- TWR-K65F180M
System Requirement
Hardware requirements
- J-Link ARM
- P&E Micro Multi-link universal
- Mini/micro USB cable
- USB A to micro AB cable
- Hardware (tower/base board, ...) for specific device
- Personal Computer
Toolchain requirements
- IAR embedded Workbench version 7.30.4
- ARM GCC 4.8.3 2014q3
- Keil MDK 5.13
- Kinetis Design Studio IDE v.2.5.0
- Atollic TrueSTUDIO for ARM win32 v5.2.1
Software requirements
- The project files are in:
- Baremetal: <SDK_Install>/examples/<board>/demo_apps/lwip/lwip_httpserver_demo/httpserver_bm/<toolchain>
- RTOS: <SDK_Install>/examples/<board>/demo_apps/lwip/lwip_httpserver_demo/httpserver_rtos/<rtos>/<toolchain>
- Library dependencies:
- Baremetal, FreeRTOS, uC/OS: ksdk_platform_lib
- MQX RTOS: mqx_<board>, mqx_stdlib_<board>
Getting Started
See the lwIP TCPIP Stack and Kinetis SDK Integration User's Guide (document KSDKLWIPUG) for more information about the setup and requirements.
Prepare the Demo
- Connect a USB cable between the PC host and the OpenSDA USB port on the board.
- Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
- Download the program to the target board.
- Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
For detailed instructions steps, see a Kinetis SDK User's Guide for your board.
Network Configuration
Configure the IP address of PC network adapters as shown: IP address - 192.168.2.100 Subnet Mask - 255.255.255.0
Run the demo
-
Download the program to target board, which should be installed in TWR or FRDM.
-
Connect the Ethernet cable between the PC and the board.
-
When successfully connected, reset the board to run the demo.
-
Open the PC command window, type in "ping 192.168.2.102" to test whether lwIP stack is running. If successful, four echo request packets are successfully replied.
-
Input "192.168.2.102" in the URL of an Internet browser on a PC. If successful, the web page which the board returns opens in the browser.