Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Why can't I load code with the debugger ?

Status
Not open for further replies.

jani12

Member
My target board is wired with Renesas Microcontroller Unit M16C/6N5 Group. Device M306N5FC. The target board is connected to Renesas E8a Emulator or debugger. The debugger software that I'm using is Renesas High-performance Embedded Workshop Version 4.09.01.007.
I start the debugger program. I click on connect. I select the MCU Group and Device. Then, for mode I select 'Erase Flash and Connect'. I then select 'Power Target from Emulator' and select 5 Volts. I click OK. While the debugger software is connecting, it says flash memory is erasing. I am using this microcontroller in single-chip mode. I view the contents of internal ROM. They are erased except the vector table at 0xFFFDC - 0xFFFFF isn't erased.
Then, I try to download my executable that contains debugging information. It always downloaded the code to internal ROM but now it never works. Debugger displays the following message:
"Memory area error. It overlaps the system range".
Internal ROM is 128-Kbytes. It's address range is: 0xE0000 - 0xFFFFF.
To the best of my knowledge I didn't change anything. Why suddenly I cannot the load code into ROM. This flash chip is rated for 100 write cycles. Have I exceeded the write cycle limit?
I have spaghetti wiring between my target board and actuators. Could this be wiring issue?
I look at the release version of executable, Motorola s-record. It's all FF's, except address range 0xFC000 - 0xFFE4D has data. This must be the code I'm loading with the debugger. This is within the system range.
 
Some general help.

Never buy just one microcontroller chip. Then if you have this sort of problem you can rule out the chip by replacing it with a new one.

Try loading a know good program. You should always keep a workspace with one around for times like this.


You said Debugger displays the following message:
"Memory area error. It overlaps the system range"
.

What is the system range?
 
I believe this is a erase problem. Firmware Location tab in the HEW Debugger says Program Firmware is 0x800 bytes, address range 0xE0000 - 0xFF700. When I connect to the target board with the debugger, HEW says it's erasing flash. I believe it's erasing these 0x800 bytes. After erase is completed, I inspect these 0x800 bytes. Not all of them are erased. Address range 0xE0000 - 0xE07F8 isn't erased. That's a problem because my application that I load starts at 0xE0000.
Erase/Program from debugger must have been working before because I never had problem loading my application from the debugger.
The only explanation I have is that this is a internal flash memory problem. Only 100 write cycles are guaranteed.
Does the group agree with my thoughts? I would like more opinions before I start replacing chips.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top