Subversion Repositories idreammicro-avr

Rev

Rev 6 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 jlesech 1
# Import environment set for target.
2
Import('env_target', 'env_name', 'DEVICE')
3
 
4
# Set target name.
5
TARGET = 'digital_io__demo'
6
 
7
# Set source file.
8
sources = [
9
    'digital_io__demo.c'
10
]
11
 
12
# Build program.
13
env_target.Program(target = TARGET + '.elf', source = sources)
14
 
15
# Create hex binary file.
16
env_target.Command(
17
    TARGET + '.hex',
18
    TARGET + '.elf',
19
    env_target['OBJCOPY'] + ' -O ihex $SOURCE $TARGET'
20
)
21
 
22
# Compute memory usage.
23
env_target.Command(
24
    None,
25
    TARGET + '.elf',
26
    env_target['SIZE'] + ' -C --mcu=' + DEVICE + ' $SOURCE'
27
)
28