summaryrefslogtreecommitdiff
path: root/SConstruct
blob: 73bc8f799e73d0f644dac2e2315b68701c127d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os

env = Environment(
	ENV = os.environ,
	tools = ['gnulink', 'gcc', 'g++', 'gas', 'ar']
)

SConscript('laks/build_rules')

env.SelectMCU('stm32f303cc')

env.Append(
	CPPPATH = ['drivers'],
)

#env.Firmware('suzumebachi.elf', Glob('*.cpp') + Glob('drivers/*.cpp'))
env.Firmware('suzumebachi.elf', Glob('*.cpp'))

env.Command('suzumebachi.bin', 'suzumebachi.elf', '${TOOLCHAIN}objcopy -O binary $SOURCE $TARGET')
env.Command('flash', ['suzumebachi.bin'], 'dfu-util.exe -d 0483:df11 -c 1 -a 0 -s 0x08000000 -D suzumebachi.bin')

Default('suzumebachi.bin')