This demo application demonstrates the Ping demo on lwIP TCP/IP stack with bare metal SDK or different RTOSes.
Overview
This is a Ping Demo on the lwIP TCP/IP stack which uses the ICMP protocol. The application on board periodically sends the ICMP echo request to a PC and processes the PC reply. Type the "ping $board_address" in the PC command window to send an ICMP echo request to the board. The lwIP stack sends the ICMP echo reply 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 KSDK Ping 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_ping_demo/ping_bm/<toolchain>
- RTOS: <SDK_Install>/examples/<board>/demo_apps/lwip/lwip_ping_demo/ping_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 instructions 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 these 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, see a Kinetis SDK User's Guide for your board.
Network Configuration
Configure the IP address of PC network adapters as shown:
Run the demo
-
Download the program to the target board.
-
Connect the Ethernet cable between the PC and the board.
-
When successfully connected, reset the board to run the demo.
-
Open the terminal. Ping send and ping receive are successful.
-
Type in "ping 192.168.2.102" in PC command window. If the operation is successful, four packets are successful replied.