Sporadic hard faults, how to find reason

gerhardkreuzer wrote on Sunday, January 31, 2016:

… oh, this include in trcConfig.h helps:

/* Silicon Labs includes. */
//#include "em_chip.h"

#include "arm_const_structs.h"

/******************************************************************************
 * SELECTED_PORT
 *

and there is a problem within trcHardwarePort.c, I need to hard code the processors clock frequency …

if (RecorderDataPtr->frequency == 0)
	{
		// RecorderDataPtr->frequency = TRACE_CPU_CLOCK_HZ / HWTC_DIVISOR;
		RecorderDataPtr->frequency = 100000000 / HWTC_DIVISOR;
	}

Doesn’t kow if it really works but it compiles now, this is a lot …

And now the big question:
Hoe can I have a ‘TRACE’ configuration and a ‘NOTRACE’ configuration. like the ‘Degug’ and ‘Release’ configurations in Studio 6.2

Thanks a lot

With best regards

Gerhard

gerhardkreuzer wrote on Sunday, January 31, 2016:

… and what do I get after hours of fiddling around?

As soon as I call ‘uiTraceStart();’ I get an hard fault … really nice …

rtel wrote on Sunday, January 31, 2016:

And now the big question:
Hoe can I have a ‘TRACE’ configuration and a ‘NOTRACE’ configuration.
like the ‘Degug’ and ‘Release’ configurations in Studio 6.2

Either include the header file at the bottom of the FreeRTOSconfig.h
file, or don’t. If you don’t include it, also don’t initialise or start
the trace recorder.

As soon as I call ‘uiTraceStart();’ I get an hard fault …
really nice …

Did you call vTraceInitTraceData() before calling vTraceStart()?

gerhardkreuzer wrote on Sunday, January 31, 2016:

… ok, some step further.

The Atmel document is defenitely wrong, they try to tell me, I only have to invoke uiTraceStart();
Correct is that I first have to invoke

vTraceInitTraceData();
uiTraceStart();

So, now I tried to setup the free version of the viewer. Ok, I found the infos in the map file, it looks different than described, but I am pretty shure I got it.

Now they tell me, that I have input this data in the ‘Settings --’ menue. But, this, and all others were disabled …
And there is a menu point ‘Atmel Studio’, here I am able to click ‘Read’, but … Error.

Ok, and now?

With best regards

Gerhard

gerhardkreuzer wrote on Sunday, January 31, 2016:

… ok, second attempt works, works?
I see a red trace, named Startup, no of my tasks, semaphors, nothing … just useless.

Where can I find a document telling me how to connect this tool to my Atmel Studo or HW so I really get useful information …

With best regards

Gerhard

rtel wrote on Monday, February 01, 2016:

I think the stand-alone trace viewer/IDE has a help system, accessible
by the help menu, that has quite a lot of useful documentation.

gerhardkreuzer wrote on Tuesday, February 02, 2016:

… works. Problem was installing the hooks …
Case can be closed now.