Subversion Repositories idreammicro-avr

Rev

Rev 27 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 jlesech 1
# Create and initialize the environment.
2
env_avr = Environment()
3
 
4
# Set environment for AVR-GCC.
5
env_avr['CC'] = 'avr-gcc'
6
env_avr['CPPPATH'] = '/usr/lib/avr/include'
7
env_avr['OBJCOPY'] = 'avr-objcopy'
8
env_avr['SIZE'] = 'avr-size'
9
env_avr['AR'] = 'avr-ar'
10
env_avr['RANLIB'] = 'avr-ranlib'
11
 
27 jlesech 12
# Set language standard. 
13
env_avr.Append(CCFLAGS = '-std=c99')
14
 
40 jlesech 15
# Set optimization level and call prologues/epilogues.
16
env_avr.Append(CCFLAGS = '-Os -mcall-prologues')
27 jlesech 17
 
40 jlesech 18
# Use short types.
19
env_avr.Append(CCFLAGS = '-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums')
20
 
21
# Don't include unused function and data.
22
env_avr.Append(CCFLAGS = '-ffunction-sections -fdata-sections')
23
env_avr.Append(LINKFLAGS = '-Wl,--gc-sections')
24
 
25
# Enable linker relaxation.
26
env_avr.Append(LINKFLAGS = '-Wl,--relax')
27
 
2 jlesech 28
# Export environment set for AVR-GCC.
29
Export('env_avr')