Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Philips LPC2138 (ARM7) RTOS Port
For the Rowley CrossFire LPC2138
[RTOS Ports]


This page demonstrates the FreeRTOS Rowley CrossWorks (GCC) LPC2000 port running on a CrossFire LPC2138 embedded evaluation kit (instructions are provided should you wish to use an alternative development board).

The CrossFire LPC2138 is a low cost evaluation platform that includes a USB CrossConnect JTAG debugging interface on board. The evaluation version of the CrossWorks embedded development tools can be used to develop software for the CrossFire board with no compiled code size or time restrictions.


IMPORTANT! Notes on using the LPC2138 RTOS port

Please read all the following points before using this RTOS port.

  1. Source Code Organisation
  2. The Demo Application
  3. Configuration and Usage Details
See also the FAQ My application does not run, what could be wrong?

Source Code Organization

The FreeRTOS download contains the source code for all the FreeRTOS ports and demonstrations and therefore contains many more files than required by this demo. See the Source Code Organization section for a description of the downloaded files and information on creating a new project.

The Rowley CrossWorks / GCC demo project file for the Philips LPC2138 ARM7 microcontroller is called RTOSDemo.hzp and is located in the FreeRTOS/Demo/ARM7_LP2138_Rowley directory.


The Demo Application

Build configurations

Four build configurations are provided as shown in the image below.


Selecting the build configuration within the CrossWorks IDE


RTOS Demo application hardware setup

Connect the CrossFire board to your development host using the supplied USB cable. You will be prompted to install the CrossConnect drivers if you have not previously done so.

The demo application utilises the LED and button that are built onto the CrossFire board, so no additional hardware setup is required.


Building and executing the RTOS demo application

The RTOS demo application can be built and download in a single step by selecting "Build and Debug" from the "Build" menu, or simply hitting F5. The project should build with no errors or warnings.


Building and downloading the demo application


Functionality

The demo application includes the following tasks:
  • A set of the standard demo tasks
    Including the polled queue, blocking queue, semaphore, math and dynamic priority tasks. See the RTOS demo pages for further information.

  • A print task
    Messages can be written from the CrossFire board for display within the CrossStudio terminal IO window. To ensure exclusive access to this facility only one task - the print task - is permitted to write to the terminal. Other tasks wanting to display a message do not do so directly, but instead send the message to the print task. The print task will block when no messages are waiting to be displayed.

  • A check task
    The check task executes periodically. It monitors the standard demo tasks, writing 'PASS' to the terminal IO (via the print task) should all the tasks be executing without error, and 'FAIL' should an error have been detected at any time.

  • A button handler task
    The button handler task is unblocked in response to interrupts generated by the button marked 'BUT' on the CrossFire board. Each execution of the button handler task causes a table of task status information to be displayed within the terminal IO window. The button handler task is included to demonstrate switching task context from within an interrupt service routine.

  • An LED task
    This simply flashes the CrossFire LED every second.
When executing correctly:
  • The LED will flash every second.
  • 'PASS' will be printed to the terminal IO every 5 seconds.
  • Task status information will be printed to the terminal IO each time 'BUT' is pushed.
Example output:
PASS
PASS
PASS
PASS

Task          State  Priority  Stack	#
************************************************
Button		R	3	99	21
PolSEM2		R	0	97	4
SUSP_RX		R	0	93	11
CNT_INC		R	0	102	7
QProdB2		R	0	94	13
QProdB3		R	0	94	14
QConsB6		R	0	94	17
QProdB5		R	0	94	16
IDLE		R	0	104	22
IntMath		R	0	102	0
Print		R	0	93	20
PolSEM1		R	0	97	3
C_CTRL		B	0	98	9
SUSP_TX		B	0	102	10
QProdNB		B	2	99	2
LED		B	2	102	18
BlkSEM1		B	1	90	5
BlkSEM2		B	1	96	6
QConsB1		B	2	99	12
QConsB4		B	2	99	15
Check		B	3	99	19
QConsNB		B	2	99	1
LIM_INC		S	1	103	8

PASS
PASS


Configuration and Usage Details

This demo uses the standard FreeRTOS LPC2000 GCC port files. Please read the configuration and usage section on the LPC2106 demo documentation page for more information.

Note: The RTOS scheduler does not install a default interrupt handler (to handle spurious interrupts). The application should ensure an appropriate handler is installed.





[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner