# FreeRtos not running on PIC32MZ

**URL:** <https://forums.freertos.org/t/freertos-not-running-on-pic32mz/17288>\
**Category:** Microchip\
**Created:** [April 25, 2023, 11:28pm UTC](https://forums.freertos.org/t/freertos-not-running-on-pic32mz/17288 "2023-04-25T23:28:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![maharvey](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@maharvey](https://forums.freertos.org/u/maharvey)\
**Post date:** [May 1, 2023, 8:01pm UTC](https://forums.freertos.org/t/freertos-not-running-on-pic32mz/17288/6 "2023-05-01T20:01:53Z")

</div>

I think that you are running in the same issue as me:

> [@configLIST\_VOLATILE required - Missing configASSERT in listREMOVE\_ITEM](https://forums.freertos.org/t/configlist-volatile-required-missing-configassert-in-listremove-item/16400):
>
> Using the provided sample code for the PIC32 platform and FreeRTOS v202112.00. I ran into an issue in tasks.c when enabling the compiler optimizations (XC32 v4.00 compiler, -O2 optimization). The exception happens in xTaskResumeAll() when the listREMOVE\_ITEM macro tries to remove an item with a null pointer as the container. The macro creates a pointer pxList and de-references it without checking if it is NULL, causing an exception. In my case, it seemed to be caused by an aggressive compiler …

I recommend that you add `#define configLIST_VOLATILE volatile` in FreeRTOSConfig.h to err on the safe side, I would randomly get null-pointer de-referenced without it.

---

_[View the full topic](https://forums.freertos.org/t/freertos-not-running-on-pic32mz/17288)._
