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




Loading

IAR + LPC213X + Thumb code

Posted by enrico_entity on November 23, 2005
I am testing about usage of FreeRTOS in LPC213X series with IAR as compiler.
I verified that FreeRTOS can work in Thumb mode doing only a change in port.c file inside port\LPC2000\IAR folder.
I replaced this macro definition:

#define portINITIAL_SPSR( ( portSTACK_TYPE ) 0x1f ) /* System mode, ARM mode, interrupts enabled. */

with these:

#if __CPU_MODE__ == 1
#define portINITIAL_SPSR( ( portSTACK_TYPE ) 0x3f ) /* System mode, THUMB mode, interrupts enabled. */
#elif __CPU_MODE__ == 2
#define portINITIAL_SPSR( ( portSTACK_TYPE ) 0x1f ) /* System mode, ARM mode, interrupts enabled. */
#else
#error "__CPU_MODE__ not equal to 1 or 2"
#endif

and now I can build my project either in ARM or in THUMB mode
I hope this can help you to add more versatility to FreeRTOS!!!
GoodBye
Enrico Dr. Dalla Mariga

RE: IAR + LPC213X + Thumb code

Posted by Nobody/Anonymous on November 23, 2005
Thanks for the input, but doesn't the IAR LPC2000 demo already uses THUMB mode by default? All the files are built for THUMB. Do you mean that you verified that it can run in ARM mode also with your change.

Take a look at the .bat files in the Demo\ARM7_LPC2106_GCC directory. The set up some environment variables to allow the GCC builds to switch between ARM and THUMB, you can see in the source code where the environment variables are used.

RE: IAR + LPC213X + Thumb code

Posted by enrico_entity on November 23, 2005
Yes, that's right. I make a mistake, sorry...
By default IAR LPC2000 port uses THUMB mode by default and I tested that it runs also in ARM mode.

I would be gratefully if these changes can made in port.c source so that if you select, in IAR IDE environment, to build in ARM mode, FreeRTOS works well (.bat files are useful with GCC but with IAR it is more difficult to use)!!!

Thank you!


[ 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