# Trace on ARM7

**URL:** <https://forums.freertos.org/t/trace-on-arm7/2149>\
**Category:** Kernel\
**Created:** [April 8, 2005, 1:53pm UTC](https://forums.freertos.org/t/trace-on-arm7/2149 "2005-04-08T13:53:53Z")\
**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:** [April 8, 2005, 1:53pm UTC](https://forums.freertos.org/t/trace-on-arm7/2149/1 "2005-04-08T13:53:53Z")

</div>

**nobody** wrote on [Friday, April 08, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/61851afa/#56aa):

Is it possilbe to Trace the Scheduler directly on the ARM7 Controller not only in Dos? Im using a Philips LPC2138 Controller on an Keil board.  
Thanks, sensej

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 8, 2005, 2:12pm UTC](https://forums.freertos.org/t/trace-on-arm7/2149/2 "2005-04-08T14:12:17Z")

</div>

**nobody** wrote on [Friday, April 08, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/61851afa/#56aa/6142):

V2.6.1 has the changes, but in this version the definition:

#define tskSIZE\_OF\_EACH\_TRACE\_LINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( sizeof( unsigned portLONG ) + sizeof( unsigned portCHAR ) )

should be:

#define tskSIZE\_OF\_EACH\_TRACE\_LINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( sizeof( unsigned portLONG ) + sizeof( unsigned portLONG ) )

but this does not make too much of a problem.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 11, 2005, 11:48am UTC](https://forums.freertos.org/t/trace-on-arm7/2149/3 "2005-04-11T11:48:18Z")

</div>

**nobody** wrote on [Monday, April 11, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/61851afa/#56aa/c4c3):

Thanks for quick answer. If I do so my Programm ends in the DAbt\_Handler(0x00002CC0). Is there any bad definition of Memory?

---

<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:** [April 11, 2005, 12:08pm UTC](https://forums.freertos.org/t/trace-on-arm7/2149/4 "2005-04-11T12:08:13Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, April 11, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/61851afa/#56aa/c4c3/f4f6):

Hi,

If your vWriteTraceToBuffer() trace macro is as defined by the V2.6.1 release and the tskSIZE\_OF\_EACH\_TRACE\_LINE definition is corrected as per the other post in this thread then the only other thing I can suggest is to check that the trace buffer is aligned on a four byte boundary.&nbsp; I’m not sure if the compiler will do this automatically for a byte array.&nbsp; You can force it using a #pragma, or by placing it in a struct following a long as per:

struct xBuffer  
{  
&nbsp;&nbsp;&nbsp; unsigned long ulDummy; // This will get alligned  
&nbsp;&nbsp;&nbsp; char cTraceBuffer[BUFFER\_SIZE];  
}

Failing this, you can send me your modified file (presumably trace.c) and I can take a look at it (use the email address form the contacts page of the [FreeRTOS.org](http://FreeRTOS.org) web site).&nbsp;

Which processor are you using?&nbsp; I might be able to give it a go.

---

<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:** [April 11, 2005, 12:10pm UTC](https://forums.freertos.org/t/trace-on-arm7/2149/5 "2005-04-11T12:10:04Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, April 11, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/61851afa/#56aa/c4c3/f4f6/3a38):

I meant tasks.c as the modified file - not trace.c!

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 11, 2005, 7:28pm UTC](https://forums.freertos.org/t/trace-on-arm7/2149/6 "2005-04-11T19:28:24Z")

</div>

**nobody** wrote on [Monday, April 11, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/61851afa/#56aa/d563):

If the trace is already started when the scheduler starts then the time stamp will be zero - as in this file segment.
