How to view traces?

I have the following code, how can i view the traces at each step so i can find out where the problem lies???

#include "adl_global.h"
static s8 sms_automaton_Handle_txt;
static u8 AUTO_TRACE_LEVEL = 2;
const u16 wm_apmCustomStackSize = 1024;
void SMS_AUTO_ctrl_Handler(u8 Event, u16 Nb)
{
    // Does nothing
}
bool SMS_AUTO_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
	HANDLE_GPIO = adl_ioSubscribe ( HANDLE_GPIO, MyGpioConfig1, 0, 0,   0 );
	HANDLE_GPIO = adl_ioSubscribe ( HANDLE_GPIO1, MyGpioConfig2, 0, 0,   0 );

    bool sms_tobe_fwd = TRUE;

        TRACE (( AUTO_TRACE_LEVEL, "SMS AUTOMATON "));

        if(strcmp(SmsText, "one") == 0){
               adl_smsSend(sms_automaton_Handle_txt, SmsTel, "Done one", ADL_SMS_MODE_TEXT);               
        }
        else if(strcmp(SmsText, "two") == 0){
            adl_smsSend(sms_automaton_Handle_txt, SmsTel, "Done two", ADL_SMS_MODE_TEXT);            
        }
        else{
        	adl_smsSend(sms_automaton_Handle_txt, SmsTel, "Error in command", ADL_SMS_MODE_TEXT);
        }
    return sms_tobe_fwd;
}
void adl_main(adl_InitType_e adlInitType)
{
    // SMS automaton test application
    TRACE (( 1, "SMS automaton sample main" ));
    TRACE (( 1, __DATE__ ));
    TRACE (( 1, __TIME__ ));
    TRACE (( AUTO_TRACE_LEVEL, "Start SMS_Automaton application" ));

    // Subscribe to the SMS Service
    sms_automaton_Handle_txt = adl_smsSubscribe(SMS_AUTO_Handler, SMS_AUTO_ctrl_Handler, ADL_SMS_MODE_TEXT);
}

If you’re using M2M studio you can see them in the “Traces View” when running the application. It’s in the Target Management perspective, M2M studio automatically switches to it after downloading an application to the module.

You probably have to first configurate the trace levels that you want to see (in the button “Remote traces configuration”, beware that it’s kind of buggy and sometimes it won’t let you select the trace levels… :confused: ) or nothing will appear.

Regards

when the module won’t let me set wich traces i want to view i take the following steps:

  1. stop the running program (especially with a buggy program)
  2. refresh the Target Info Tree (this syncronises your module with the program, and puts it in the right mode)
  3. then set the traces you want to view
  4. then start the program
  5. start the traces.

i think the problem is with the downloading of the application

I connect to the target in M2MStudio and then select the file to download…but i have an error, the modem does not respond to any commands

-> Connect to Hardware (Target Manager) usualy Com 1, 115200 Baut, 8 data, none parity, 1 stop
-> Select the Project (not any file, the project itself)
-> klick to arrow-down (the black one) near the run button (green arrow)
-> Run Configuration -> click “new”

Now, there should be a new configuration called same as your project

With run, you can download it to target

something else:
You have to use Debug, Release is without Trace

hmm i stuck with this:

try connecting with hypertrm and sending “at+wopen=0” until you see reaction from the module
then try to set the traces.
also check if your module-ground is soldered to your dev-kit

i d/c and connected again…it automattically does at+wopen=1

now how can i be sure that my application is running inside the modem???

You what?

It’s not helpful to abbreviate cryptically like that!

AT+WOPEN=7

ok upgraded firmware and program works successfully…thanks awneil

I have the same question, which has not been answered at all in this thread:

How do i view TRACE info when using visual studio?

You have to use the Target Monitoring Tool, or “TMT”.