Unable to debug code relocated with "-Ttext=" (boo

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

AVR Studio and GDB/Insight is unable to debug code when it is relocated with the linker option "-Ttext=0x1E000" for an ATmega128, e.g. when creating a bootloader application.

This was experienced with WinAVR-20050214 and AVR Studio 4.11, by loading dwarf-2 and stabs debug format (ELF and COFF).

I can verify that the code is correctly generated by inspecting the dissassembly, but the C debugging info is mangled, e.g. the "main" starting point is incorrectly displayed as "main@000070B9: main", in stead of the proper location of "0000F0B9".

Any workaround or linker switch that I should be aware of?

Regards,
Pieter

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

I have had the same problem in AVR-Studio when I tried to simulate bootloader code starting at 0x1C00. AVR-Studio didn't load the main.c but another .c file, and the code pointer didn't move in single step mode.

As work around I have compiled the code starting at 0x0000, simulation works fine then.

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

pieterc wrote:
AVR Studio and GDB/Insight is unable to debug code when it is relocated with the linker option "-Ttext=0x1E000" for an ATmega128,

Hi
Perhaps develop your bootloader code on atmega64 platform.
It seems to work fine with AvrStudio ( 4.11 b.401, dwarf2 )

Best regards Jurek S.