problem in values using global variables in r5f64169 (r32c/100) debug session

Dear friends

I have created a project with HEW with assembler init code

when I use the E8a debugger to run the program I found that global variables can't change their values, instead of that in the tab "memory" the read values of global variables are not the same values that variables must have in the running program...

The only variables that behave well are the local funtions variables...

Do you have any clues on that? maybe I have to change some compiler/link options in -> Build -> Renesas Standard Toolchains ?? but I don't found any significant choices to select there

Thanks in advance!

PD: I attach a picture of the debug session to clarify the problem 

http://renesasrulz.com/renesas_products/r32c/m/mediagallery/157.aspx

UINT8 = typedef unsigned char

the compiler locates tmp in 0x00000419 which is in fact RAM memory according to datasheet.

  • Hello Lluis,

    for me the most likely cause for this behaviour is that the E8a work memory is overlapping to your data memory, and what you see is the value the E8a debugger writes to its work memory and NOT the value of your software.

    Please change the start address of E8a work memory in the emulator start dialog to a value outside your application memory.

  • Hi FrankL

    Thanks for your quick reply, How can I identify where the E8a working memory is placed?  it must be defined in the start asm code isn't it?

  • Hello Lluis,

    the memory is defined in the E8a start dialog on the tab "Firmware location".

    If you switched the start dialog off, please start the debugger in HEW without having an E8a connected. This will show the start dialog again.

    Rgds

    Frank

  • FrankL, you got right, I have checked the .map and found a starting address to fit the E8a debug code... after reallocate the RAM code, the globals vars have thery're correct value

    Thanks!