Carl Norman

Debugger wont initialise RAM, it thinks its flash!

Discussion created by Carl Norman on Aug 5, 2011
Latest reply on Aug 10, 2011 by Carl Norman

Hi,

 

I have just ported my CW7.2 project to CW10.1 (52259demo board with MQX). 

 

I have a problem with the debugger not initializing a section that I have created within RAM, it seems to think its Flash, but its exactly the same as my CW7.2 project (it was MQX3.6 now also using MQX3.7). It looks like the debugger in CW10.1 is not able to realise that it can just write to address in RAM for section you create yourself? 

 

After pressing debug, it programs all the flash but comes up with a message box saying

 

"Download Task Failure

 

Error: 0x000002D8 of Target Memory at 0x2000C000 is not within flash boundaries.

 

do you want to continue?"

 

We have allocated a section in RAM at 0x2000C000, and the programmer (use to) program this section of RAM, then the code uses this as EEPROM copy space.

 

This all worked in CW7.2 with MQX3.6, now for some reason CW10.1 and MQX3.7 wont initializes the RAM for me in this way. Is there a way to force the debugger to know that RAM is RAM and not RAM is flash?

 

These are the two lines from my linker that allocate this memory in RAM:

 

NV_RAM         (RW): ORIGIN = 0x2000C000, LENGTH = 0x00000600  # SRAM - This the RAM copy of EEPROM

 

.NVM_Page:{nvm_c.c (.data)nvm_c.c (.rodata)nvm_c.c (.text)} > NV_RAM

 

The actual file nvm.c is setup like this

..

#pragma explicit_zero_data on

#pragma force_active on

 

volatile uchar NVM_BASE = 0;//Just one example of a variable

 

#pragma explicit_zero_data off

#pragma force_active off

...

Outcomes