• AVR Freaks

Helpful ReplyHot!Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project?

Author
karenshi
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2013/03/08 15:23:47
  • Location: 0
  • Status: offline
2013/07/01 00:10:38 (permalink)
0

Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project?

Hello,
I wonder if anyone has experience on using FreeRTOS on PIC32 project. Does PIC32 still supports FreeRTOS now? Is there any concerns or issues on porting FreeRTOS to PIC32 based project and make it work? Is there any application notes / examples I can reference? Since my project schedule is kind of tight, I am not sure if i should try it on this project.
 
thank you very much for the help. 
 
Karen
 
#1
User2009
Super Member
  • Total Posts : 172
  • Reward points : 0
  • Joined: 2013/01/03 05:43:08
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 00:37:20 (permalink) ☄ Helpful
0
Inside the FreeRTOS zip file is a folder \demo\PIC32MX_MPLAB which contains a MPLAB8 and MPLABX project. There is some info at the FreeRTOS homepage [1] as well so I assume its supported. Application node AN1264 might be interesting as well. I always wanted to get my hands on FreeRTOS myself but unfortunately never had a project using it.
 
[1] http://www.freertos.org/port_PIC32_MIPS_MK4.html
#2
prem999
Super Member
  • Total Posts : 257
  • Reward points : 0
  • Joined: 2013/03/27 22:03:51
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 01:05:45 (permalink) ☄ Helpful
0
yes, FreeRTOS port for PIC32 is available at FreeRTOS website. There is also PIC32 edition of book "using the FreeRTOS Real time Kernel" by Richard Barry available.
When you install the FreeRTOS sources, PIC32MX Port files can be found in ~\FreeRTOS\Source\portable\MPLAB\PIC32MX and a demo application for explorer 16 board can be found in ~\FreeRTOS\Demo\PIC32MX_MPLAB. The demo application will work for PIC32MX3xx, 4xx and 7xx.
 



post edited by prem999 - 2013/07/01 01:14:33
#3
Dr. Whom
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Joined: 2012/12/28 13:33:02
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 05:32:23 (permalink) ☄ Helpful
0
Yes...I wanted to use FreeRTOS on my current project and was denied by the project manager to use it. I was able to get the sample project listed above running on my project board with the PIC32MX795F512L
#4
karenshi
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2013/03/08 15:23:47
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 11:48:16 (permalink)
0
Thank you so much for the detailed information!
 
Karen
 
#5
karenshi
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2013/03/08 15:23:47
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 12:00:01 (permalink)
0
Hello,
I wonder what was the reason that your project manager denied using FreeRTOS. Is there any issue or concern on using FreeRTOS?  I use PIC32MX795F512L also. I am new to Microchip MCU and MAP LAB compiler. So I am not sure how long it may take me to add FreeRTOS to my project. Do you mind giving me some your sample code? 
 
Thank you very much!
 
Karen
 
 
 
#6
Dr. Whom
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Joined: 2012/12/28 13:33:02
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 12:33:56 (permalink)
0
My project manager did not want to make the project more complicated by adding the RTOS. The FreeRtos project takes up about 32K of memory space. I just wanted to get it running. I just ran the Blinky Demo from FreeRTOSV7.30 with PIC32MX_MPLAB and used one of my LEDs in the code
 
#7
prem999
Super Member
  • Total Posts : 257
  • Reward points : 0
  • Joined: 2013/03/27 22:03:51
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/01 22:00:41 (permalink)
5 (1)
The FreeRTOS Kernel consumes 5 to 10KB of ROM Space, depending on the configuration it may increase but shouldn't be 32KB. http://www.freertos.org/FAQMem.html#ROMUse
#8
bosco
Super Member
  • Total Posts : 2119
  • Reward points : 0
  • Joined: 2004/07/24 10:17:53
  • Location: Idaho
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/02 10:32:02 (permalink)
5 (1)
prem999

The FreeRTOS Kernel consumes 5 to 10KB of ROM Space, depending on the configuration it may increase but shouldn't be 32KB. http://www.freertos.org/FAQMem.html#ROMUse

It will use 32K of space because the "out of the box" configuration makes the heap way to large.
changing the config will bring that RAM usage down to a more reasonable number.
 
To the product manager (whoever that might be)
you are very short sighted.
An RTOS will actually reduce defects because developers can design unit test that run as threads in the RTOS (and are removed when shipping)
unit tests are much cheaper than full product tests that have to be fully re-run at every single code change.
There are so many more reasons to use an RTOS than not to.
 
#9
karenshi
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2013/03/08 15:23:47
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/02 11:46:44 (permalink)
0
I think it really depends on the size of MCU. I used to work on a project that the MCU (not micrichip's ) only has 6K RAM. It was very painful on adding FreeRTOS, but the FreeRTOS simplifies the code development a lot. my managers didn't like FreeRTOS either. Now I switch to PIC32 (much larger memory) and MPLAB (very first time), hope everything will be fine.
 
#10
jvh
Junior Member
  • Total Posts : 104
  • Reward points : 0
  • Joined: 2013/06/17 10:05:23
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/08 12:02:16 (permalink)
5 (1)
Works like a hose on PIC32MF695F, we see no problems with it. It ain't Nucleus or Green Hills Integrity but is pretty darn good for the price. Course we had to buy documentation. But then Nucleus ain't so hot anymore either after the latest bunch bought it. 
 
jh
#11
_fragment_
Super Member
  • Total Posts : 421
  • Reward points : 0
  • Joined: 2008/10/08 09:17:55
  • Location: Idaho
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/08 14:39:17 (permalink)
5 (1)
jvh

Works like a hose on PIC32MF695F



You got hosed, then? :)
 
Dave
#12
jvh
Junior Member
  • Total Posts : 104
  • Reward points : 0
  • Joined: 2013/06/17 10:05:23
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/09 04:15:35 (permalink)
0
Our estimates got hosed. We had the "big loop OS" before. I came in way under my estimates for updating and rewriting when we switched to Free RTOS. Where I come from "works like a hose" is a good thing. You just hook it up,turn it on, and it carries your water.
 
jh
#13
_fragment_
Super Member
  • Total Posts : 421
  • Reward points : 0
  • Joined: 2008/10/08 09:17:55
  • Location: Idaho
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2013/07/09 12:42:39 (permalink)
0
jvh 

Where I come from "works like a hose" is a good thing. You just hook it up,turn it on, and it carries your water. 



Ah, that's a new one to me. "Works like a charm" is one I've heard.
 
Dave
#14
PowersOf12
Starting Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/09/06 09:44:50
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2020/08/02 17:27:17 (permalink)
0
I wanted to add something I just dug into for a few hours.
 
I wanted a 10 msec RTOS tick. My bus clock is 80 MHz and Harmony puts in a prescaler of 8 which will not allow 10 msec RTOS tick because of 16-bit Timer1. The RTOS will run fine and Harmony won't tell you there is an issue but the timing will be incorrect unless you change the prescaler to 64.
 
Port.c
/* Hardware specifics. */
#define portTIMER_PRESCALE 64 // 8
#define portPRESCALE_BITS 2 // 1
#15
LdB_ECM
Super Member
  • Total Posts : 434
  • Reward points : 0
  • Joined: 2019/04/16 22:01:25
  • Location: 0
  • Status: offline
Re:Does PIC32 supports FreeRTOS? Anyone uses FreeRTOS on PIC32 based project? 2020/08/02 22:50:35 (permalink)
0
On a 32bit MCU if you have 32bit timers you really want to set the configFreeRTOS to use them rather than 16bit timer as it limts the max delay you can have ;-)
#16
Jump to:
© 2020 APG vNext Commercial Version 4.5