hi, i am new to this AVR core. I am using gcc-avr for building source file and AvrStudio4 for simulation. when i do built using make_all , i am getting a efl format file but by using make extcoff , i got error messiage like this
"make.exe" extcoff
make.exe: *** No rule to make target `extcoff'. Stop.
Process Exit Code: 2
what should i do in make file (MFile) to get this file format. the AvrStudio4 accept extcoff format only. if i use the efl format for simulation,i get error, that means "can not open onject file" . any of you can direct me in the correct dircetion. thank you
modify the example makefile so that it will contain your C & assembler files and leave the rest of it as it is. Here is a full makefile in case you don't have it:
Rgrds, Madis
# =================================================================== # On command line: # # make all = Make software. # # make clean = Clean out built project files. # # make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB). # # make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio # 4.07 or greater). # # make program = Download the hex file to the device, using avrdude. Please # customize the avrdude settings below first! # # make filename.s = Just compile filename.c into the assembler code only # # To rebuild project do "make clean" then "make all". # ===================================================================
# MCU name MCU = atmega64
# Output format. (can be srec, ihex, binary) FORMAT = ihex
# Target file name (without extension). TARGET = HomeRanger
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization. # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) OPT = 1
# List C source files here. (C dependencies are automatically generated.) SRC = $(TARGET).c
# If there is more than one source file, append them above, or modify and # uncomment the following: #SRC += foo.c bar.c
# You can also wrap lines by appending a backslash to the end of the line: #SRC += baz.c \ #xyzzy.c
# List Assembler source files here. # Make them always end in a capital .S. Files ending in a lowercase .s # will not be considered source files but generated files (assembler # output from the compiler), and will be deleted upon "make clean"! # Even though the DOS/Win* filesystem matches both .s and .S the same, # it will preserve the spelling of the filenames, and gcc itself does # care about how the name is spelled on its command-line. ASRC =
# List any extra directories to look for include files here. # Each directory must be seperated by a space. EXTRAINCDIRS =
# Optional compiler flags. # -g: generate debugging information (for GDB, or for COFF conversion) # -O*: optimization level # -f...: tuning, see gcc manual and avr-libc documentation # -Wall...: warning level # -Wa,...: tell GCC to pass this to the assembler. # -ahlms: create assembler listing CFLAGS = -g -O$(OPT) \
-funsigned-char -fshort-enums \
-Wall -Wstrict-prototypes \
-Wa,-adhlns=$( $@
# Create a symbol table from ELF output file. %.sym: %.elf @echo @echo $(MSG_SYMBOL_TABLE) $@ avr-nm -n $< > $@
# Automatically generate C source code dependencies. # (Code originally taken from the GNU make user manual and modified # (See README.txt Credits).) # # Note that this will work with sh (bash) and sed that is shipped with WinAVR # (see the SHELL variable defined above). # This may not work with other shells or other seds. # %.d: %.c set -e; $(CC) -MM $(ALL_CFLAGS) $< \ | sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \ [ -s $@ ] || rm -f $@
# Remove the '-' if you want to see the dependency files generated.
-include $(SRC:.c=.d)
# Listing of phony targets. .PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \ clean clean_list program
tamilmaran s wrote: : hi, : i am new to this AVR core. I am using gcc-avr for building source : file and AvrStudio4 for simulation. when i do built using make_all , i
The problem is not that you are new to AVR but that you are unfamiliar with command line tools like GCC.
:> "make.exe" extcoff : make.exe: *** No rule to make target `extcoff'. Stop.
Then there is no instructions on how to make target 'extcoff' in the 'makefile' in your project directory. Simple as that. Think of 'makefile' as a TODO list for the 'make.exe' program.
: what should i do in make file (MFile) to get this file format. the
It is not called 'MFile.' It is called 'makefile.'
There is a sample 'makefile' in the '...\WinAVR\sample' directory.
There is also a TCL graphical script tool called 'MFile' that asks you questions and generates an apropriate 'makefile' for you. This tool will modify the 'makefile_template' file in the '...\WinAVR\mfile' directory and place its modified version of 'makefile' in your project catalog.
--
******************************************************
Never ever underestimate the power of human stupidity.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.