summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAtle H. Havsø <atle@havso.net>2014-06-28 18:40:37 +0200
committerAtle H. Havsø <atle@havso.net>2014-06-28 18:40:37 +0200
commite5d4b9bb19623c9e643faaaa26e064c891b22afe (patch)
tree69ef690b1482bc8bf3ac1758f651173e6a7010a4 /SConstruct
parentc91fecf862df22568b55093ffa1fac9edd254142 (diff)
Initial commit with working USB sending of data to host computer.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct11
1 files changed, 9 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index d67ac16..73bc8f7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2,14 +2,21 @@ import os
env = Environment(
ENV = os.environ,
+ tools = ['gnulink', 'gcc', 'g++', 'gas', 'ar']
)
SConscript('laks/build_rules')
-env.SelectMCU('stm32f405rg')
+env.SelectMCU('stm32f303cc')
env.Append(
CPPPATH = ['drivers'],
)
-env.Firmware('suzumebachi.elf', Glob('*.cpp') + Glob('drivers/*.cpp'))
+#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') \ No newline at end of file