0___________
0___________

Reputation: 67835

ARM Eclipse debugging code in the RAM. Is it possible to see the source code`

I have a problem when try to debug the code which is copied to the SRAM and executed from there.

The code is overwriting the data - but it is done only during the system update. The sections where code is placed are correctly defined in the linker script file and the debuger correctly see the addresses. But when I step into the function (and the code in RAM is the correct one) it does not connect the source files with the code executed in the memory.

Do you know how can it be done. Debugging C code on the assembler level is not something which makes me happy :)

Any help appreciated.

Upvotes: 0

Views: 288

Answers (1)

0___________
0___________

Reputation: 67835

The problem is a bit silly. When you call RAM function from the FLASH (the first call has to be done this way) it has to be done by the veneer. It was messing up the debugger. But having own calling macro (because of the distance it has to be done via the pointer) everything works fine

example calling macro.

#define RAMFCALL(func, ...)   {unsigned (* volatile fptr)() =  (unsigned (* volatile)())func; fptr(__VA_ARGS__);}

Upvotes: 2

Related Questions