FreeRTOS on AM335x

Hi!
I know there’s been few discussions about that, but they’re from 2 years back.
Is there eny port of FreeRTOS to AM335x processors? I’m developing software on custom board with AM3352, but port for BeagleBone will be ok.
If not, is there port for any Cortex-A8 processor? If so is it reliable?

Best regards,
Konrad

FreeRTOS on AM335x

There are several Cortex-A9 ports, which will do what you want. Look at Renesas RZ/A, Xilinx Zynq and Altera SoC for examples. There are also Cortex-A5 ports for the Atmel SAMA5 parts – although these use a propriatory interrupt controller.

http://www.freertos.org/Using-FreeRTOS-on-Cortex-A-Embedded-Processors.html
http://www.freertos.org/Using-FreeRTOS-on-Cortex-A-proprietary-interrupt-controller.html

FreeRTOS on AM335x

OK.
I’ve managed to do this. Wasn’t that hard, but the better start-point for this is the A5 port, since AM335x doesn’t have ARM GIC.
The only tricky part was modifying IRQHandler form TIs StarterWare to perform Context switching.
Although it seems that in the A5 port implementation of IRQHandler, FreeRTOS is checking if it should switch context on every interrupt, not only from SysTick. is that correct behaviour?

FreeRTOS on AM335x

Yes that is correct – any interrupt can unblock a task, and if a task that has a priority above the currently running task (the task that the interrupt interrupted) is unblocked then the ISR should return directly to the unblocked task.

I would be grateful if you could post your project to the FreeRTOS Interactive site (http://interactive.freertos.org).

FreeRTOS on AM335x

Now I am integrating TI’s StarterWare into project to properly handle hardware, that includes I2C for controlling PMIC in order to change core voltages, which is nedded for changing core speed. For now I will just include StarterWare without adding mutexes to it, just to get it working. If this version will be good to share I will do that by the end of the week. Of course that will lead to possible errors i.e. in communication interfaces if two threads will simultaneously access one peripheral. So shall I post it like this or after I modify StarterWare to use mutexes?

FreeRTOS on AM335x

Hi Konrad – I see you have ported a version of FreeRTOS combined with starterware.
I have been struggling getting portRESTORE_CONTEXT() as TI compiler in CCS does not handle asm(” LDR R0, =pxCurrentTCB”)..etc
I am under intense pressure and struggling against time… would you be so kind as to share it with me? email. Or if you have it in a GitHub repo could you possible share?
Thanks in advance
James

FreeRTOS on AM335x

There are examples of how to access the pxCurrentTCB variable from asm
code in the TI compiler ports found in the FreeRTOS download – albeit
for MSP430 and Cortex-M parts, rather than Cortex-A – but you can still
use the ports as a reference for the required syntax.

FreeRTOS on AM335x

Thx for the response… had looked at that route, but was hoping for shortcuts as I have an uncomfortable tight binding to TI Starterware, guess I’ll just have to grit my teeth and do it 😉

FreeRTOS on AM335x

Hi Konrad,
I know it has been a long time but it would be very kind of you if you could share the AM335x port on Github. Or maybe you could mail me the project.
Thanks in advance. 🙂

FreeRTOS on AM335x

Ok, found one. For anyone else looking for a working FreeRTOS example on AM335x/BeagleBone Black, here is the link: https://github.com/dumpram/beaglertos.

FreeRTOS on AM335x

Hi All, yet another port for the BBB:
https://github.com/kryochronic/AM335X-FreeRTOS-lwip