From 09e89c867c8dc14adee298176a0a4c72d8f32245 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Tue, 7 Aug 2012 16:54:36 +0200 Subject: Split out reusable parts into the laks project. --- SConstruct | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'SConstruct') 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')) -- cgit v1.2.3