cannot get dwarf-2 file loaded

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

Hi I want to start using dwarf-2 instead of ext-coff but it seems to be an impossible task just to generate a file that can be loaded with Studio v4.10 B356.

First of all the code I'm using generated a perfectly fuctional EXTCOFF file which I could load into Studio and step with JTAG-MK2.

Since I used a makefile that has been cut and pasted so many times I thought I'd go back to a 'clean' file that is output by the Mfile v1.41 utility. So I specified all the options from the Mfile menu (including Debug Format = ELF/DWARF-2) but when I open the .elf file from Studio I get the message "Coordinator Error loading object file".

I studied the makefile and saw the line "ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs"
still contains the stabs option. So I changed it to
"ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),--gdwarf2". Still no joy with loading the .elf file in Studio.

Please, what can I do to generate a working DWARF-2 file?

Another Q about make:
----------------------------
Is there a way to cause make to automatically check if any of the #included files in a .c file changed and then recompile the .c file when a make all is done? At the moment this list of dependancies is specifies manually in my makefiles.

PS: I've attached my whole makefile and the output from the make process.

Attachment(s): 

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

johannkok,

Have you picked up the latest patches for AVR Studio 4.10? If not, see my post of 19 Nov 2004 in this thread.

Don

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

Thanks donblake,
my problem was something unexpected - it turns out that Mfile's makefile was correct but I left my old Makefile in the same directory and just named Mfile's makefile "mfile". I then invoked it by the command "make mfile all" and as I eventually figured out this still calls the original Makefile too!
I suppose you all would say RYFM... and I did, but it's just too much information to remember it all at once when your new to the whole GCC toolchain.

regards

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

johannkok wrote:
Thanks donblake,
my problem was something unexpected - it turns out that Mfile's makefile was correct but I left my old Makefile in the same directory and just named Mfile's makefile "mfile". I then invoked it by the command "make mfile all" and as I eventually figured out this still calls the original Makefile too!
I suppose you all would say RYFM... and I did, but it's just too much information to remember it all at once when your new to the whole GCC toolchain.

I can sympathize: it is a whole lot to learn. But you seem to be making good progress!

By default the make program looks for a makefile in the current directory with the name Makefile or makefile.

If you want to have make execute a makefile with a different name you can call it like this:

make -f 

or like this:

make --file=

Where is the filename.

To get a quick list of available options, on the command line do this:

make --help

And there should be a section in the make user manual (comes with WinAVR) that gives a quick description of all the command line options. Luckily, in my practice, I've never really had to use hardly any of the command line options.

HTH
Eric