Subversion Repositories idreammicro-avr

Rev

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

Rev Author Line No. Line
3 jlesech 1
# Import environment set for target.
6 jlesech 2
Import('env_target')
3 jlesech 3
 
4
# Set target name.
5
TARGET = 'input_to_output'
6
 
7
# Set libraries to use.
8
libraries = [
9
    'digital_io'
10
]
11
 
12
# Build libraries.
13
for library in libraries:
14
    SConscript(
15
        '#libraries/' + library + '/SConscript',
6 jlesech 16
        exports = { 'env_target' : env_target },
3 jlesech 17
        duplicate = 0
18
    )
19
 
20
# Set source file.
21
sources = 'input_to_output.c'
22
 
23
# Build program.
24
env_target.Program(target = TARGET + '.elf', source = sources)
25
 
26
# Create hex binary file.
27
env_target.Command(
28
    TARGET + '.hex',
29
    TARGET + '.elf',
30
    env_target['OBJCOPY'] + ' -O ihex $SOURCE $TARGET'
31
)
32
 
33
# Compute memory usage.
34
env_target.Command(
35
    None,
36
    TARGET + '.elf',
6 jlesech 37
    env_target['SIZE'] + ' -C --mcu=' + env_target['MCU'] + ' $SOURCE'
3 jlesech 38
)
39