Subversion Repositories idreammicro-avr

Rev

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

# Create and initialize the environment.
env_avr = Environment()

# Set environment for AVR-GCC.
env_avr['CC'] = 'avr-gcc'
env_avr['CPPPATH'] = '/usr/lib/avr/include'
env_avr['OBJCOPY'] = 'avr-objcopy'
env_avr['SIZE'] = 'avr-size'
env_avr['AR'] = 'avr-ar'
env_avr['RANLIB'] = 'avr-ranlib'

# Set language standard.
env_avr.Append(CCFLAGS = '-std=c99')

# Set optimization level and call prologues/epilogues.
env_avr.Append(CCFLAGS = '-Os -mcall-prologues')

# Use short types.
env_avr.Append(CCFLAGS = '-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums')

# Don't include unused function and data.
env_avr.Append(CCFLAGS = '-ffunction-sections -fdata-sections')
env_avr.Append(LINKFLAGS = '-Wl,--gc-sections')

# Enable linker relaxation.
env_avr.Append(LINKFLAGS = '-Wl,--relax')

# Export environment set for AVR-GCC.
Export('env_avr')