Subversion Repositories FlightCtrl

Rev

Rev 1486 | Rev 1491 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1486 Rev 1490
Line 100... Line 100...
100
endif
100
endif
Line 101... Line 101...
101
 
101
 
102
 
102
 
103
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
103
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
Line 104... Line 104...
104
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
104
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
105
OPT = 2
105
OPT = s
106
 
106
 
107
##########################################################################################################
107
##########################################################################################################
Line 135... Line 135...
135
#  -f...:     tuning, see gcc manual and avr-libc documentation
135
#  -f...:     tuning, see gcc manual and avr-libc documentation
136
#  -Wall...:  warning level
136
#  -Wall...:  warning level
137
#  -Wa,...:   tell GCC to pass this to the assembler.
137
#  -Wa,...:   tell GCC to pass this to the assembler.
138
#    -ahlms:  create assembler listing
138
#    -ahlms:  create assembler listing
139
CFLAGS = -O$(OPT) -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=$(<:%.c=%.lst) $(patsubst %,-I%,$(EXTRAINCDIRS))
139
CFLAGS = -O$(OPT) -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=$(<:%.c=%.lst) $(patsubst %,-I%,$(EXTRAINCDIRS))
140
 
-
 
-
 
140
# shrink code size
-
 
141
CFLAGS += -fno-inline-functions  -mtiny-stack
Line 141... Line 142...
141
 
142
 
142
# Set a "language standard" compiler flag.
143
# Set a "language standard" compiler flag.
143
#   Unremark just one line below to set the language standard to use.
144
#   Unremark just one line below to set the language standard to use.
144
#   gnu99 = C99 + GNU extensions. See GCC manual for more information.
145
#   gnu99 = C99 + GNU extensions. See GCC manual for more information.
Line 247... Line 248...
247
REMOVE = rm -f
248
REMOVE = rm -f
248
COPY = cp
249
COPY = cp
Line 249... Line 250...
249
 
250
 
250
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
251
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-
 
252
ELFSIZE = $(SIZE) -A $(TARGET).elf
-
 
253
LIMITS = $(SIZE) --mcu=atmega644 -C $(TARGET).elf
Line 251... Line 254...
251
ELFSIZE = $(SIZE) -A $(TARGET).elf
254
 
252
 
255
 
253
# Define Messages
256
# Define Messages
254
# English
257
# English
Line 300... Line 303...
300
	@echo $(MSG_END)
303
	@echo $(MSG_END)
301
	@echo
304
	@echo
Line 302... Line 305...
302
 
305
 
303
 
-
 
304
# Display size of file.
306
 
305
	# Display size of file.
307
# Display size of file.
306
sizebefore:
308
sizebefore:
307
	@if [ -f $(TARGET).elf ]; then echo Size before:; $(ELFSIZE); $(HEXSIZE); echo; fi
309
	@if [ -f $(TARGET).elf ]; then echo Size before:; $(ELFSIZE); $(HEXSIZE); $(LIMITS); echo; fi
Line 308... Line 310...
308
sizeafter:
310
sizeafter:
309
	@if [ -f $(TARGET).elf ]; then echo Size after:; $(ELFSIZE); $(HEXSIZE); echo; fi
311
	@if [ -f $(TARGET).elf ]; then echo Size after:; $(ELFSIZE); $(HEXSIZE); $(LIMITS); echo; fi
310
 
312