forked from platformio/platformio-core
Initial support for RFduino.
This commit is contained in:
@ -142,5 +142,25 @@
|
|||||||
},
|
},
|
||||||
"url": "https://developer.mbed.org/platforms/Delta-DFCM-NNN40/",
|
"url": "https://developer.mbed.org/platforms/Delta-DFCM-NNN40/",
|
||||||
"vendor": "Delta"
|
"vendor": "Delta"
|
||||||
|
},
|
||||||
|
"rfduino": {
|
||||||
|
"build": {
|
||||||
|
"core": "arduino",
|
||||||
|
"extra_flags": "-D__RFduino__",
|
||||||
|
"f_cpu": "16000000L",
|
||||||
|
"ldscript": "rfduino.ld",
|
||||||
|
"cpu": "cortex-m0",
|
||||||
|
"mcu": "nrf51822",
|
||||||
|
"variant": "rfduino"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino"],
|
||||||
|
"name": "RFduino",
|
||||||
|
"platform": "nordicnrf51",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 8192,
|
||||||
|
"maximum_size": 131072
|
||||||
|
},
|
||||||
|
"url": "http://www.rfduino.com/product/rfd22102-rfduino-dip/index.html",
|
||||||
|
"vendor": "RFduino"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,21 @@ elif env.get("PLATFORM") == "espressif":
|
|||||||
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
|
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
|
||||||
"net80211", "wps", "crypto", "phy", "hal", "gcc", "m"]
|
"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)
|
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)
|
||||||
|
|
||||||
|
@ -14,6 +14,17 @@ env = DefaultEnvironment()
|
|||||||
|
|
||||||
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
|
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
|
# Target: Build executable and linkable firmware
|
||||||
#
|
#
|
||||||
@ -40,7 +51,10 @@ AlwaysBuild(target_size)
|
|||||||
# Target: Upload by default .bin file
|
# 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)
|
AlwaysBuild(upload)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user