Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
65 | 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 | env_target.Append(CCFLAGS = '-std=c99') |
||
13 | |||
14 | # Define environment name. |
||
15 | env_target.Append(NAME = 'env_target') |
||
16 | |||
17 | # Microcontroller type. |
||
18 | env_target.Append(MCU = 'atmega328p') |
||
19 | # Microcontroller frequency in Hertz. |
||
20 | env_target.Append(F_CPU = '16000000UL') |
||
21 | |||
22 | # Set environment for an Atmel AVR ATmega328p microcontroller. |
||
23 | env_target.Append(CCFLAGS = '-mmcu=' + env_target['MCU']) |
||
24 | env_target.Append(LINKFLAGS = '-mmcu=' + env_target['MCU']) |
||
25 | env_target.Append(CPPDEFINES = 'F_CPU=' + env_target['F_CPU']) |
||
26 | |||
27 | # Export environment set for target. |
||
28 | Export('env_target') |