# FreeRTOS on Nordic nRF5340?

**URL:** <https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789>\
**Category:** Kernel\
**Created:** [September 8, 2022, 8:39pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789 "2022-09-08T20:39:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeacoastRon](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@SeacoastRon](https://forums.freertos.org/u/SeacoastRon)\
**Post date:** [September 8, 2022, 8:39pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/1 "2022-09-08T20:39:15Z")

</div>

Does anyone know if FreeRTOS is working/ported for the dual core nRF5340? I need it to support the BLE controller/host most.

---

<div class="post-metadata">

**Author:** ![PaulB-AWS](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@PaulB-AWS](https://forums.freertos.org/u/PaulB-AWS)\
**Post date:** [September 8, 2022, 9:12pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/2 "2022-09-08T21:12:10Z")

</div>

@SeacoastRon : The nRF5340 is supported by the ARMv8M / [Cortex-M33](https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/GCC/ARM_CM33/non_secure) port.

You might find the nRF5 SDK “ble\_app\_hrs\_freertos” example helpful for porting the SoftDevice if you choose to use the nordic “SoftDevice” BLE stack.

Alternatively, [Apache mynewt-nimble](https://github.com/apache/mynewt-nimble) is a quite popular open source stack with support for both FreeRTOS and the nRF5340 SoC.

---

<div class="post-metadata">

**Author:** ![SeacoastRon](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@SeacoastRon](https://forums.freertos.org/u/SeacoastRon)\
**Post date:** [September 9, 2022, 4:53pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/3 "2022-09-09T16:53:54Z")

</div>

Thank you for the info. Does the M33 port support the dual core mode of the nRF5340? BLE controller is on one core (only 256kB) and the BLE host is on the other core (1 MB)?

---

<div class="post-metadata">

**Author:** ![PaulB-AWS](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@PaulB-AWS](https://forums.freertos.org/u/PaulB-AWS)\
**Post date:** [September 12, 2022, 4:33pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/4 "2022-09-12T16:33:33Z")

</div>

@SeacoastRon : Currently we do not have an official Symmetric Multi-Processing port for the Cortex-M33, so you would be limited to a single core. You may be able to use both cores in an AMP configuration though.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [September 13, 2022, 4:28am UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/5 "2022-09-13T04:28:12Z")

</div>

> [@PaulB-AWS](#):
>
> nRF5340

Do you want to run FreeRTOS on the [application processor](https://www.nordicsemi.com/products/nrf5340)? If so, you should be able to use the M33 port as mentioned by Paul.

This example shows how to run FreeRTOS on the application processor in nRF9160 - [https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo/CORTEX\_MPU\_M33F\_Nordic\_NRF9160\_SES](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo/CORTEX_MPU_M33F_Nordic_NRF9160_SES)

---

<div class="post-metadata">

**Author:** ![beethoven62](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@beethoven62](https://forums.freertos.org/u/beethoven62)\
**Post date:** [September 12, 2023, 4:36pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/6 "2023-09-12T16:36:52Z")

</div>

I have FreeRTOS running on my nRF5340DK application core. You will need to do some tweaks to the nRF9160 port to get this running.

I have a question though. I’d like to get BLE running on it using the network core. I can see in the Nordic example of the UART peripheral, they use the RPC library to do remote calls to the network core from the application core. However, all these examples use the Zephyr OS. I started looking for the FreeRTOS BLE library and looking for ways to interface with the RPC library. The network core would manage the BLE modem and part of the stack. It’s built under Zephyr. I’m fine with that for now and may want to rewrite that later. I’m more concerned with the application core at this point.

I’m seeing that the FreeRTOS BLE library is deprecated. I don’t see any updates as to where the new library is located. Does this mean FreeRTOS no longer supports BLE?

---

<div class="post-metadata">

**Author:** ![kstribrn](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/kstribrn/32/2085_2.png) [@kstribrn](https://forums.freertos.org/u/kstribrn)\
**Post date:** [September 12, 2023, 10:45pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/7 "2023-09-12T22:45:49Z")

</div>

> [@beethoven62](#):
>
> I’m seeing that the FreeRTOS BLE library is deprecated. I don’t see any updates as to where the new library is located. Does this mean FreeRTOS no longer supports BLE?

You are correct in that our [Android](https://github.com/aws/amazon-freertos-ble-android-sdk) and [iOS](https://github.com/aws/amazon-freertos-ble-ios-sdk) BLE SDKs have been deprecated. The reasons for this are listed on those repositories specific READMEs. However these are specific to mobile devices. While FreeRTOS doesn’t specifically have a _core_ BLE library, we still do have [this library](https://github.com/aws/common-io-ble) which provides a BLE abstraction layer for embedded devices.

Sounds like you need an RPC client for your Application core which is running some FreeRTOS code. Is this correct?

---

<div class="post-metadata">

**Author:** ![beethoven62](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@beethoven62](https://forums.freertos.org/u/beethoven62)\
**Post date:** [September 12, 2023, 11:47pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/8 "2023-09-12T23:47:50Z")

</div>

Yes, this is correct. I also need to have an RPC client that would be compatible with the BLE host running on the network core, i.e. the RPC client needs to send the correct messages and recognize the responses coming back over the RPC interface.

---

<div class="post-metadata">

**Author:** ![Viet](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@Viet](https://forums.freertos.org/u/Viet)\
**Post date:** [June 28, 2024, 3:39pm UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/9 "2024-06-28T15:39:50Z")

</div>

Hi,

May I know which compiler/IDE did you use to port FreeRTOS on nRF5340DK?  
Did you face any issue with this function: vRestoreContextOfFirstTask()?

BR,  
Viet

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [July 1, 2024, 6:00am UTC](https://forums.freertos.org/t/freertos-on-nordic-nrf5340/15789/10 "2024-07-01T06:00:23Z")

</div>

Lets continue the discussion on this post of yours - [Porting FreeRTOS on nRF5340 with IAR IDE](https://forums.freertos.org/t/porting-freertos-on-nrf5340-with-iar-ide/20846).
