summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct31
1 files changed, 6 insertions, 25 deletions
diff --git a/SConstruct b/SConstruct
index 9c906e0..d67ac16 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2,33 +2,14 @@ import os
env = Environment(
ENV = os.environ,
-
- CC = 'arm-none-eabi-gcc',
- CXX = 'arm-none-eabi-g++',
- AS = 'arm-none-eabi-gcc',
- CCFLAGS = '-O2 -Wall -ggdb -mcpu=cortex-m4 -mthumb -mhard-float -ffunction-sections -Wno-pmf-conversions',
- CXXFLAGS = '-fno-exceptions -fno-rtti',
- ASFLAGS = '-c -x assembler-with-cpp -mcpu=cortex-m4 -mthumb -mhard-float',
-
- CPPDEFINES = ['STM32F4'],
-
- LINK = 'arm-none-eabi-gcc',
- LINKFLAGS = '-Wall -mcpu=cortex-m4 -mthumb -mhard-float -nostartfiles -Wl,-Tsuzumebachi.ld', # -Wl,--gc-sections
-
- AR = 'arm-none-eabi-ar',
- RANLIB = 'arm-none-eabi-ranlib',
-
- CPPPATH = ['os', 'hal', 'drivers'],
- #LIBPATH = [],
-
- LIBS = ['m'],
)
-sources = Glob('os/*.cpp') + Glob('hal/*.cpp') + Glob('drivers/*.cpp') + Glob('*.cpp')
+SConscript('laks/build_rules')
-firmware = env.Program('suzumebachi.elf', sources)
-env.Depends(firmware, 'suzumebachi.ld')
+env.SelectMCU('stm32f405rg')
-env.Command('prog', ['suzumebachi.elf'], 'openocd -f openocd.cfg -c flash_chip')
+env.Append(
+ CPPPATH = ['drivers'],
+)
-Default('suzumebachi.elf')
+env.Firmware('suzumebachi.elf', Glob('*.cpp') + Glob('drivers/*.cpp'))