Hardfault Error after implementing Tracealyzer

Hello,

I’m currently stuck at the beginning of my project and not sure how to go from here.

The first goal ist to implement and visualize my first LED toggle tasks, which work perfectly as long as I don’t activate the Tracealyzer functions. After that I get thrown into the hardfault exception and I’m wondering if any of you had the same problem.

I’m working on the ATSAME54 Xplained Pro board with MPLAB X IDE. FreeRTOS 10.2.1 was installed with MPLAB Harmony and I’m using the latest Tracealyzer version. The compiler won’t find an error and the solutions I found didn’t seem to match my problems because my code itself works just fine.

Maybe someone could tell me what to look out for while setting up Tracealyzer . I followed the guides on the website of percepio.

And an error that a value at some adress can’t be reached. I would upload the picture but can’t ,since im new to this forum.

These are my only two clues. I hope someone can give me a direction.

Best regards

Hopefully the experts from Percepio can give a hint.

I think they will need a lot more information to be able to help. Can you say what you did to integrate the trace functions? Did you follow Percepio’s the getting started instructions?

Good morning,

thanks for the reply.

I followed the instructions available on the quickstart guide until there were no more complaints by the compiler. I used the video and added the written explanations to it.
After that I’ve been on standstill. I’m also at a loss to what information to look out for, except that I could follow the debbuging hard fault guide by freeRTOS.

Because the the error occured without me seemingly doing anything on my own, I was hoping to have forgotten something basic. Like Mplab harmony specific implementations or handler names which should or should not be used or something similiar. Are there specific conditions in your code that have to be met to use Tracealyzer. I thought one can add tracealyzer to his project at any point.

You can try to increase the stack size for the tasks. The tracing code adds some function calls, that increases the stack usage a bit. Not by much, but it may cause a stack overflow if you are near the limit.

Have you been in contact with Percepio support? If not, send an email to support@percepio.com and we can help you out. However, we will need some additional information.

Can you track down exactly where the hard fault occurs?

It would also be helpful if you could provide a screenshot of the values in “RecorderDataPtr” in the debugger.