Quality RTOS & Embedded Software

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


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


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

Latest News

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