summaryrefslogtreecommitdiff
path: root/build_rules
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-12-31 13:55:56 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-12-31 14:06:20 +0100
commit8419b87c6bd7be468239d0f68155631dfb5db103 (patch)
treee7159ec683e8b0a391f06b59a4b9a1770234b97f /build_rules
parentdeab534c051210678014966f60acf904ba36f81d (diff)
Fixed FPU support.
Selecting proper FPU flags in build_rules and enabling FPU during startup.
Diffstat (limited to 'build_rules')
-rw-r--r--build_rules22
1 files changed, 12 insertions, 10 deletions
diff --git a/build_rules b/build_rules
index 385fde1..a6d8899 100644
--- a/build_rules
+++ b/build_rules
@@ -14,17 +14,17 @@ def select_arm(env, family):
has_mcu = False
env.Replace(
- CC = '${TOOLCHAIN}gcc',
- CXX = '${TOOLCHAIN}g++',
- AS = '${TOOLCHAIN}gcc',
- LINK = '${TOOLCHAIN}gcc',
- AR = '${TOOLCHAIN}ar',
+ CC = '${TOOLCHAIN}gcc',
+ CXX = '${TOOLCHAIN}g++',
+ AS = '${TOOLCHAIN}gcc',
+ LINK = '${TOOLCHAIN}gcc',
+ AR = '${TOOLCHAIN}ar',
RANLIB = '${TOOLCHAIN}ranlib',
- CCFLAGS = '-O2 -Wall -ggdb -mcpu=${CPU_FAMILY} -mthumb -ffunction-sections',
- CXXFLAGS = '-std=c++11 -fno-exceptions -fno-rtti -Wno-pmf-conversions',
- ASFLAGS = '-c -x assembler-with-cpp -mcpu=${CPU_FAMILY} -mthumb',
- LINKFLAGS = '-Wall -mcpu=${CPU_FAMILY} -mthumb -mhard-float -nostartfiles -Wl,-T${LINK_SCRIPT} -Wl,--gc-sections',
+ CCFLAGS = Split('-O2 -Wall -ggdb -mcpu=${CPU_FAMILY} -mthumb -ffunction-sections'),
+ CXXFLAGS = Split('-std=c++11 -fno-exceptions -fno-rtti -Wno-pmf-conversions'),
+ ASFLAGS = Split('-c -x assembler-with-cpp -mcpu=${CPU_FAMILY} -mthumb'),
+ LINKFLAGS = Split('-Wall -mcpu=${CPU_FAMILY} -mthumb -nostartfiles -Wl,-T${LINK_SCRIPT} -Wl,--gc-sections'),
CPPPATH = [laks_dir],
LIBPATH = [ld_dir],
@@ -35,7 +35,9 @@ def select_arm(env, family):
)
if has_mcu:
- env.Append(CCFLAGS = ' -mhard-float')
+ env.Append(CCFLAGS = Split('-mfloat-abi=hard -mfpu=fpv4-sp-d16'))
+ env.Append(LINKFLAGS = Split('-mfloat-abi=hard -mfpu=fpv4-sp-d16'))
+ env.Append(CPPDEFINES = ['HAS_FPU'])
def select_stm32(env, variant):
family = variant[5:9]