Skip to content

Commit

Permalink
Merge branch 'hotfix/v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Dec 2, 2016
2 parents 751a172 + 68b8410 commit e21aa06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
)
)

build_mcu = env.BoardConfig().get("build.mcu", "")
upload_protocol = env.BoardConfig().get("upload.protocol", "")
build_mcu = env.get("BOARD_MCU", env.BoardConfig().get("build.mcu", ""))
upload_protocol = env.get("UPLOAD_PROTOCOL",
env.BoardConfig().get("upload.protocol", ""))
user_code_section = env.BoardConfig().get("upload.section_start", "")

if user_code_section:
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-atmelsam.git"
},
"version": "1.2.0",
"version": "1.2.1",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",
Expand Down
10 changes: 6 additions & 4 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ class AtmelsamPlatform(PlatformBase):

def configure_default_packages(self, variables, targets):
if variables.get("board"):
upload_protocol = self.board_config(variables.get("board")).get(
"upload.protocol", "")
upload_protocol = variables.get(
"upload_protocol",
self.board_config(variables.get("board")).get(
"upload.protocol", ""))
upload_tool = None
if upload_protocol == "openocd":
upload_tool = "tool-openocd"
Expand All @@ -36,5 +38,5 @@ def configure_default_packages(self, variables, targets):
if name != upload_tool:
del self.packages[name]

return PlatformBase.configure_default_packages(
self, variables, targets)
return PlatformBase.configure_default_packages(self, variables,
targets)

0 comments on commit e21aa06

Please sign in to comment.