Where are the traces in target mode?


#1

Hi,

I am trying to make a sample application work (Hello World). It is working and i see the correct traces in debug mode. But when I use the Wismo_Target configuration, build, and then upload with AT+WDWL, then
only a OK message is given. Why don’t I see any trace messages?

Here is the hyperterminal output:

at+wdwl
+WDWL: 0
at+cfun=1
OK

+WIND: 13

+WIND: 1

+WIND: 16

+WIND: 4

+WIND: 10,“SM”,0,“FD”,0,“ON”,0,“EN”,0

+WIND: 11,“85969AFC49794787751F6221E63EC00B”,

+WIND: 7
at+wopen=1
OK

----> also, at+wopen=2 gives:

at+wopen=2
+WOPEN: 2,“AT v03.10”,“AT v03.10”
OK

Thanks.


#2

Have you started your application, using AT+WOPEN=1 ?

Once the application is running, you will need to use the Target Monitoring Tool (TMT) to enable the required traces.

With Traces enabled, you will see a load of junk if you connect the unit direct to hypoterminal - you should use the TMT and its associated Terminal Emulator.

BTW: sending firmware to the unit is usually considered downloading”, rather than “uploading”. 8)


#3

Thanks for the reply. I use the at+cfun=1 . After module resets I use AT+WOPEN=1 and OK message is received. I fail to get any trace messages except a single OK in hyperterminal. I connect TMT and TE using serial port manager and do the trace CUS4/1 initialization but only get the Trace 1 Unable to find the string of the remote trace in the file (ID = 2510) messages, not HelloWorld messages. Also AT+WOPEN=2 returns
+WOPEN: 2,“AT v03.10”,“AT v03.10” (See previous message for the log…)

I can suspect a single thing for now: In the OpenAT Settings Dialog , the core software version is 655 but AT+CGMR returns 655_09gm.Q2406B 2015268 111705 17:01. (should it be 655_09 in the dialog as well?) So there could be a software problem. But, remote mode traces work without problems so I am confused.

Best Regards.


#4

Sometimes I find the TMT is a bit quirky about starting the traces - it can seem to take a few attempts at resettting the target, doing ‘Get Informations About Target’ and ‘Init Target’, etc…

The TMT is obviously a 3rd-party development, and doesn’t always quite keep up… :frowning:


#5

I think my problem is not with TMT. I simply want to start an application that is built in target mode and see the traces in hyperterminal. The code is very simple (pasted at the bottom). I download the dwl to the module, then AT+CFUN=1 and then AT+WOPEN=1. Shouldn’t I be seing Hello World trace messages? (the tutorial_for_open_at_v3.10 page 31 suggests so) What I see is the module resets and then prints WIND messages and prints nothing else. I am also adding them to the bottom of the code. I think there is no problem with TMT because it works in remote mode. Both TMT and Hyperterminal fail to print traces in target mode. Any ideas?

#include “adl_global.h”

u32 wm_apmCustomStack [ 256 ];
const u16 wm_apmCustomStackSize = sizeof ( wm_apmCustomStack );

void HelloWorld_TimerHandler ( u8 ID )
{
/* Hello World */
TRACE (( 1, “Embedded : Hello World” ));
adl_atSendResponse ( ADL_AT_UNS, “\r\nHello World from Open-AT\r\n” );
}

void adl_main ( adl_InitType_e InitType )
{
TRACE (( 1, “Embedded : Appli Init” ));

/* Set 1s cyclic timer */
adl_tmrSubscribe ( TRUE, 10, ADL_TMR_TYPE_100MS, HelloWorld_TimerHandler );

}

hyperterminal after download and cfun=1:

at+wopen=1
OK

+WIND: 13

+WIND: 1

+WIND: 16

+WIND: 4

+WIND: 10,“SM”,0,“FD”,0,“ON”,0,“EN”,0

+WIND: 11,“F8967387817288601CFE474CB47EAD33”,

+WIND: 7

+WIND: 7

+WIND: 7

[/img]


#6

Hi,

Your log tells me that the application didn’t run at all. This happens when your program is stopped in target mode (e.g. because of an error) and was not properly shut down. Please re-run the program in RTE mode and when this start window appears click on “safe mode” then “quit”. After that your program should run in target mode. Try again in Hyperterminal and after wopen=1 you should at least see the r\nHello World from Open-AT\r\n

Best Regards,
Jan


#7

Just a point on terminology:

Traces - ie, things output by the TRACE macro - are not meant for viewing in Hypoterminal (or similar).

If you want output for viewing in Hypoterminal, you need to send AT Command Responses - using adl_atSendResponse

As for why you don’t see the “Hello World from Open-AT” output from your adl_atSendResponse, see Jan’s reply.


#8

Thanks guys. That safe target/quit magically solved my problem. I was even thinking that I had comprimised the module firmware while upgrading to 655. I also understand now the difference between AT command responses and trace messages. My development effort and belief in success really progressed. Best Regards. 8)
(Ps: By the way, it was rather unlucky for me to get stuck in that problem in my first program, because it made me doubt everything from antenna soldering to firmware :slight_smile: )