Reputation: 11
I have a problem when debugging a firmware. I work with Microchip Studio Version 7.0.2594 and a microcontroller called "ATSAME54P19A".
I can build the software without any warnings and errors. I can put the software on the controller without errors or warnings. I can start on chip debug over an Atmel ICE adapter and set breakpoints. But when I want to read a variable after the programm stops at the breakpoint, then I get the message "Could not read memory content for stack variable".
This message is only displayed in the include files. If I debug in the main itself, I can read the value of a variable.
Short example:
#include <utils.h>
#include <atmel_start.h>
#include "Anyinclude.h"
int main(void)
{
volatile uint32_t testvariable __attribute__((unused)) = 0;
atmel_start_init();
testvariable = 5;
testvariable++; // Here are the Breakpoint that works an show testvariable = 5, what I expected
any_function();
while (1)
{
any_cyclic_function();
}
}
// Anyinclude.c
void any_function(void)
{
volatile uint32_t testvariable2 __attribute__((unused)) = 0;
testvariable2 = 5;
testvariable2++; //Here are the Breakpoint with the Message "Could not read memory content for stack variable"
}
I worked several times with Atmel Studio 4 & 6 an the ATMEGA series. But this is my first time with ATSAM.
The optimization level is set to none (-O0) The debug level is set to maximum (-g3)
I don't have any idea, what I do wrong. Maybe someone knows this problem an can give me a solution.
Thanks in advance.
I goolged the problem, but I didn't find an answer. Someone had the same problem some time ago, but did not get an answer.
Upvotes: 1
Views: 93