forked from platformio/platformio-core
Initial support for RFduino.
This commit is contained in:
1 parent
91345c0bdd
commit
ace9ae0b24
3 files changed
+50
-1
No files matched your search
@@ -49,6 +49,21 @@ elif env.get("PLATFORM") == "espressif":
|
||||
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
|
||||
"net80211", "wps", "crypto", "phy", "hal", "gcc", "m"]
|
||||
)
|
||||
elif env.get("PLATFORM") == "nordicnrf51":
|
||||
PLATFORMFW_DIR = join(
|
||||
"$PIOPACKAGES_DIR",
|
||||
"framework-arduinonordicnrf51"
|
||||
)
|
||||
env.Prepend(
|
||||
CPPPATH=[
|
||||
join("$PLATFORMFW_DIR", "system", "CMSIS", "CMSIS", "Include"),
|
||||
join("$PLATFORMFW_DIR", "system", "RFduino"),
|
||||
join("$PLATFORMFW_DIR", "system", "RFduino", "include")
|
||||
],
|
||||
LIBPATH=[join("$PLATFORMFW_DIR", "variants", "${BOARD_OPTIONS['build']['variant']}")],
|
||||
LIBS=["RFduino", "RFduinoBLE", "RFduinoGZLL", "RFduinoSystem"]
|
||||
)
|
||||
|
||||
|
||||
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)
|
||||
|
||||
|
||||
@@ -14,6 +14,17 @@ env = DefaultEnvironment()
|
||||
|
||||
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
|
||||
|
||||
if env.subst("$BOARD") == "rfduino":
|
||||
env.Append(
|
||||
CPPFLAGS=["-fno-builtin"],
|
||||
LINKFLAGS=["--specs=nano.specs"]
|
||||
),
|
||||
env.Replace(
|
||||
UPLOADER=join("$PIOPACKAGES_DIR", "tool-rfdloader", "rfdloader"),
|
||||
UPLOADERFLAGS=["-q", "$UPLOAD_PORT", "$SOURCES"],
|
||||
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
|
||||
)
|
||||
|
||||
#
|
||||
# Target: Build executable and linkable firmware
|
||||
#
|
||||
@@ -40,7 +51,10 @@ AlwaysBuild(target_size)
|
||||
# Target: Upload by default .bin file
|
||||
#
|
||||
|
||||
upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk)
|
||||
if "mbed" in env.subst("$FRAMEWORK"):
|
||||
upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk)
|
||||
else:
|
||||
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
|
||||
AlwaysBuild(upload)
|
||||
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user