# vWriteTraceToBuffer() bugs CodeWarrior

**URL:** <https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943>\
**Category:** Kernel\
**Created:** [February 25, 2009, 4:24pm UTC](https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943 "2009-02-25T16:24:03Z")\
**Posts on this page:** 5\
**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 25, 2009, 4:24pm UTC](https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943/1 "2009-02-25T16:24:03Z")

</div>

**[onefranck](https://sourceforge.net/u/onefranck/)** wrote on [Wednesday, February 25, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/820a0572/#d6a2):

Hello all,

My goal is to use tracecon application to view the kernel activity.&nbsp; but the call to vWriteTraceToBuffer is causing exceptions into my program.&nbsp; Anyone has used this utility on ColdFire with CodeWarrior?

I might have to change a bit the code of this macro function, but I prefer not to.&nbsp; Any hints would be appreciated…

OneFranck

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 25, 2009, 4:54pm UTC](https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943/2 "2009-02-25T16:54:39Z")

</div>

**[onefranck](https://sourceforge.net/u/onefranck/)** wrote on [Wednesday, February 25, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/820a0572/#d6a2/0246):

Well let me refine my post.&nbsp; I was’nt correctly calling vTaskStartTrace(), providing it some wrong parameters.

I will allocate some memory to my pcBuffer before calling to&nbsp;&nbsp; vTaskStartTrace()

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 25, 2009, 9:59pm UTC](https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943/3 "2009-02-25T21:59:34Z")

</div>

**[onefranck](https://sourceforge.net/u/onefranck/)** wrote on [Wednesday, February 25, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/820a0572/#d6a2/ea27):

hehe, took me a while figuring out that my board has no disk and cannot save file, this is really funny.&nbsp; Since I cant save the trace file I’m looking at the trace Macros…

here is my question:&nbsp; How can I use the trace macros to pause and resume a timer in order to count the Idle TIme??

Is it possible?

thx

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 25, 2009, 10:07pm UTC](https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943/4 "2009-02-25T22:07:21Z")

</div>

**[edwards3](https://sourceforge.net/u/edwards3/)** wrote on [Wednesday, February 25, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/820a0572/#d6a2/ea27/c5ad):

Some IDEs allow you to copy a RAM buffer to a file on the host.

Search for trace macros and traceTASK\_SWITCHED\_IN in the forum I think you will find some solutions.

---

<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, 2009, 4:12pm UTC](https://forums.freertos.org/t/vwritetracetobuffer-bugs-codewarrior/2943/5 "2009-02-26T16:12:19Z")

</div>

**[onefranck](https://sourceforge.net/u/onefranck/)** wrote on [Thursday, February 26, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/820a0572/#d6a2/3d27):

Thanks Medwards,  
I have implemented the two macros (SWITCHED\_IN and OUT) and got something working with my timers library.
