# configENABLE\_TRUSTZONE == 0

**URL:** <https://forums.freertos.org/t/configenable-trustzone-0/10125>\
**Category:** Kernel\
**Created:** [June 26, 2020, 12:53pm UTC](https://forums.freertos.org/t/configenable-trustzone-0/10125 "2020-06-26T12:53:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eugene/32/377_2.png) [@Eugene](https://forums.freertos.org/u/Eugene)\
**Post date:** [June 26, 2020, 12:53pm UTC](https://forums.freertos.org/t/configenable-trustzone-0/10125/1 "2020-06-26T12:53:02Z")

</div>

Hi !

I have tried to compile LPC55S69 port when on nonsecure part rtos used without any secure context allocation. E.g- configENABLE\_TRUSTZONE == 0

But in portasm this flag is not used and xSecureContext is still referenced.

portasm.c:232: undefined reference to `xSecureContext’

Is any idea how to disable this in correct way ?

Regards,  
Eugene

---

<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:** [June 26, 2020, 2:52pm UTC](https://forums.freertos.org/t/configenable-trustzone-0/10125/2 "2020-06-26T14:52:35Z")

</div>

Hi Eugene,

If you do not want to use TrustZone, you need to use `ARM_CM33_NTZ` port: [https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/master/portable/GCC/ARM\_CM33\_NTZ/non\_secure](https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/master/portable/GCC/ARM_CM33_NTZ/non_secure)

This section provides more details on how to use FreeRTOS without TrustZone support:[https://www.freertos.org/2020/04/using-freertos-on-armv8-m-microcontrollers.html#FREERTOS\_WITHOUT\_TRUSTZONE](https://www.freertos.org/2020/04/using-freertos-on-armv8-m-microcontrollers.html#FREERTOS_WITHOUT_TRUSTZONE)

Thanks,  
Gaurav

---

<div class="post-metadata">

**Author:** ![Eugene](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eugene/32/377_2.png) [@Eugene](https://forums.freertos.org/u/Eugene)\
**Post date:** [June 26, 2020, 5:53pm UTC](https://forums.freertos.org/t/configenable-trustzone-0/10125/3 "2020-06-26T17:53:14Z")

</div>

Hi Gaurav !

Looks like feature is not fully supported under #ifdef configENABLE\_TRUSTZONE flag.  
I should take other portasm.c from different folder.  
Basically it mean RTOS what is running on nonsecure side without any communication with secure side.  
Is this so ?

Regards,  
Eugene

---

<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:** [June 26, 2020, 6:06pm UTC](https://forums.freertos.org/t/configenable-trustzone-0/10125/4 "2020-06-26T18:06:04Z")

</div>

> Looks like feature is not fully supported under #ifdef configENABLE\_TRUSTZONE flag.

If you do not want to use TrustZone support (i.e. want to have the complete memory space as non-secure), you need to do the following two things:

- Build FreeRTOS with `configENABLE_TRUSTZONE` set to zero in FreeRTOSConfig.h file.
- Use ARM\_CM23\_NTZ or ARM\_CM33\_NTZ port files depending on whether the target hardware is an ARM Cortex-M23 or an ARM Cortex-M33.

As I mentioned above, it is described in detail here: [Using FreeRTOS on ARMv8-M Microcontrollers - FreeRTOS](https://www.freertos.org/2020/04/using-freertos-on-armv8-m-microcontrollers.html#FREERTOS_WITHOUT_TRUSTZONE)

> Basically it mean RTOS what is running on nonsecure side without any communication with secure side.  
> Is this so ?

Yes.

Thanks.
