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

FreeRTOS & IAR Debug on the IAR Simulator

Posted by Bobi on October 27, 2011
Hello,

I have spent a lot of time tring to setup my IAR 6 EWARM environment to use the FreeRTOS source in my projects. I'd be glad if you could refer me to some working tutorials.

I want to build the project for AT91SAM7X256 or AT91SAM7X512.
I've downloaded the FreeRTOS Source and explored the uIP Demo that is included - http://www.freertos.org/index.html?http://www.freertos.org/portsam7xiar.html It runs with no problems on my target but it fails with the IAR Simulator, because the IAR port cannot be exuted using the IAR simulator.
What do I have to do in order to run it with the Simulator?

I have IAR EWARM 6.21.4.2946 KickStart and in the IAR site it's said that it includes -
•RTOS plugins available from IAR Systems and RTOS vendors
However in the installation directory ..\arm\plugins\rtos I don't see a FreeRTOS folder but I do have it in the project Options > Debugger > Plugins tab.
Do I have to install anything additional in order to get thing running with the RTOS? I want to be able to debug with the Simulator without deploying on the target.

Thank you very much for your help!


RE: FreeRTOS & IAR Debug on the IAR Simulator

Posted by Richard on October 27, 2011
I don't know about the IAR simulator specifically, but the only simulator (for any architecture) I have ever successfully run FreeRTOS in without having to change anything is the Keil one. That is because most simulators only simulate the core. If the code does something like configure a PLL and wait for it to lock, the code will just hang, as there is no PLL simulation. You can normally spot that because if you stop the simulator and look at which code it is executing you will find it is sat in a tight loop waiting for a register to change - when the register does not even exist in the simulation (that often happens even before main() has been called). You can work around this by selectively commenting out bits of code, but I don't think you will get the Ethernet working in the simulator whatever.

If you have V6.21 of the IAR tools then I don't think you need to change or install anything to use the plug-in - it is shipped with IAR pre-installed. As you say, under the debug options, on the plug-ins tab (from memory) you just check the box next to FreeRTOS (some versions may call it OpenRTOS), then start a debug session.

Regards.

RE: FreeRTOS & IAR Debug on the IAR Simulator

Posted by Bobi on October 27, 2011
Thank you Richard,

Do you know if I can manage to set up my project properties in order to run one of the simple examples in the FreeRTOS Practical guide. For example I want to have two task executing with equal priorities. Here is my main()

xTaskCreate( vTask1, "Task 1", 200, NULL, 1, NULL );
xTaskCreate( vTask2, "Task 2", 200, NULL, 1, NULL );
vTaskStartScheduler();

What changes to the project settings do I need in order to get this simple demo to work with the Simulator?
I've been trying the last few days but most of the time I hit the following error:

User error: UNPREDICTABLE behavior: Tried to execute an MSR instruction that writes to SPSR in a mode that does not have an SPSR. Instuction address: 0x001037E4 CPSR value: 0x2$001037E4


Thanks very much again!


[ 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