# ARM Cortex-M3 vs.M0 Debugging (Can't Monitor Task States) Using IAR C-SPY

**URL:** <https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289>\
**Category:** Kernel\
**Created:** [December 5, 2016, 8:58pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289 "2016-12-05T20:58:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 5, 2016, 8:58pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/1 "2016-12-05T20:58:37Z")

</div>

**[cheuschkel](https://sourceforge.net/u/cheuschkel/)** wrote on [Monday, December 05, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#0471):

\*\*Apologies for the misleading title - the processors in question are a Cortex-M4 vs. Cortex-M3. \*\*

I’m using the OpenRTOS IAR plugin to debug a project that uses both a dual-core Cortex-M4 (LPC 43xx) and M3 (LPC17xx), both running FreeRTOS. On the M4 I can monitor task states using the plug-in. However, on the M3 I don’t see the same information. I did not notice anything noticeable differences in the FreeRTOS configuration files that would prevent me from monitoring the task states. Am I missing something? Is this a difference between FreeRTOS versions?

The plug-in details are as follows:  
OpenRTOSPlugin.dll v3.0.0 by WITTENSTEIN high integrity systems (both processors)

The IAR EW version is as follows:  
IAR Embedded Workbench IDE - ARM 7.80.1 (both processors)

The FreeRTOS versions are as follow:  
Cortex-M4 tskKERNEL\_VERSION\_NUMBER “V8.0.1”  
Cortex-M3 tskKERNEL\_VERSION\_NUMBER “V9.0.0”

Thanks,  
Cory H.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [December 6, 2016, 12:12am UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/2 "2016-12-06T00:12:03Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#0471/37a5):

Are you using the M3 and M0 cores separately - one at a time - or is  
this a dual core device and you are debugging both at once? If  
separately then I am not aware of any reason why it would work with one  
and not the other. If together at the same time then I don’t think the  
plug-in will support that.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 6, 2016, 4:24pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/3 "2016-12-06T16:24:05Z")

</div>

**[cheuschkel](https://sourceforge.net/u/cheuschkel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#3974):

They are used seperately and not a dual-core device (even though the M4 is a dual-core device, we are only running 1 core). Each processor has its own IAR project and seperate set of application code. I have tested running them both at the same time and independently (essentially with the M4 powered down and just running the M3 project) and experience the issue. Please see the attached image that demonstrates the missing Task State column.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [December 6, 2016, 4:39pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/4 "2016-12-06T16:39:19Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#3974/062e):

Perhaps it is something to do with a difference in the FreeRTOSConfig.h  
files - but I’m guessing.

The plug-in determines the FreeRTOSConfig.h settings by attempting to  
read various different values from the task control block when it first  
connects. Values that are excluded from the build because of a  
FreeRTOSConfig.h setting return an error when the plug-in tries to read  
them, and the error is visible in the IAR output window. The errors  
will only show once per debug session, the first time the plug-in is  
used for that session, as once the plug-in knows the values don’t exist  
it won’t attempt reading them again.

Do you see these error messages when you start a debug session - are  
there any differences in the messages output between the working and  
non-working projects?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 6, 2016, 5:15pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/5 "2016-12-06T17:15:52Z")

</div>

**[cheuschkel](https://sourceforge.net/u/cheuschkel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#20a5):

I did not see any error messages pertaining to my problem in the Debug Log window unfortunately. Attached is the output from running both debug sessions. I can include the FreeRTOSConfig files for your convenience, but I will have to create a few different posts.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 6, 2016, 5:17pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/6 "2016-12-06T17:17:02Z")

</div>

**[cheuschkel](https://sourceforge.net/u/cheuschkel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#7503):

Non-working FreeRTOSConfig.h (M3) attached.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 6, 2016, 5:17pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/7 "2016-12-06T17:17:29Z")

</div>

**[cheuschkel](https://sourceforge.net/u/cheuschkel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#d680):

Working FreeRTOSConfig (M4) attached.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [December 6, 2016, 5:24pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/8 "2016-12-06T17:24:25Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#d680/8203):

I think you will have to contact WITTENSTEIN high integrity systems, who  
maintain the plug-in, to see if they can ascertain the cause.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 6, 2016, 6:14pm UTC](https://forums.freertos.org/t/arm-cortex-m3-vs-m0-debugging-cant-monitor-task-states-using-iar-c-spy/6289/9 "2016-12-06T18:14:07Z")

</div>

**[cheuschkel](https://sourceforge.net/u/cheuschkel/)** wrote on [Tuesday, December 06, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7d048132/#c6e8):

Thanks for taking the time to look into this. I’ll contact them and see what they think of the problem.
