Skip to content

Commit

Permalink
Merge branch 'release/v3.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Sep 23, 2019
2 parents c6a43ff + 30d801c commit 8e156b0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion boards/samd21g18a.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"core": "samd",
"cpu": "cortex-m0plus",
"extra_flags": "-DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__",
"extra_flags": "-DARDUINO_ARCH_SAMD -D__SAMD21G18A__",
"f_cpu": "48000000L",
"hwids": [
[
Expand Down
24 changes: 13 additions & 11 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,18 @@
"-Wl,--warn-section-align"
],

LIBPATH=[
join(FRAMEWORK_DIR, "variants",
board.get("build.variant"), "linker_scripts", "gcc")
],

LIBS=["m"]
)

variants_dir = join(
"$PROJECT_DIR", board.get("build.variants_dir")) if board.get(
"build.variants_dir", "") else join(FRAMEWORK_DIR, "variants")

env.Append(
LIBPATH=[
join(variants_dir, board.get("build.variant"), "linker_scripts", "gcc")
])

if "BOARD" in env:
env.Append(
CCFLAGS=[
Expand Down Expand Up @@ -129,8 +133,7 @@

LIBPATH=[
join(SYSTEM_DIR, "CMSIS", "CMSIS", "Lib", "GCC"),
join(FRAMEWORK_DIR, "variants",
board.get("build.variant"))
join(variants_dir, board.get("build.variant"))
]
)

Expand All @@ -153,7 +156,6 @@

if BUILD_CORE == "adafruit":
env.Append(
CPPDEFINES=["USE_TINYUSB"],
CPPPATH=[
join(FRAMEWORK_DIR, "cores", BUILD_CORE,
"Adafruit_TinyUSB_Core"),
Expand All @@ -171,7 +173,7 @@
],

LIBPATH=[
join(FRAMEWORK_DIR, "variants", board.get("build.variant"))
join(variants_dir, board.get("build.variant"))
],

LINKFLAGS=[
Expand Down Expand Up @@ -208,11 +210,11 @@

if "build.variant" in env.BoardConfig():
env.Append(
CPPPATH=[join(FRAMEWORK_DIR, "variants", board.get("build.variant"))]
CPPPATH=[join(variants_dir, board.get("build.variant"))]
)
libs.append(env.BuildLibrary(
join("$BUILD_DIR", "FrameworkArduinoVariant"),
join(FRAMEWORK_DIR, "variants", board.get("build.variant"))
join(variants_dir, board.get("build.variant"))
))

libs.append(env.BuildLibrary(
Expand Down
9 changes: 6 additions & 3 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,13 @@ def _jlink_cmd_script(env, source):
],
UPLOADCMD="$UPLOADER $UPLOADERFLAGS $SOURCES"
)
if board.get("build.core") == "adafruit":
if board.get("build.core") == "adafruit" and board.get(
"build.mcu").startswith("samd51"):
# special flags for the latest bossac tool
env.Append(
UPLOADERFLAGS=["-U", "--offset",
board.get("upload.offset_address")])
UPLOADERFLAGS=[
"-U", "--offset", board.get("upload.offset_address")])

else:
env.Append(UPLOADERFLAGS=[
"--erase",
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-atmelsam.git"
},
"version": "3.8.0",
"version": "3.8.1",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json",
Expand Down
3 changes: 2 additions & 1 deletion platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def configure_default_packages(self, variables, targets):
self.packages["toolchain-gccarmnoneeabi"][
'version'] = ">=1.40803.0,<1.40805.0"
if (board.get("build.core", "") == "adafruit"
and "tool-bossac" in self.packages):
and "tool-bossac" in self.packages
and board.get("build.mcu", "").startswith("samd51")):
self.packages["tool-bossac"]['version'] = "~1.10900.0"

for name in disabled_pkgs:
Expand Down

0 comments on commit 8e156b0

Please sign in to comment.