Refactor CORELIBS per platform

This commit is contained in:
Valeriy Koval
2015-03-09 12:22:24 +02:00
parent 13455987ae
commit 5fa0a176a7
14 changed files with 50 additions and 51 deletions
+1 -3
View File
@@ -82,13 +82,11 @@ else:
UPLOADEEPCMD='"$UPLOADER" $UPLOADERFLAGS -U eeprom:w:$SOURCES:i'
)
CORELIBS = env.ProcessGeneral()
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware(["m"] + CORELIBS)
target_elf = env.BuildFirmware()
#
# Target: Extract EEPROM data (from EEMEM directive) to .eep file
+1 -3
View File
@@ -68,13 +68,11 @@ env.Append(
]
)
CORELIBS = env.ProcessGeneral()
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware(["m", "gcc"] + CORELIBS)
target_elf = env.BuildFirmware()
#
# Target: Build the .bin file
+5 -6
View File
@@ -50,16 +50,15 @@ env.Replace(
"-mcpu=${BOARD_OPTIONS['build']['cpu']}"
],
LIBS=["c", "gcc", "m"],
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES'
)
if env.get("BOARD_OPTIONS", {}).get("build", {}).get("cpu", "")[-2:] == "m4":
if env.get("BOARD_OPTIONS", {}).get("build", {}).get(
"cpu", "")[-2:] == "m4" and env.get("BOARD") != "frdm_k20d50m":
env.Append(
ASFLAGS=[
"-mfloat-abi=hard",
"-mfpu=fpv4-sp-d16"
],
CCFLAGS=[
CPPFLAGS=[
"-mfloat-abi=hard",
"-mfpu=fpv4-sp-d16",
"-fsingle-precision-constant"
+2
View File
@@ -47,6 +47,8 @@ env.Replace(
"-Wl,--gc-sections"
],
LIBS=["m"],
SIZEPRINTCMD='"$SIZETOOL" --mcu=$BOARD_MCU -C -d $SOURCES'
)
@@ -8,7 +8,7 @@
from os import listdir, walk
from os.path import isfile, join
from SCons.Script import DefaultEnvironment, Return
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
@@ -178,4 +178,4 @@ if env.subst("${PLATFORMFW_DIR}")[-3:] == "sam":
join("$PLATFORMFW_DIR", "system", "libsam", "source")
))
Return("libs")
env.Append(LIBS=libs)
@@ -7,7 +7,7 @@
from os.path import join
from SCons.Script import DefaultEnvironment, Return
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
@@ -39,4 +39,4 @@ libs.append(envsafe.BuildLibrary(
join("$PLATFORMFW_DIR", "variants", "${BOARD_OPTIONS['build']['variant']}")
))
Return("libs")
env.Append(LIBS=libs)
@@ -7,7 +7,7 @@
from os.path import join
from SCons.Script import DefaultEnvironment, Return
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
@@ -52,4 +52,4 @@ libs.append(env.BuildLibrary(
join("$PLATFORMFW_DIR", "cores", "${BOARD_OPTIONS['build']['core']}")
))
Return("libs")
env.Append(LIBS=libs)
@@ -9,7 +9,7 @@ import re
from os import listdir, sep, walk
from os.path import isfile, join, normpath
from SCons.Script import DefaultEnvironment, Return
from SCons.Script import DefaultEnvironment
from platformio.util import exec_command
@@ -168,4 +168,4 @@ libs.append(env.Library(
get_source_files(root_dir)
))
Return("libs")
env.Append(LIBS=libs)
+2 -2
View File
@@ -7,7 +7,7 @@
from os.path import join
from SCons.Script import DefaultEnvironment, Return
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
@@ -61,4 +61,4 @@ libs.append(envsafe.BuildLibrary(
ignore_files
))
Return("libs")
env.Append(LIBS=libs)
+1 -3
View File
@@ -53,13 +53,11 @@ else:
UPLOADHEXCMD='"$UPLOADER" $UPLOADERFLAGS'
)
CORELIBS = env.ProcessGeneral()
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware(["m"] + CORELIBS)
target_elf = env.BuildFirmware()
#
# Target: Build the firmware file
+3 -3
View File
@@ -48,6 +48,8 @@ env.Replace(
"-Wl,-gc-sections,-u,main"
],
LIBS=["m"],
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES',
UPLOADER=join("$PIOPACKAGES_DIR", "tool-mspdebug", "mspdebug"),
@@ -74,13 +76,11 @@ env.Append(
)
)
CORELIBS = env.ProcessGeneral()
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware(["m"] + CORELIBS)
target_elf = env.BuildFirmware()
#
# Target: Build the .hex
+1 -3
View File
@@ -27,13 +27,11 @@ env.Append(
]
)
CORELIBS = env.ProcessGeneral()
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware(["c", "gcc", "m"] + CORELIBS)
target_elf = env.BuildFirmware()
#
# Target: Build the .bin file