Код
Build started 16.2.2011 at 08:50:49
======== Beginning of project event_flag processing
avr-gcc.exe (WinAVR 20100110) 4.3.3
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.
==== Link to event_flag.elf
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr51/crtm128.o: In function `__vector_default':
(.vectors+0x80): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_32' defined in .text.__vector_32 section in obj/Signal_UART.o
make: *** [exe/event_flag.elf] Error 1
Build failed with 1 errors and 0 warnings...
#
# scmRTOS avr-gcc port
#
# project-dependent makefile for samples
#
# can change WinAVR version by setting AVRGCC variable here (override environment)
AVRGCC :=C:/WinAVR-20100110
#AVRGCC :=c:/kgp-avr/20071102
#AVRGCC :=c:/kgp-avr/20070928
#AVRGCC :=c:/WinAVR-20071221
#AVRGCC :=c:/WinAVR-20070525
#AVRGCC :=c:/WinAVR-20060421
#AVRGCC :=d:/mingw/local
# Y/N - !!! N for gcc < 4.x
MAKE_SMALLEST_HEX = Y
# point to start of project sources subtree,
PROJ_SRCTOP := .
#put the name of the target file here (without extension)
TRG = event_flag
# project modules (directories with source files)
# "current" directory (.) included automatically in gcc-avr.make
MODULES := ./src ../scmRTOS/Common ../scmRTOS/AVR
# needed for includes below
COMMON_MAKEFILES := ./makefiles
###########
# used in gcc-avr.make and avreal.make
MCU := atmega128
#MCU := atmega48
TRGPGMEXT := hex
#eep
# used in avreal.make and transferred to source files as '#define'
F_CPU=14745600
# additional options for avreal (like -n)
# put -l2 here for lock chip after programming by 'make run'
#AVREAL_OPT= -n
FUSES = bodlevel=5,cksel=2,ckdiv8=off,sut=0
# additional libraries and object files to link
LIB =
# assembler flags
ASFLAGS =
#OPT = -Os -mcall-prologues
OPT = -Os
# compiler flags
CSTD = # -std=c++98 --pedantic
CWARN = -Wextra -Wall #-Wstrict-prototypes -Wno-main
CFLAGS = -g $(OPT) $(CSTD) $(CWARN) \
-DF_CPU=$(F_CPU)UL \
-fno-exceptions -fno-rtti \
-funsigned-bitfields -fshort-enums
# -fpack-struct не йде для scmRTOS для avr-gcc 3.4.6
# OS_Kernel.h:167: error: cannot bind packed field `((OS::TKernel*)this)->OS::TKernel::ReadyProcessMap' to `OS::TProcessMap&'
# linker flags
#---------------- Library Options ----------------
LDFLAGS += -Wl
LDFLAGS += -lmifeq "$(MAKE_SMALLEST_HEX)" "Y"
CFLAGS += -ffunction-sections -fdata-sections
LDFLAGS += -Wl,--gc-sections
LDFLAGS += -Wl,--relax
endif
########### you should not need to change the following lines #############
# keep order!
# avreal.make must be included after gcc-avr because of TRGPGM definition
include $(COMMON_MAKEFILES)/gcc-avr.mak
include $(COMMON_MAKEFILES)/avreal.mak
## end
Пользуясь случаем, заодно спрошу, как поправить Makefile, что бы файл elf сохранялся по указанному пути, либо делалась его копия по указанному пути?