# Debug problem

**URL:** <https://forum.sierrawireless.com/t/debug-problem/104>\
**Category:** Open AT\
**Created:** [October 28, 2005, 11:53am UTC](https://forum.sierrawireless.com/t/debug-problem/104 "2005-10-28T11:53:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![migabi](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@migabi](https://forum.sierrawireless.com/u/migabi)\
**Post date:** [October 28, 2005, 11:53am UTC](https://forum.sierrawireless.com/t/debug-problem/104/1 "2005-10-28T11:53:24Z")

</div>

I have some trouble with the following code:

#include “adl\_global.h”  
#include “adl\_sms.h”  
#include \<time.h\>  
u32 wm\_apmCustomStack [256];  
const u16 wm\_apmCustomStackSize = sizeof ( wm\_apmCustomStack );  
bool gps\_handler (adl\_gpsEvent\_e Event, adl\_gpsData\_t \* GPSData)  
{  
switch ( Event )  
{  
case ADL\_GPS\_EVENT\_POLLING\_DATA :  
{  
ascii RspStr [250];  
wm\_sprintf ( RspStr, “\r\n+Poz: %s,%s,%s,%s,%s \r\n”, GPSData-\>Position.UTC\_time, GPSData-\>Speed.speed\_km\_p\_hour, GPSData-\>Position.latitude, GPSData-\>Position.longitude, GPSData-\>Position.date);  
adl\_atSendResponse ( ADL\_AT\_UNS, RspStr );  
}  
break;  
}  
}  
void adl\_main ( adl\_InitType\_e InitType )  
{  
u32 timp;  
s8 gps\_subscribe\_handler;

timp = 2 ;  
gps\_subscribe\_handler = adl\_gpsSubscribe (gps\_handler, timp);  
}

In debug mode, it run for a small period of time and after that it crash.  
Loaded in the q2501b, it run perfectly.  
Also, the speed is not there. The module q2501b is not computing the speed?  
Debuging enviroment is MS VStudio 6.0 with gcc (standard enviroment).  
Where is the problem?

---

<div class="post-metadata">

**Author:** ![snoooze](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@snoooze](https://forum.sierrawireless.com/u/snoooze)\
**Post date:** [October 28, 2005, 12:28pm UTC](https://forum.sierrawireless.com/t/debug-problem/104/2 "2005-10-28T12:28:18Z")

</div>

Hello,

It could be related to the serial speed and/or the amount of data transmitted when you are in debug mode.

In the document “Open AT tools manual” there is written:

> [@paragraph 6.1.4.3](#):
>
> …If the serial link is set to 9600 bps, some traces may not appear (lost)…

…and I think that when sending a lot of data in debug mode, it could be too much for the RTK to handle and the debug environment will crash or not show everything thats transmitted.

My experience is the same as yours, somtimes its working in target but not in debug mode. And in most of the cases its been caused by too much traffic or debug information in debug mode.

Try to filter, slow down or shrink the data transmitted in debug mode and see if it makes any difference.

/Snoooze
