For Help! I cannot debug with C source code!

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

I use winavr generates the COF format file.
I use the COF format file in AVRstudio for debug.
But AVRstudio show "Coordinator The object file does not contain source code information"
so I cannot debug with my C source code.
why?
help me.

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

Whatever you read that told you to use COFF is several years out of date so I'd ignore that. It's Elf/Dwarf2 you want to be using.

If you use either an Mfile generated Makefile from the WinAVR package or you use the avr-gcc plugin to create GCC projects from within Studio you should find that the default output of both is a .elf file and that's exactly what Studio will prefer to read in.

By the way, make sure you have the latest versions of the tools. That is:

WinAVR20070525
Studio 4.13.528

Cliff

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

thank you,clawson.

I try to use the .elf file, but AVRstudio show
"Coordinator None of the available object file readers can read the specified object file. Please check the format of the object file.
Error loading objectfile :\avr\avrtest\rprintf\rprintftest.elf "

why? How can I do ?

by the way ,I use the winavr20070525 , AVRstudio 4.09 and avr jtag ice.

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

Sutdio 4.09 can NOT read the .elf files produced by WinAVR20070525. Can I refer you back to my previous message where I pointed out that the latest Studio is 4.13.528. Suggest you pay a visit to www.atmel.no/beta_ware/

Cliff

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

WinAVR20070525,
Studio is 4.13.528,
Elf/Dwarf2 format.

AVR Studio can't find source code. Switching back to WinAVR20060421, and it works.

Strange?!

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

Very strange, works just fine for me whether I build as a Studio project or use an Mfile generated Makefile. 'course if you use your own "home brew" makefile I guess there might be problems.

Cliff

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

I find the problem.
in the Makefile, add the "-gstabs" option. Now it is OK.I can debug with C source code.

thank you, clawson and cajavaja.