TRACE() information in Target Management

Hiya,

I’m having trouble consitently getting the TRACES to show in the Traces View in the Target Management Perspective.

Using Target Mode, not RTE.

I build the code in the OpenAT perspective, and create a RUN configuration as per the help file. I then connect to the target in the Target Management Perspective, flip back to OpenAT and RUN the configuration. This rebuilds the project, downloads the code to the module, then does a AT+CFUN=1 and AT+WOPEN=1 to start the application.

I open the Traces view by clicking on the ‘Traces Button’, then click on the Red icon to connect to the target.

At this point, if I click on the ‘Remote Traces Configuration’ button, I will sometimes get a list of traces to select for viewing - but more often than not I will get a dialog box with no trace levels to select. This is not consistent, either. Some compile/download/execute cycles I will have the traces present to select, the next time they won’t be there - but the traces I previously selected will still be updated in the Trace View.

I suspect that I am setting up the RUN configuration wrong- but I’ve checked between configurations and they appear to be set up the same bar the name of the targets (etc).

This is quite frustrating. Has anyone else had this problem? if so, how did you get around it?

ciao, Dave

i appeard to have this problem, i never noticed it because the trace levels were set once (during the beta) end were never altered during 2nd beta and release version.
recently i’ve noticed the same problem as you, but never investigated it further.

Hi all

Indeed, the trace levels configuration seems to be stored in the target, not in M2M Studio or TMT. E.g. set different trace levels combinations on two different targets, and switch M2M Studio connection between thoses two targets: trace levels configuration is “synchronized” with the connected target.

About the empty dialog box issue, seems I’ve the explanation: since M2M Studio stores the configuration in the target, it should read it at dialog opening. And it appears that if the target is not in debug state, and if M2M Studio is not aware about that (i.e. it still “believes” that the target is in Debug mode, after an hardware reset on the board, for instance), it seems that it fails to retrieve the trace levels configuration and displays an empty box.

I reproduce that by pressing the reset button while M2M Studio/target is running a “correct” debug session (i.e. traces are displayed), and querying the trace levels config box :arrow_right: always empty!
As a workaround, to resume the debug session, I refresh the target info tree ( :arrow_right: detects that the target is in “nominal” mode, and stops trace logging), enable again the trace logging (red circle in the Traces view), and query the trace levels config box :arrow_right: levels are back!

Agreed :frowning:
I think everything comes from bad synchronization between M2M Studio and the target state. As soon as the target is in nominal state while M2M Studio thinks it’s in debug mode, things start going bad…

Hiya daav.

Thanks for your assistance - and apologies for taking so long to get back to you.

It turned out that I was having two interrelated problems with my code.

The first was that target was not synchronized with M2M studio - as you suggested. I now refresh the target tree before starting the debug session and haven’t had as many issues.

The second (and real) problem I had was that I had a function call that was causing an exception and processor restart. Because my startup timer time-out was fairly short, I never had the chance to connect to the target before the target restarted - which of course lost the synchronization and confused things even more… I lengthened the startup time-out and now can connect to the target reliably.

Now to track down the exception issue…

Thanks again,

ciao, Dave