The port was developed using the DK-LM3S316 development kit.
Stellaris is a new range of embedded microcontrollers - the first to be commercially available with a Cortex-M3 core. The LM3S316 is a low cost, low pin count device. It has 4KBytes of RAM and 16KBytes of ROM on chip. The demo application code size has been deliberately limited to ensure it builds using the 8KByte code size limited KickStart version of the IAR tools.
The IAR Cortex-M3 demo relies on a driver library file which is licensed separately from FreeRTOS.org. A full copy of the license applicable to this library is contained in the EULA.txt file located in the Demo/CORTEX_LM3S316_IAR/hw_include directory within the FreeRTOS.org download.
There are currently four FreeRTOS.org ports for Luminary Micro Stellaris Cortex-M3 based microcontrollers - one that uses the Sourcery G++ (GCC) tools, one that uses the ARM Keil tools, one for Rowley CrossWorks, and the port presented on this page which uses the IAR Embedded Workbench tool chain.
Upgrading to FreeRTOS.org V5.0.3: FreeRTOS.org V5.0.3 introduced the configMAX_SYSCALL_INTERRUPT_PRIORITY configuration option to the Cortex M3 port. See the kernel configuration documentation for full information on this feature.
Upgrading to FreeRTOS.org V4.8.0: Prior to V4.8.0 the FreeRTOS.org kernel did not make use of the SVCall interrupt. From V4.8.0 onwards it does. Therefore, to upgrade an older project to the V4.8.0 standard, a small edit to the startup code is required. To do this, simply install vPortSVCHandler() in the SVCall position within the interrupt vector table (contained in the startup source file). The demo projects included in the FreeRTOS.org download have already been updated so these can be used as an example.
From FreeRTOS.org V4.7.1 all IAR projects for ARM devices are saved using the IAR Embedded Workbench V5.x format and will not open from V4.x versions. FreeRTOS.org V4.7.0 and earlier are still available from SourceForge and can be used with Embedded Workbench V4.x.
See also the FAQ My application does not run, what could be wrong?
The IAR workspace for the Luminary Micro port is located in the FreeRTOS/Demo/CORTEX_LM3S316_IAR directory and is called RTOSDemo.eww.
The demo application includes an interrupt driven UART test where a co-routine transmits characters that are then received by a task. For correct operation of this functionality a loopback connector must be fitted to the SER0 connector of the DK-LM3S316 target board (pins 2 and 3 must be connected together on the 9Way connector).
The demo application uses the LEDs built into the prototyping board so no other hardware setup is required.
A J-Link JTAG interface is used to interface the host PC with the target.
When executing correctly the demo application will behave as follows:
To build the application simply open RTOSDemo.eww from within the Embedded Workbench IDE, then select "Rebuild all" from the "Project" menu.
To download then execute the demo:
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. This mechanism is demonstrated by the UART ISR called vUART_ISR() and defined within commtest.c.
Note that portEND_SWITCHING_ISR() will leave interrupts enabled.
Any and all data, files, source code, html content and documentation included in the FreeRTOS 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..