diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |