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

STR912 IAR demo and FreeRTOS v4.20

Posted by Nobody/Anonymous on February 12, 2007
Hi!

I just tried to compile STR912 demo with newest version (4.2.0) of FreeRTOS without success. Produced code is too big to fit in 32KB limit for IAR KS version, even with maximum size optimization. If I switch back to 4.1.3 everything compiles and links without errors.

So... this demo (and maybe others also) needs some tuning (removing some tasks) to work "out of the box" with IAR 4.41 and FreeRTOS 4.2.0

Best regards,
Slawc

RE: STR912 IAR demo and FreeRTOS v4.20

Posted by Nobody/Anonymous on February 13, 2007
Bummer. It must have been tight before. There are only minor changes between the two versions. This needs a mod in the download to maintain compatibility with the kickstart compiler.

RE: STR912 IAR demo and FreeRTOS v4.20

Posted by James Grenning on September 26, 2007
I just ran into the same problem. I downloaded the IAR evaluation that support 32k of object code, and then unzipped the project. The i did a clean and a rebuild all. it choked reporting the build exceeded the 0x8000 limit.

Has anyone solved this problem?

thanks, James

RE: STR912 IAR demo and FreeRTOS v4.20

Posted by Richard on September 26, 2007
The STR9 demo had a major update for the V4.5.0 release. The project contains 5 configurations, and my tests showed that the THUMB configuration came in at 31624 bytes - just under the limit. This configuration was included specifically so it could be built with the KickStart edition of the IAR tools. Are you having problems still with the THUMB configuration in the V4.5.0 download?

You can remove some of the demo tasks to reduce the code size further. I can tell you how to do this if necessary.

Regards.

RE: STR912 IAR demo and FreeRTOS v4.20

Posted by James Grenning on September 27, 2007
Thanks for the help. I have downloaded the current FreeRTOS v4.5

I am using the IAR kickstart version 4.0 (current version)

Thanks for the pointer to the THUMB configuration. I tried each configuration and they all end with a too big error. I did not see how to reduce the number of tasks though. I'd love the help, so thanks for the offer to help.

James

RE: STR912 IAR demo and FreeRTOS v4.20

Posted by Richard on September 27, 2007
I think IAR V4.2 is the latest so I'm surprised the project can be opened in V4.0. Sometimes with IAR opening the project in an older version will silently clobber some of the compilation options, so be aware of that if you have any compilation problems.

All the demo tasks are created in main(). If you look in main you will see:

vStartIntegerMathTasks( tskIDLE_PRIORITY );
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vStartDynamicPriorityTasks();
vStartMathTasks( tskIDLE_PRIORITY );
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
vStartQueuePeekTasks();


Start by commenting out some of these, for example:

//vStartIntegerMathTasks( tskIDLE_PRIORITY );
vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); // Leave this one!
//vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
//vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
//vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vStartDynamicPriorityTasks();
vStartMathTasks( tskIDLE_PRIORITY );
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
vStartQueuePeekTasks();

Each of the demo tasks is also checked from within main.c - within a function prvCheckOtherTasksAreStillRunning() - so you also need to comment out the reference to the task within this function.

For example, if you have commented out vStartIntegerMathTasks(), then you also need to comment out:

//if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
//{
// ulErrorFlags |= 0x01;
//}

Likewise, if you have commented out vStartBlockingQueueTasks(), then you also need to comment out:

//if( xAreBlockingQueuesStillRunning() != pdTRUE )
//{
// ulErrorFlags |= 0x08;
//}


IAR is intelligent enough to remove any unreferenced functions from the binary image, so this should make the code smaller by itself. If not, then remove the unused demo tasks from the build also. For example, if commenting out vStartIntegerMathTasks(), then you can also remove the file in which this function is defined, integer.c. This last step should not be necessary though.

Regards.


RE: STR912 IAR demo and FreeRTOS v4.20

Posted by James Grenning on September 27, 2007
After looking a little further I have v4.42.

I commented out some tasks and have gotten it to compile and link. I don't have the board to run it on yet. I wanted to trial run the build first.

thanks for your help, James


[ 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