# IAr Embedded Workbench and FreeRTOS debugging

**URL:** <https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075>\
**Category:** Kernel\
**Created:** [February 23, 2007, 2:25pm UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075 "2007-02-23T14:25:58Z")\
**Posts on this page:** 6\
**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:** [February 23, 2007, 2:25pm UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075/1 "2007-02-23T14:25:58Z")

</div>

**[dercmdr](https://sourceforge.net/u/dercmdr/)** wrote on [Friday, February 23, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/88c4bbaf/#44c2):

Hi!

I am new to this Forum and to FreeRTOS. Started working with it this monday. Now I have a few questions which you could hopefully answer.

I use the IAR Embedded Workbench Kickstart IDE. I succesfully compiled the uIP Demo and everything works fine. Now I am wondering how I can debug my own applications using this IDE. I found no possibility to get a view of the running tasks or other important information like used stack sizes etc… Is there a way to get info about such things? I am using an AT91SAM7X-EK with an AT91SAM-ICE. If there is no possibility to debug FreeRTOS applications proper with Embedded Workbench, which other IDE would be advisable to use? I dont want to start working on my project without a good debugging method.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 23, 2007, 3:26pm UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075/2 "2007-02-23T15:26:25Z")

</div>

**[dercmdr](https://sourceforge.net/u/dercmdr/)** wrote on [Friday, February 23, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/88c4bbaf/#44c2/f16f):

I just saw the possibility of using debug plug-ins with embedded workbench. Unfortunately I can not find any plugin for FreeRTOS. Does any exist?

---

<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:** [February 23, 2007, 3:52pm UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075/3 "2007-02-23T15:52:20Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, February 23, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/88c4bbaf/#44c2/efcb):

You can figure most things out from the code.&nbsp; You have a handle to each task and can get most (all?) information about the task from that.&nbsp; For example, get information on the current running task by inspecting pxCurrentTCB in the debugger watch window.&nbsp; In the TCB there is a pointer to the stack, you can see the high water mark by inspecting the RAM to see how many 0xa5’s are left.

There is a function called vTaskList() in task.c that prints our the state, priority, max stack usage, etc. of each task to a string.&nbsp; This is the function that is used to generate the task table for the WEB server demos.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 23, 2007, 5:46pm UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075/4 "2007-02-23T17:46:32Z")

</div>

**[dercmdr](https://sourceforge.net/u/dercmdr/)** wrote on [Friday, February 23, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/88c4bbaf/#44c2/efcb/9e2e):

Thx for your response.

I read the documentation about the function vTaskList(), but I must admit I’m not quite sure how to use it.

I will check pxCurrentTCB when I’m back at work next week.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 26, 2007, 7:50am UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075/5 "2007-02-26T07:50:34Z")

</div>

**[dercmdr](https://sourceforge.net/u/dercmdr/)** wrote on [Monday, February 26, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/88c4bbaf/#44c2/4932):

You were right, pxCurrentTCB is very useful for debug purposes. Is there also a possibility to get information about semaphores?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 26, 2007, 9:19am UTC](https://forums.freertos.org/t/iar-embedded-workbench-and-freertos-debugging/3075/6 "2007-02-26T09:19:44Z")

</div>

**nobody** wrote on [Monday, February 26, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/88c4bbaf/#44c2/4932/4093):

Semaphores are just queues.&nbsp; Semaphore handles and queue handles are both pointers to a queue structure.&nbsp; The difficulty is that the data hiding technique used means the queue structure type is only visible from within queue.c.&nbsp; Inside queue.c it is then easy to see the queue in the debugger.&nbsp; Outside more difficult.&nbsp; You can move the queue structure definition to the header file if you don’t mind breaking the data hiding.

Dave.
