Quality RTOS & Embedded Software

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


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


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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