strange problem with WINAVR20080402

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

Hi,

I just tried to recompile one of my old code for mega2561, and I got this error:

> "make.exe" all

-------- begin --------
avr-gcc (WinAVR 20080402) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Linking: bin_file_bootloader_V2.elf
avr-gcc -mmcu=atmega2561 -I. -gdwarf-2 -DF_CPU=16000000UL -O1 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=bin_file_bootloader_V2.o -ID:/Study/PhD_Study/AVR_C_codes/Dev_lib/ -std=gnu99 -Wundef -MMD -MP -MF .dep/bin_file_bootloader_V2.elf.d bin_file_bootloader_V2.o --output bin_file_bootloader_V2.elf -Wl,-Map=bin_file_bootloader_V2.map,--section-start=.text=0x3E000,--cref     -lm
d:/tools/winavr-20080402/bin/../lib/gcc/avr/4.3.0/../../../../avr/bin/ld.exe: crtm2561.o: No such file: No such file or directory
make.exe: *** [bin_file_bootloader_V2.elf] Error 1

> Process Exit Code: 2
> Time Taken: 00:00

and the strange thing is if I sent the makefile MCU to mega1281, then the compiler pass without any problem.

Here is part of my makefile:

Quote:

# Hey Emacs, this is a -*- makefile -*-
#----------------------------------------------------------------------------
# WinAVR Makefile Template written by Eric B. Weddington, J鰎g Wunsch, et al.
#
# Released to the Public Domain
#
# Additional material for this makefile was written by:
# Peter Fleury
# Tim Henigan
# Colin O'Flynn
# Reiner Patommel
# Markus Pfaff
# Sander Pool
# Frederik Rouleau
# Carlos Lamas
#
#----------------------------------------------------------------------------
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF.
#
# make extcoff = Convert ELF to AVR Extended COFF.
#
# make program = Download the hex file to the device, using avrdude.
# Please customize the avrdude settings below first!
#
# make debug = Start either simulavr or avarice as specified for debugging,
# with avr-gdb or avr-insight as the front end for debugging.
#
# make filename.s = Just compile filename.c into the assembler code only.
#
# make filename.i = Create a preprocessed source file for use in submitting
# bug reports to the GCC project.
#
# To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------

# MCU name
MCU = atmega2561

# The compiled bootloader code will be downloaded to one of the following bootloader flash locations
# if ((MCU == atmega128) || (MCU == atmega1281)
# {
# bootloader_start = 0x1E000;
# }
# else
# {
# bootloader_start = 0x3E000;
# }

#ifneq ($(or $(findstring atmega128,$(MCU))[, $(findstring atmega1281,$(MCU))]),'')
# LDSECTION = --section-start=.text=0x1E000
#else
# LDSECTION = --section-start=.text=0x3E000
#endif

ifeq ($(MCU),atmega128)
LDSECTION = --section-start=.text=0x1E000
else
ifeq ($(MCU),atmega1281)
LDSECTION = --section-start=.text=0x1E000
else
LDSECTION = --section-start=.text=0x3E000
endif
endif

# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
# Typical values are:
# F_CPU = 1000000
# F_CPU = 1843200
# F_CPU = 2000000
# F_CPU = 3686400
# F_CPU = 4000000
# F_CPU = 7372800
# F_CPU = 8000000
# F_CPU = 11059200
# F_CPU = 14745600
# F_CPU = 16000000
# F_CPU = 18432000
# F_CPU = 20000000
F_CPU = 16000000

# Output format. (can be srec, ihex, binary)
FORMAT = ihex

# Target file name (without extension).
TARGET = bin_file_bootloader_V2

# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
OBJDIR = .

# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c

# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =

# 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 =

# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = 1

# include the rest of makefile from the following directory
include $(WIRELESS_DIR)/make_file/makefile.mk

Why???

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

ok, i got it, after installed WINAVR20080411, it works, now.