Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions boards/upsidedownlabs-breadstick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"build": {
"core": "msp430",
"f_cpu": "16000000L",
"mcu": "msp430g2553",
"variant": "UpsideDownLabs-Breadstick"
},
"frameworks": [
"arduino"
],
"name": "Upside Down Labs MSP430 Breadstick",
"upload": {
"maximum_ram_size": 512,
"maximum_size": 16384,
"protocol": "msptool"
},
"url": "https://github.com/upsidedownlabs/MSP430-Breadstick",
"vendor": "Upside Down Labs"
}
23 changes: 19 additions & 4 deletions builder/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright 2021 Upside Down Labs <contact@upsidedownlabs.tech>
# Copyright 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -150,10 +151,24 @@
)
upload_target = target_elf
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]

target_upload = env.Alias("upload", upload_target,
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE"))
AlwaysBuild(target_upload)
elif env.subst("$UPLOAD_PROTOCOL") == "msptool":
env.Replace(
UPLOADER=join(env.PioPlatform().get_package_dir("tool-msptool") or "", "msptool.py"),
MSPTOOLDIR=env.PioPlatform().get_package_dir("tool-msptool"),
UPLOADCMD='"$PYTHONEXE" "$UPLOADER" -d $MSPTOOLDIR -p $UPLOAD_PORT -f $SOURCES'
)
upload_target = target_elf
upload_actions = [
env.VerboseAction(env.AutodetectUploadPort, "Looking for upload port..."),
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")
]


if env.subst("$UPLOAD_PROTOCOL") == "msptool":
env.AddPlatformTarget("upload", upload_target, upload_actions, "Upload")
else:
target_upload = env.Alias("upload", upload_target, env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE"))
AlwaysBuild(target_upload)

#
# Default targets
Expand Down
6 changes: 6 additions & 0 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
"optional": true,
"owner": "platformio",
"version": "~1.90200.1400"
},
"tool-msptool": {
"type": "uploader",
"optional": true,
"owner": "lorforlinux",
"version": "~0.3"
}
}
}