Subversion Repositories idreammicro-avr

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12 jlesech 1
# Create and initialize the environment.
2
env_target = Environment()
3
 
4
# Set environment for AVR-GCC.
5
env_target['CC'] = 'avr-gcc'
6
env_target['CPPPATH'] = '/usr/lib/avr/include'
7
env_target['OBJCOPY'] = 'avr-objcopy'
8
env_target['SIZE'] = 'avr-size'
9
env_target['AR'] = 'avr-ar'
10
env_target['RANLIB'] = 'avr-ranlib'
11
env_target.Append(CCFLAGS = '-Os')
12
 
13
# Define environment name.
14
env_target.Append(NAME = 'env_target')
15
 
16
# Microcontroller type.
17
env_target.Append(MCU = 'atmega328p')
18
# Microcontroller frequency in Hertz.
19
env_target.Append(F_CPU = '16000000UL')
20
 
21
# Set environment for an Atmel AVR ATmega328p microcontroller.
22
env_target.Append(CCFLAGS = '-mmcu=' + env_target['MCU'])
23
env_target.Append(LINKFLAGS = '-mmcu=' + env_target['MCU'])
24
env_target.Append(CPPDEFINES = 'F_CPU=' + env_target['F_CPU'])
25
 
26
# Export environment set for target.
27
Export('env_target')