AVR Studio crash debugging multiple memory segments

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use the AVR GCC plug-in to create two memory segments at the end of flash for two separate boot loader functions. This compiles fine, but when I click "Start Debugging", and the progress bar for "Loading program memory..." gets a few steps through, it crashes: "AVR Studio MFC Application has encountered a problem and needs to close."

When I put the two boot loader functions in the same segment, everything works fine. (The second segment is still present but zero length.)

I'm debugging with a JTAG ICE MkII. The device is ATmega168. The memory segments are at word address 0x1F00 and 0x1F80. I have installed SP2 (build 472) to AVR Studio 4.12, but this also occured before I installed it (I think I was using SP1 build 462).

I have reviewed the .hex file produced by the compilation and it looks correct, with two gaps in the address sequence. I'm wondering if AVR Studio just can't deal with these gaps.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've had problems (though admittedly not a complete crash) when I generated a .ELF from avr-gcc that had a normal .text at 0x0000 and a .bootloader at 0x1C00. The ELF file loaded into Studio but the initialisers for the .data segment weren't loaded so when the C preamble copied across to SRAM it was all just 0xFF rather than initial values. This seems to be a limitation of the ELF parser in Studio that it can't really cope if you don't just have the default .text, .data and BSS sections. I guess you have just found another aspect of this.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hope to get around to fixing these issues soon.

It would be of great help if you sent any of the projects you have problems with to avrbeta@atmel.com

Regards,
Torleif

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm experiencing this identical problem as well. Even with "do not download" turned on, Studio 4 SP2 build 472 cannot seem to handle loading an .elf if it has multiple segments. Well, it can if you mock up dummy segments and put simple test code in them, but with a real application that actually does something, the whole application just craps out.

I'm trying to get permission to send you source code now, Torleif.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0