summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-08-07 16:54:36 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-08-07 16:54:36 +0200
commit09e89c867c8dc14adee298176a0a4c72d8f32245 (patch)
tree8d125de0b4a1c9d608ddae6ff927fc3624663bd0 /SConstruct
parent2fc77d271db27ecb140191c2dfafdba835962ffb (diff)
Split out reusable parts into the laks project.
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'))