Subversion Repositories FlightCtrl

Rev

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

Rev 1490 Rev 1491
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.
-
 
104
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
Line 104... Line 105...
104
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
105
OPT = s
105
OPT = s
106
#OPT = 2
106
 
107
 
107
##########################################################################################################
108
##########################################################################################################
Line 135... Line 136...
135
#  -f...:     tuning, see gcc manual and avr-libc documentation
136
#  -f...:     tuning, see gcc manual and avr-libc documentation
136
#  -Wall...:  warning level
137
#  -Wall...:  warning level
137
#  -Wa,...:   tell GCC to pass this to the assembler.
138
#  -Wa,...:   tell GCC to pass this to the assembler.
138
#    -ahlms:  create assembler listing
139
#    -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))
140
CFLAGS = -O$(OPT) -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=$(<:%.c=%.lst) $(patsubst %,-I%,$(EXTRAINCDIRS))
140
# shrink code size
-
 
141
CFLAGS += -fno-inline-functions  -mtiny-stack
-
 
-
 
141
 
Line 142... Line 142...
142
 
142
 
143
# Set a "language standard" compiler flag.
143
# Set a "language standard" compiler flag.
144
#   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.
145
#   gnu99 = C99 + GNU extensions. See GCC manual for more information.
145
#   gnu99 = C99 + GNU extensions. See GCC manual for more information.
146
#CFLAGS += -std=c89
146
#CFLAGS += -std=c89
147
#CFLAGS += -std=gnu89
147
#CFLAGS += -std=gnu89
148
#CFLAGS += -std=c99
148
#CFLAGS += -std=c99
Line -... Line 149...
-
 
149
CFLAGS += -std=gnu99
-
 
150
 
-
 
151
# shrink code size
-
 
152
CFLAGS += -mtiny-stack
-
 
153
#CFLAGS += -fno-inline-functions
149
CFLAGS += -std=gnu99
154
CFLAGS += -mcall-prologues
Line 150... Line 155...
150
 
155
 
151
CFLAGS += -DF_CPU=$(F_CPU) -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH) -DVERSION_SERIAL_MAJOR=$(VERSION_SERIAL_MAJOR) -DVERSION_SERIAL_MINOR=$(VERSION_SERIAL_MINOR) -DNC_SPI_COMPATIBLE=$(NC_SPI_COMPATIBLE)
156
CFLAGS += -DF_CPU=$(F_CPU) -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH) -DVERSION_SERIAL_MAJOR=$(VERSION_SERIAL_MAJOR) -DVERSION_SERIAL_MINOR=$(VERSION_SERIAL_MINOR) -DNC_SPI_COMPATIBLE=$(NC_SPI_COMPATIBLE)