The demo uses:
uIP and LPCUSB are licensed separately from FreeRTOS. Users must familiarise themselves with the uIP and LPCUSB licenses respectively.
FreeRTOS has made some modifications to the uIP stack since this demo was created. See the Embedded Ethernet Examples List page for more information.
The FreeRTOS Cortex M3 port includes a full interrupt nesting model. Interrupt priorities must be set in accordance with the instructions on the Customisation page for correct operation.
See also the FAQ My application does not run, what could be wrong?
The FreeRTOS zip file download contains the files for all the ports and demo application projects. It therefore contains many more files than used by this demo. See the Source Code Organization section for a description of the downloaded files and information on creating a new project.
The IP address used by the demo is set by the constants configIP_ADDR0 to configIP_ADDR3 within the file FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/FreeRTOSConfig.h. The MAC address and net mask are configured within the same header file.
The IP addresses used by the web browser computer and the MCB1768 development board must be compatible. This can be ensured by making the first three octets of both IP addresses identical. For example, if the web browser computer uses IP address 192.168.100.1, then the development board can be given any address in the range 192.168.100.2 to 192.168.100.254 (barring any addresses already present on the network).
The following tasks and tests are created in addition to the standard demo tasks:
This only executes every five seconds. Its main function is to check that all the standard demo tasks are still operational. The check function maintains a status string that can be viewed on the "Task Stats" page served by the uIP TCP/IP web server.
This is the task that handles the uIP stack. All TCP/IP processing is performed in this task.
This is the task that handles the USB stack. The USB device will enumerate as a CDC device. The USB task simply echoes received characters with an offset which by default is one. Therefore if 'A' is received 'B' will be echoed back. If 'x' is received 'y' will be echoed back, etc.
When executing correctly the demo application will behave as follows:
Note that a queue is used to pass each individual character between the USB interrupt service routine and the USB task. This is a convenient method for a slow echo server, but very inefficient if large amounts of data are to be transferred.

![]() The served RTOS stats page showing status information on each task in the system. |
![]() The served run time stats page showing the processor utilisation of each task. |

The IO page provides a simple interface that permits data to be sent to an LED. The check box permits the state of the user LED to be both set and queried. Changes are sent to the target hardware by clicking the "Update IO" button.
The TCP Stats and Connections pages display run time networking information.
This sets the frequency of the RTOS tick. The supplied value of 1000Hz is useful for testing the kernel functionality but is faster than most applications require. Lowering this value will improve efficiency.
See the kernel configuration documentation for full information on these configuration constants.
The lowest priority on a Cortex M3 core is in fact 255 - however different Cortex M3 vendors implement a different number of priority bits and supply library functions that expect priorities to be specified in different ways. Use the supplied examples as a reference.
Each port #defines 'portBASE_TYPE' to equal the most efficient data type for that processor. This port defines portBASE_TYPE to be of type long.
Note that vPortEndScheduler() has not been implemented.
Unlike most ports, interrupt service routines that cause a context switch have no special requirements and can be written as per the compiler documentation. The macro portEND_SWITCHING_ISR() can be used to request a context switch from within an ISR. An example interrupt service routine called vEMAC_ISR() is provided in FreeRTOS/Demo/CORTEX_LPC1768_GCC_Rowley/webserver/emac.c. This should be used as a reference example.
Note that portEND_SWITCHING_ISR() will leave interrupts enabled.