[En-Nut-Discussion] Newbie - Debugging - makefile removes(rm) *.elf file

Dusan Ferbas dferbas at dfsoft.cz
Thu Jul 15 23:24:38 CEST 2004


Hi,

I am using following to produce .cof file. It was used just for a small 
piece of code. I never tested it with full Nut/OS.

Also avr-gcc options can be obtained by invoking it with '--help -v' options.

-------------------
CFLAGS = -g -Os \
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \
-Wall -Wstrict-prototypes \
-Wa,-adhlns=$(<:.c=.lst) \
-std=gnu99

LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--defsym,__stack=0x10FF


OBJCOPY = avr-objcopy
ELFCOF  = $(OBJCOPY) --debugging \
         --change-section-address .text-0x0 \
         --change-section-address .data-0x800000 \
         --change-section-address .bss-0x800000 \
         --change-section-address .noinit-0x800000 \
         --change-section-address .eeprom-0x810000

%cof: %elf
         $(ELFCOF) -O coff-ext-avr $< $@


>From: "Anton Veldhuizen" <antonv at hotmail.com>
>Subject: [En-Nut-Discussion] Newbie - Debugging - makefile removes(rm)
>         *.elf   file
>Hi all,
>
>...
>
>Furthermore, does someone have an example
>makefile, makedefs and makerules that builds a coff file for debugging via
>AVR Studio?

Dusan 




More information about the En-Nut-Discussion mailing list