Featured FreeRTOS+IO and FreeRTOS+CLI Demo
Using the LPCXpresso Base Board BSP
IntroductionThis page describes two FreeRTOS+IO and FreeRTOS+CLI demo applications that use the LPCXpresso Base Board BSP. The second demo integrates lwIP and FatFS to provide a Telnet “like” command line interface to files stored on an SD card.
These are quite comprehensive demos. Simpler code snippets can be found on the quick examples page, and on most of the FreeRTOS+IO and FreeRTOS+CLI documentation pages. Additional complete projects that are smaller, and projects that run in the FreeRTOS Windows simulator, will be provided in due course.
These demos use the standard FreeRTOS Cortex-M3 GCC port. It is important that users wishing to use this port without FreeRTOS+IO first consult the port documentation to gain an understanding of the interrupt configuration settings required to use the FreeRTOS interrupt nesting model. The FAQ that documents the most common mistakes made when using a multitasking kernel on a Cortex-M device is a good place to start.
On this page:
- A description of the demo 1 functionality
- A description of the demo 2 functionality
- Source and project files download link
- Hardware platform and software tools
- Build instructions
- Connecting the hardware and starting a debug session
- Navigating the projects and directories
- Software component licensing
Relevant Jumper ConfigurationJumpers must be set correctly! Relevant jumper settings are pictured below.
In this demo, FreeRTOS+CLI and FreeRTOS+IO are used
to create the following examples:
Relevant Jumper ConfigurationJumpers must be set correctly! Relevant jumper settings are pictured below. Note the settings in the first picture are different to those shown for Demo 1!
In this demo, FreeRTOS+CLI, FreeRTOS+IO,
are used to create the following examples. NOTE: An SD card
must be inserted for this demo to run!.
Start the LPCXpresso IDE.
Create a new workspace, or select an existing workspace when prompted.
Select “Import” from the IDE “File” menu, then select “Existing Projects Into Workspace”, as
shown below, before clicking “Next”.
Selecting “Existing Projects Into Workspace” in the Import dialogue box
Click the “Select Archive File” radio button, ensure the
“Copy projects into workspace” check box is checked, then
navigate to and select the zip file downloaded in step one.
The dialogue box will list a number of project files. Ensure all the projects are selected, then click finish. The import process will attempt to create some files more than once – resulting in a dialogue box being displayed that warns of the potential for files to be overwritten. When this happens, simply select the “No to all” option.
Ensure each project is checked as all the projects are required to build the application.
The imported projects will appear in the LPCXpresso IDE’s project
explorer window. To build demo 1, select “FreeRTOS-Plus-Demo-1” in the project
explorer, then select “Build Project” from the IDE
“Project” menu. Building FreeRTOS-Plus-Demo-1 will result in
all its dependent projects being built too.
Likewise, to build project 2, select “FreeRTOS-Plus-Demo-2” in the project window before selecting “Build Project” from the IDE “Project” menu.
Selecting “Build Project” with FreeRTOS-Plus-Demo-1 selecting in the project explorer
Connect a USB cable between the USB socket on the LPCXpresso
base board and the host computer. Only after this first connection
has been made, connect a second USB cable
between the debug USB socket on the LPCXpresso CPU board and
the host computer. Note: This sequence seems to be
important in order for a debug session to be started successfully.
Each demo requires slightly different jumper settings. The
jumper settings are pictured next to the demo descriptions
above. Ensure the jumpers are set correctly for the selected demo,
and, if Demo 2 is selected, also ensure an SD card has been
inserted into the relevant connector on the base board (the demo will
not run without it!).
Click the debug speed button in the LPCXpresso IDE to start
a debug session.
The location of the debug speed button in the LPCXpresso IDE
|CMSISv2p00_LPC17xx||This is the standard CMSIS library provided by NXP for the LPC17xx family of microcontrollers.|
|lpc17xx.cmsis.driver.library||This is the peripheral driver library provided by NXP for the LPC17xx family of microcontrollers. It is used, in part, by the FreeRTOS+IO LPC17xx port layer. It contains very few modifications from the code distributed by NXP themselves.|
|FreeRTOS-Products||This contains the FreeRTOS real time kernel, FreeRTOS+CLI and FreeRTOS+IO code, organised into three separate respective directories. Note that this project is not actually built directly – the source code it contains is just referenced by the two demo application projects. The demo projects reference the files using workspace relative paths – which is why the projects will only build when they are located in the workspace directory.|
|FreeRTOS-Plus-Demo-1||This project contains the demo 1 application code itself – which in turn uses source files from the FreeRTOS-Products directories.|
|FreeRTOS-Plus-Demo-2||This project contains the demo 2 application code itself, including the FatFS and lwIP source files. The project also uses source files from the FreeRTOS-Products directories.|
lwIP and FatFS are third party open source products, supplied under their own license terms.