Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists