# Debug

**URL:** <https://forum.sierrawireless.com/t/debug/3613>\
**Category:** Legacy AirPrime modules\
**Created:** [September 7, 2009, 2:50pm UTC](https://forum.sierrawireless.com/t/debug/3613 "2009-09-07T14:50:56Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![foxalarm](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@foxalarm](https://forum.sierrawireless.com/u/foxalarm)\
**Post date:** [September 7, 2009, 2:50pm UTC](https://forum.sierrawireless.com/t/debug/3613/1 "2009-09-07T14:50:56Z")

</div>

as the debug [Target]\_ARM\_ELF\_GCC\_Debug is executed with Q2686.  
Regards

---

<div class="post-metadata">

**Author:** ![fer.caballero](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fer.caballero](https://forum.sierrawireless.com/u/fer.caballero)\
**Post date:** [September 8, 2009, 6:27am UTC](https://forum.sierrawireless.com/t/debug/3613/2 "2009-09-08T06:27:28Z")

</div>

❓❓❓❓❓

---

<div class="post-metadata">

**Author:** ![foxalarm](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@foxalarm](https://forum.sierrawireless.com/u/foxalarm)\
**Post date:** [September 9, 2009, 6:43am UTC](https://forum.sierrawireless.com/t/debug/3613/3 "2009-09-09T06:43:06Z")

</div>

I try to be clearer:) … The debug it can be made only in RTE mode? it is possible to play Audio in debug Mode?  
Sorry for my English 🙂  
thanks

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 9, 2009, 7:08am UTC](https://forum.sierrawireless.com/t/debug/3613/4 "2009-09-09T07:08:18Z")

</div>

> [@foxalarm](#):
>
> The debug it can be made only in RTE mode?

Not at all: DEBUG facilities like TRACE and DUMP can also be used in Target mode.

What you can’t do is to set breakpoints in Target mode.

---

<div class="post-metadata">

**Author:** ![foxalarm](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@foxalarm](https://forum.sierrawireless.com/u/foxalarm)\
**Post date:** [September 9, 2009, 7:27am UTC](https://forum.sierrawireless.com/t/debug/3613/5 "2009-09-09T07:27:48Z")

</div>

```auto
#include "adl_global.h"

/ *************************************************************************** /
/* Mandatory variables */
/*-------------------------------------------------------------------------*/
/* wm_apmCustomStackSize */
/*-------------------------------------------------------------------------*/
/ *************************************************************************** /
const u16 wm_apmCustomStackSize = 1024;
const u32 wm_apmIRQLowLevelStackSize = 1024;
const u32 wm_apmIRQHighLevelStackSize = 1024;

s32 Handle;
s32 Low_Level_IRQHandle;
ascii RawDMTF[2];

void * StreamBuffer;

bool Low_Level_IRQHandler ( adl_irqID_e Source, adl_irqNotificationLevel_e NotificationLevel, adl_irqEventData_t * Data ){

TRACE (( 1, "DTMF received : %c, %c ", StreamBuffer[0],StreamBuffer[1] ));
wm_memcpy( &( RawDMTF [0] ), StreamBuffer , ADL_AUDIO_MAX_DTMF_PER_FRAME );
adl_atSendResponse( ADL_AT_RSP, RawDMTF );

return FALSE;
}
// audio event call-back function
void Audio_Event_Handler ( s32 audioHandle, adl_audioEvents_e Event ){

return;
}
void adl_main ( adl_InitType_e InitType ){

s32 Ret;
s32 BufferSize;

Low_Level_IRQHandle = adl_irqSubscribe ( Low_Level_IRQHandler, ADL_IRQ_NOTIFY_LOW_LEVEL, ADL_IRQ_PRIORITY_LOW_LEVEL, 1 );
Handle = adl_audioSubscribe ( ADL_AUDIO_MICROPHONE, Audio_Event_Handler , ADL_AUDIO_RESOURCE_OPTION_FORBID_PREEMPTION );
Ret = adl_audioGetOption ( Handle,ADL_AUDIO_DTMF_RAW_STREAM_BUFFER_SIZE, &BufferSize );
StreamBuffer = adl_memGet( BufferSize );
Ret = adl_audioStreamListen( Handle, ADL_AUDIO_DTMF,Low_Level_IRQHandle, 0, StreamBuffer);
}
```

ok…

1. Why this example does not work?
2. I want to put a breakpoint in Low\_Level\_IRQHandler, is it possible?

Thanks

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 9, 2009, 7:55am UTC](https://forum.sierrawireless.com/t/debug/3613/6 "2009-09-09T07:55:12Z")

</div>

> [@foxalarm](#):
>
> 1. Why this example does not work?

In what way do you think that it “does not work” ?

> [@](#):
>
> 1. I want to put a breakpoint in Low\_Level\_IRQHandler, is it possible?

I very much doubt it.

The Remote (or “RTE”) mode allows you to set breakpoints by having your application actually executing on the PC; this obviously has restrictions for low-level features that depend directly upon the hardware - like IRQ handlers.  
Hence I very much doubt the RTE mode supports IRQ handlers (but I haven’t checked).

However, you can still put TRACE calls in your IRQ handlers - just remember not to overdo it, and that the TRACE from IRQ handlers appears on a different “flow” from the “main” ADL application…

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)\
**Post date:** [September 9, 2009, 10:52pm UTC](https://forum.sierrawireless.com/t/debug/3613/7 "2009-09-09T22:52:56Z")

</div>

Hiya,

Use of interrupts in RTE mode is not supported (at least in firmware R7.4).

See (at least) the notes at the end of section 3.25.10 of the ADL User Guide.

ciao, Dave

---

<div class="post-metadata">

**Author:** ![foxalarm](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@foxalarm](https://forum.sierrawireless.com/u/foxalarm)\
**Post date:** [September 10, 2009, 6:58am UTC](https://forum.sierrawireless.com/t/debug/3613/8 "2009-09-10T06:58:00Z")

</div>

ooooookkkkkk resolved with Target Mode and TRACE, thanks to all  
other question:  
it is possible make to execute in the application a CUSTOM AT COMMAND?  
Thanks  
Regards

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 10, 2009, 8:06am UTC](https://forum.sierrawireless.com/t/debug/3613/9 "2009-09-10T08:06:36Z")

</div>

> [@foxalarm](#):
>
> is it possible to execute in the application a CUSTOM AT COMMAND?

No, it is not.

Again, you need to read the ADL User Guide - it specifically mentions this:

> [@ADL User Guide](#):
>
> Note:  
> Currently these API functions cannot be used to execute a custom AT command subscribed with adl\_atCmdSubscribe to call its handler.  
> Only standard AT commands may be used with these functions. Custom AT commands can be executed when received over an external port, such as a UART.

But you can, of course, call your custom command handler directly from your own code…

---

<div class="post-metadata">

**Author:** ![foxalarm](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@foxalarm](https://forum.sierrawireless.com/u/foxalarm)\
**Post date:** [September 10, 2009, 8:15am UTC](https://forum.sierrawireless.com/t/debug/3613/10 "2009-09-10T08:15:12Z")

</div>

I had already read the guide, I hoped was a solution 😉

I will try to recall custom command handler…  
thanks

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 10, 2009, 10:03am UTC](https://forum.sierrawireless.com/t/debug/3613/11 "2009-09-10T10:03:10Z")

</div>

> [@foxalarm](#):
>
> I had already read the guide

You need to make that clear! 😉

> [@](#):
>
> I will try to recall custom command handler.

Rather than call the handler direct, you might find it easier to structure it so that you have a separate function that your handler can call, and your code can call:

```auto
+---------+ +-----------------+ +------------+
| | | | | |
| Handler +------->+ Common function +<-------+ other code |
| | | | | |
+---------+ +-----------------+ +------------+
```

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 21, 2009, 9:21am UTC](https://forum.sierrawireless.com/t/debug/3613/12 "2009-09-21T09:21:32Z")

</div>

kiranreddysingareddy, how do you think that your question is in any way related to anything in the rest of this thread?

Don’t hijack unrelated threads - start your own new thread with your own new question!

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 22, 2009, 9:23am UTC](https://forum.sierrawireless.com/t/debug/3613/13 "2009-09-22T09:23:10Z")

</div>

> [@awneil](#):
>
> Don’t hijack unrelated threads - start your own new thread with your own new question!

I think why this question is not related to this thread . this thread for debug right… ?  
i was getting problem also while debugging . so sorry if this not related to this thread…  
thanks and regards  
kiran

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 22, 2009, 9:34am UTC](https://forum.sierrawireless.com/t/debug/3613/14 "2009-09-22T09:34:01Z")

</div>

> [@kiranreddysingareddy](#):
>
> this thread for debug right… ?

It is one specific question from one specific user about his specific issue while debugging his specific system - it is not a general thread to catch all possible questions from any user that might be in any way related to “DEBUG” ❗

You should start your own thread; as always, if you think any other thread(s) may be related, you can mention it, and post links to them…

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 22, 2009, 11:41am UTC](https://forum.sierrawireless.com/t/debug/3613/15 "2009-09-22T11:41:47Z")

</div>

Thank you …
