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

Only co-routines needed

Posted by Grigore-Mihai Dobra on August 24, 2008
I only need co-routines, but A LOT of 'tasking' code gets built(compiled) and linked in. This code ends up in the final object file without a chance of being ever called. Isn't there any option to build and link ONLY co-routine code?


RE: Only co-routines needed

Posted by Dave on August 24, 2008
Which compiler are you using? Most will remove uncalled code. GCC will do it also but only if you add in the correct compile time options -

-ffunction-sections -fdata-sections

and link time options

--gc-sections

RE: Only co-routines needed

Posted by Grigore-Mihai Dobra on August 24, 2008
Well, I am trying to port freeRTOS on NXP PXA51, using an evaluation version of RIDE(8KB code). RIDE is the best choice I have since no other evaluation compiler offers me at least 8KB of code. Of course, I could use SDCC, but support for PXA51 is "not complete, discontinued" as they say.

So my best choice remains RIDE using my own introduced define 'configUSE_FREE_RTOS' which masks out 'tasking' code from both 'tasks.c' and 'queue.c'.

RE: Only co-routines needed

Posted by Grigore-Mihai Dobra on August 25, 2008
Another isssue I have come into after #ifdef'ing out the 'tasking' code is that there is no chance of getting rid of that 'tasking' code whatsoever when using ONLY co-routines. This is because queue management calls A LOT of 'tasking' functions. I want to use only and JUST ONLY co-routines with queues et al, but queue functions bring in 'task' functions. These 'task' functions perform housekeeping on tasks. But... on which tasks if I don't use any?

Am I getting it wrong somewhere around here?

RE: Only co-routines needed

Posted by Grigore-Mihai Dobra on August 25, 2008
Another isssue I have come into after #ifdef'ing out the 'tasking' code is that there is no chance of getting rid of that 'tasking' code whatsoever when using ONLY co-routines. This is because queue management calls A LOT of 'tasking' functions. I want to use only and JUST ONLY co-routines with queues et al, but queue functions bring in 'task' functions. These 'task' functions perform housekeeping on tasks. But... on which tasks if I don't use any?

Am I getting it wrong somewhere around here?

RE: Only co-routines needed

Posted by Dmitriy A. Cherepanov on August 26, 2008
The FreeRTOS is the Real Time operating system with preemptive scheduling.
Do not need tasks using protothreads, OK.

no task protothreads -> no preemptive scheduling -> only cooperative scheduling -> no condition races, no problems with simultaneous access to data -> It is simple to replace queues on array or linked lists, any way if you want to use protothreads use Contikki Operating System for example.


[ 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