FreeRTOS with ICC (Image Craft C-Compiler)

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Everybody

I am looking for a free AVR RTOS which can be used (compiled) with ICC! I think FreeRTOS (http://www.freertos.org) would be a fine OS, but it is written to be used with AVR-GCC respectively WinAVR.

I tried to port FreeRTOS to ICC without success, but I am not a experienced C programmer. I had some troubles with different ICC libraries. I expect further problems because of the different stack handling of the two compilers. As far as I know, GCC-AVR works with only stack, but ICC use two stacks, one for the CPU and one for the compiler (for function parameters). I expect that every task of a RTOS requires its own stack(s), so this difference could be a fundamental problem.

Does anybody know a RTOS ready to use with ICC, or has anybody already tried to port FreeRTOS to ICC? I need a OS that is able to run multiple tasks with defined timing intervals. It needn’t to be preemptive, a fast task switching is from bigger importance.

Thank you very much in anticipation for each feedback, Peter Sager

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hey,

check out uC/OS - II. There's a port for IAR, v1.40 and above.
http://www.ucos-ii.com/contents/products/ucos-ii/ports-misc.html

cheers,
jimmy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peter.sager wrote:

I am looking for a free AVR RTOS which can be used (compiled) with ICC! I think FreeRTOS (http://www.freertos.org) would be a fine OS, but it is written to be used with AVR-GCC respectively WinAVR.

I tried to port FreeRTOS to ICC without success, but I am not a experienced C programmer. I had some troubles with different ICC libraries. I expect further problems because of the different stack handling of the two compilers. As far as I know, GCC-AVR works with only stack, but ICC use two stacks, one for the CPU and one for the compiler (for function parameters). I expect that every task of a RTOS requires its own stack(s), so this difference could be a fundamental problem.
Does anybody know a RTOS ready to use with ICC, or has anybody already tried to port FreeRTOS to ICC? I need a OS that is able to run multiple tasks with defined timing intervals. It needn’t to be preemptive, a fast task switching is from bigger importance.

Once you finish the gcc->icc port, you'll be an experienced c programmer, and the world will have a free rtos that compile with iccavr. I dont think the stack usage is a show stopper... The hw stack is always smaller than and contained inside the sw stack in icc... Is there tons of assembler in the freertos source or mostly c?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sleepydj wrote:
hey,

check out uC/OS - II. There's a port for IAR, v1.40 and above.
http://www.ucos-ii.com/contents/products/ucos-ii/ports-misc.html

cheers,
jimmy

hey,

i'm sorry, i thought ICC = IAR. There is also a port available for AVR for ImageCraft on the same page.

cheers,
jimmy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

uC/OS II seems to be a nice OS with a lot of functions, I have seen that there are free ports to IAR and also to ICC! But these ports don't contain the whole OS, it is necessary to buy a license, it's not free!

Yes, I think tfe porting of FreeRTOS to ICC should be possible, most of the sourcecode is written in C! But the usage of the two stacks for each task would require a good piece of RAM. An alternative would be, to backup and restore only the actual stack contents for each task, I guess this would be typical 10..20 Bytes.

I have discovered, that the actual ICC-Version does include a Tiny-Licence for an RTOS, called SALVO. This OS seems to be well integrated into the ICC-IDE! SALVO is simple and requires very few of CPU-Resources! It doesn’t' use a stack for each tasks, so the task switching is only possible in the task-function itself, and not in a subroutine of a task! It should be possible to deal with this restriction in most of the smaller applications.

I will take a closer look to SALVO! On the other hand, with this restriction, it would be simple to write an own OS that manages a timer- and event-driven task switching! All I need for my project is the possibility to run multiple tasks, to handle concurrently the different interfaces. (UART1, UART2, I2C, SPI, ADC)

I'll keep on running for this topic… Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

in the folders icc\examples.avr,there is a file ---ucos2_iccavr,mayby you can have some idea from it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is cooperative RTOS with very good pdf documentation.

It is not free , but you can use the evaluation version ( limited to 3 tasks and 5 event) .

It is Salvo RTOS

Visit

http://www.pumpkininc.com

Bye

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW, This post does not belong in the Projects Forum; it needs to be moved to the AVR Forum.

Moderator, can you move this?