Ported: FreeRTOS 9.0.0

Please do not post requests
victor_pv
Posts: 1746
Joined: Mon Apr 27, 2015 12:12 pm

Ported: FreeRTOS 9.0.0

Post by victor_pv » Sun Mar 12, 2017 7:06 pm

I applied the same changes from FreeRTOS 8.2.1 to 9.0.0 and have been using it for some tests successfully.

I need to upload it to Github, then will post the link here. It adds a few new features over 8.x
If anyone wants it before I've added a github link, send me a PM.

Now it's on github:
https://github.com/victorpv/Arduino_STM ... reeRTOS900


EDIT:
The PR has been merged and now is part of the main repo on Roger's github:
https://github.com/rogerclarkmelbourne/ ... reeRTOS900

Details on the new features here:
http://www.freertos.org/FreeRTOS-V9.html

For questions or issues you can still post in this thread.
Last edited by victor_pv on Tue Aug 01, 2017 1:12 pm, edited 3 times in total.

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Ported: FreeRTOS 9.0.0

Post by Pito » Sun Mar 12, 2017 7:09 pm

Pukao Hats Cleaning Services Ltd.

victor_pv
Posts: 1746
Joined: Mon Apr 27, 2015 12:12 pm

Re: Ported: FreeRTOS 9.0.0

Post by victor_pv » Sun Mar 12, 2017 10:48 pm

Pito wrote:Try with
http://www.stm32duino.com/viewtopic.php?f=3&t=1453
if it compiles..
I am using it with sdfat, an ILI display, and my tmr_pcm half finished port, and works good so far.
I had the same running with 8.2.1, and decided to use it to test the 9.0.0 port.
In my case SDfat is used for read only, but I would expect to work the same for writes.

victor_pv
Posts: 1746
Joined: Mon Apr 27, 2015 12:12 pm

Re: Ported: FreeRTOS 9.0.0

Post by victor_pv » Sat Mar 25, 2017 1:38 pm

I have sent a pull request to Roger. The library is now available in a branch of my fork. If anyone wants to download, it's here:
https://github.com/victorpv/Arduino_STM ... reeRTOS900

michael_l
Posts: 337
Joined: Mon Aug 24, 2015 6:11 pm

Re: Ported: FreeRTOS 9.0.0

Post by michael_l » Wed Mar 29, 2017 8:16 pm

It looks like my code crashes at this point when creating mutex. Victor, should mutexes also work ? Please note, I have the same problem with 8.2

SemaphoreHandle_t xMutexSer;
xMutexSer=xSemaphoreCreateMutex();

victor_pv
Posts: 1746
Joined: Mon Apr 27, 2015 12:12 pm

Re: Ported: FreeRTOS 9.0.0

Post by victor_pv » Wed Mar 29, 2017 8:25 pm

michael_l wrote:It looks like my code crashes at this point when creating mutex. Victor, should mutexes also work ? Please note, I have the same problem with 8.2

SemaphoreHandle_t xMutexSer;
xMutexSer=xSemaphoreCreateMutex();
Michael, when I have used semaphores, I have declared them as Binary semaphores, as in the display_blink example included in the examples folder:
xSemaphoreHandle xDisplayFree;
vSemaphoreCreateBinary(xDisplayFree);
That has worked for me so far in every version.
I believe the oldest version ported to Maple was 7.x, did you get errors on that one too?

Do you have a simple test sketch just to test the mutex that crash? I can test it at home and see what I get.
I have some sketches running using the binary ones, I'll see if I can turn one to Mutex and see what happens too.

ag123
Posts: 803
Joined: Thu Jul 21, 2016 4:24 pm

Re: Ported: FreeRTOS 9.0.0

Post by ag123 » Wed Mar 29, 2017 10:36 pm

wow did we actually successfully fit freertos and maybe add an lcd spi display lib and an arduino sketch into that stm32f103 with 16-20k sram & 64k flash :lol:
Last edited by ag123 on Thu Mar 30, 2017 8:08 pm, edited 1 time in total.

michael_l
Posts: 337
Joined: Mon Aug 24, 2015 6:11 pm

Re: Ported: FreeRTOS 9.0.0

Post by michael_l » Thu Mar 30, 2017 6:25 am

victor_pv wrote:
michael_l wrote:It looks like my code crashes at this point when creating mutex. Victor, should mutexes also work ? Please note, I have the same problem with 8.2

SemaphoreHandle_t xMutexSer;
xMutexSer=xSemaphoreCreateMutex();
Michael, when I have used semaphores, I have declared them as Binary semaphores, as in the display_blink example included in the examples folder:
xSemaphoreHandle xDisplayFree;
vSemaphoreCreateBinary(xDisplayFree);
That has worked for me so far in every version.
I believe the oldest version ported to Maple was 7.x, did you get errors on that one too?

Do you have a simple test sketch just to test the mutex that crash? I can test it at home and see what I get.
I have some sketches running using the binary ones, I'll see if I can turn one to Mutex and see what happens too.

Thanks for the reply. I'll try to narrow down the cause. In my project I use SPI2, FreeRtos821, SdFAT on SPI1, USB Serial, and Serial1. it may well be that something else is causing this. I'm using platformio to build - it seems to have some differences compared to Arduino IDE build. For example platformio uses -Os and Arduino build uses -Og. I'll try compiling with Arduino IDE also later.

EDIT: I'll check my max heap amount also with xPortGetFreeHeapSize() function. Maybe I'm near limits and alloc fails.

victor_pv
Posts: 1746
Joined: Mon Apr 27, 2015 12:12 pm

Re: Ported: FreeRTOS 9.0.0

Post by victor_pv » Thu Mar 30, 2017 9:48 pm

michael_l wrote:
victor_pv wrote:
michael_l wrote:It looks like my code crashes at this point when creating mutex. Victor, should mutexes also work ? Please note, I have the same problem with 8.2

SemaphoreHandle_t xMutexSer;
xMutexSer=xSemaphoreCreateMutex();
Michael, when I have used semaphores, I have declared them as Binary semaphores, as in the display_blink example included in the examples folder:
xSemaphoreHandle xDisplayFree;
vSemaphoreCreateBinary(xDisplayFree);
That has worked for me so far in every version.
I believe the oldest version ported to Maple was 7.x, did you get errors on that one too?

Do you have a simple test sketch just to test the mutex that crash? I can test it at home and see what I get.
I have some sketches running using the binary ones, I'll see if I can turn one to Mutex and see what happens too.

Thanks for the reply. I'll try to narrow down the cause. In my project I use SPI2, FreeRtos821, SdFAT on SPI1, USB Serial, and Serial1. it may well be that something else is causing this. I'm using platformio to build - it seems to have some differences compared to Arduino IDE build. For example platformio uses -Os and Arduino build uses -Og. I'll try compiling with Arduino IDE also later.

EDIT: I'll check my max heap amount also with xPortGetFreeHeapSize() function. Maybe I'm near limits and alloc fails.
Could be that, also the stack size for each task could cause some trouble.

zmemw16
Posts: 1489
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Ported: FreeRTOS 9.0.0

Post by zmemw16 » Fri Mar 31, 2017 1:03 am

@ag123
you forgot the SD card
:)

Post Reply