FreeRTOS example for nRF9160

There are examples of using FreeRTOS with ARM Cortex M33 processors. Can this be used directly with a Nordic nRF9160 SoC? Is there a specific example/demo that implements FreeRTOS on an nRF9160?

You should be able to use the FreeRTOS Cortex-M33 port. This page provides more details - Using FreeRTOS on ARMv8-M Microcontrollers - FreeRTOS

Thanks.

Thanks, @aggarg, I’ll definitely give it a try. I was hoping that someone had already tried it and could relay their experience of porting FreeRTOS to the nRF9160. It appears that Nordic is only supporting Zephyr for their nRF9160.

Thanks. Let me know if you face any problem.

Hi Guarav,

You seem to be the native expert in porting FreeRTOS to the ARM Cortex M33 MCU core. I’m trying to port FreeRTOS to the nRF9160DK evaluation board from Nordic. I’ve downloaded the Nordic SDK which contains Zephyr as its RTOS. I’m using the recommended Segger Embedded Studio for development. Nordic will not support any other RTOS.

I don’t wish to use Zephyr as the RTOS. While it claims to have many great features, it seems to be overly complicated and takes abstraction to the extreme. It’s an RTOS written by developers from the Linux Foundation. I had a hard time finding main.c!!

Sorry, for the long background. I’ve had a long history with FreeRTOS, I trust it and it’s simple in its design and use. I’ve ported it over to many microcontrollers including ARM cores in the past. I’m having a bit of an issue with the nRF9160 due to the complication of the Trust Zone. Being unfamiliar with the TZ architecture (learning many things though) and with a bunch of IDEs, compilers, assemblers, and libraries all thrown into the FreeRTOS demos mix, I’m just not able to properly build a project.

I’m trying to do a simple template at this point to get me started and could use some guidance. For instance, I’m trying to set the Segger Embedded Studio IDE to use GCC throughout. I don’t want to be dependent on licensed software such as Keil, Embedded Workbench, etc. and their proprietary compilers/assemblers/linkers/libraries to achieve my goal. For instance, if I’m using GCC, what libraries should I use? I know I’ll have more questions to follow. Thanks for any guidance you can give me.

I’d suggest to first start with a bare metal first project and first get it to boot to the secure side. You then need to configure the Security Attribution Unit (SAU) for the non-secure software and then jump to the non-secure side. After that, you should add FreeRTOS.

Do you have a bare metal project to start with? I am happy to have a call if that can be helpful.

Thanks.

No, I don’t have a bare metal project. A call would be very helpful. In the meantime, is there somewhere you can point me to that can help me create and build this bare metal project?

I am not familiar with this platform and cannot say that. Usually the vendor examples have bare metal project that I use as a starting point. Please DM me with your email and preferred time and I will setup a call.

Thanks.