Skip to content

Commit

Permalink
Merge branch 'release/v8.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Feb 26, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 697bdfe + 70f16dd commit 2850251
Showing 6 changed files with 76 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-16.04, windows-latest, macos-latest]
python-version: [2.7, 3.7]
python-version: [3.7]
example:
- "examples/mbed-rtos-blink-baremetal"
- "examples/mbed-rtos-usb-msd"
3 changes: 2 additions & 1 deletion boards/hexiwear.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,8 @@
"k64f"
],
"executable": "$PYTHONEXE",
"package": "tool-pyocd"
"package": "tool-pyocd",
"ready_pattern": "GDB server started on port"
}
}
}
2 changes: 1 addition & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
@@ -147,7 +147,7 @@ def _jlink_cmd_script(env, source):
UPLOADER="JLink.exe" if system() == "Windows" else "JLinkExe",
UPLOADERFLAGS=[
"-device", env.BoardConfig().get("debug", {}).get("jlink_device"),
"-speed", "4000",
"-speed", env.GetProjectOption("debug_speed", "4000"),
"-if", ("jtag" if upload_protocol == "jlink-jtag" else "swd"),
"-autoconnect", "1",
"-NoGui", "1"
10 changes: 2 additions & 8 deletions examples/zephyr-blink/src/main.c
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
#include <devicetree.h>
#include <drivers/gpio.h>


/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS 1000

@@ -19,25 +18,20 @@
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
#define LED0 DT_GPIO_LABEL(LED0_NODE, gpios)
#define PIN DT_GPIO_PIN(LED0_NODE, gpios)
#if DT_PHA_HAS_CELL(LED0_NODE, gpios, flags)
#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios)
#endif
#else
/* A build error here means your board isn't set up to blink an LED. */
#error "Unsupported board: led0 devicetree alias is not defined"
#define LED0 ""
#define PIN 0
#endif

#ifndef FLAGS
#define FLAGS 0
#endif

void main(void)
{
struct device *dev;
const struct device *dev;
bool led_is_on = true;
int ret = 0;
int ret;

dev = device_get_binding(LED0);
if (dev == NULL) {
66 changes: 41 additions & 25 deletions platform.json
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@
"homepage": "http://www.freescale.com/webapp/sps/site/homepage.jsp?code=KINETIS",
"license": "Apache-2.0",
"keywords": [
"dev-platform",
"ARM",
"Cortex-M",
"NXP Semiconductors",
"Kinetis"
"dev-platform",
"ARM",
"Cortex-M",
"NXP Semiconductors",
"Kinetis"
],
"engines": {
"platformio": "^5"
@@ -18,7 +18,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-freescalekinetis.git"
},
"version": "7.0.0",
"version": "8.0.0",
"frameworks": {
"mbed": {
"package": "framework-mbed",
@@ -33,24 +33,30 @@
"toolchain-gccarmnoneeabi": {
"type": "toolchain",
"owner": "platformio",
"version": "~1.80201.0"
"version": "~1.80201.0",
"optionalVersions": [
"~1.90201.0"
]
},
"framework-mbed": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~6.60600.0"
"version": "~6.60600.0",
"optionalVersions": [
"~6.51506.0"
]
},
"framework-zephyr": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~2.20400.0"
"version": "~2.20500.0"
},
"framework-zephyr-cmsis": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.542b2296e6"
"version": "0.0.0-alpha+sha.c3bd2094f9"
},
"framework-zephyr-canopennode": {
"optional": true,
@@ -60,52 +66,52 @@
"framework-zephyr-civetweb": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.99129c5efc"
"version": "0.0.0-alpha+sha.e6903b80c0"
},
"framework-zephyr-fatfs": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.13697783bf"
"version": "0.0.0-alpha+sha.1d1fcc725a"
},
"framework-zephyr-hal-nxp": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.68bbdbdec1"
"version": "0.0.0-alpha+sha.b916bca1d5"
},
"framework-zephyr-hal-st": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.5b3ec3e182"
"version": "0.0.0-alpha+sha.b52fdbf4b6"
},
"framework-zephyr-libmetal": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.0b23894a04"
"version": "0.0.0-alpha+sha.9d4ee2c3cf"
},
"framework-zephyr-lvgl": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.928b61c7c8"
"version": "0.0.0-alpha+sha.31acbaa36e"
},
"framework-zephyr-mbedtls": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.aef137b1af"
"version": "0.0.0-alpha+sha.24d84ecff1"
},
"framework-zephyr-mcuboot": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.a5d79cf8cc"
"version": "0.0.0-alpha+sha.3fc59410b6"
},
"framework-zephyr-mcumgr": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.5051f9d900"
"version": "0.0.0-alpha+sha.43845e883f"
},
"framework-zephyr-open-amp": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.724f7e2a45"
"version": "0.0.0-alpha+sha.de1b85a130"
},
"framework-zephyr-loramac-node": {
"optional": true,
@@ -115,12 +121,17 @@
"framework-zephyr-openthread": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.07f430dac6"
"version": "0.0.0-alpha+sha.1d668284a0"
},
"framework-zephyr-segger": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.874d9e9696"
"version": "0.0.0-alpha+sha.38c79a447e"
},
"framework-zephyr-sof": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.b5b772dd61"
},
"framework-zephyr-tinycbor": {
"optional": true,
@@ -140,18 +151,23 @@
"framework-zephyr-mipi-sys-t": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.957d46bc3c"
"version": "0.0.0-alpha+sha.75e671550a"
},
"framework-zephyr-tfm-mcuboot": {
"optional": true,
"owner": "platformio",
"version": "1.7.0-rc1"
},
"framework-zephyr-trusted-firmware-m": {
"optional": true,
"owner": "platformio",
"version": "0.0.0-alpha+sha.143df67555"
"version": "0.0.0-alpha+sha.96340fb6c0"
},
"tool-pyocd": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~0.801.0"
"version": "~1.2900.0"
},
"tool-jlink": {
"type": "uploader",
37 changes: 29 additions & 8 deletions platform.py
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import copy
import json
import os

@@ -42,7 +43,7 @@ def configure_default_packages(self, variables, targets):
"tool-cmake", "tool-dtc", "tool-ninja"):
self.packages[p]["optional"] = False
if "windows" not in get_systype():
self.packages['tool-gperf']['optional'] = False
self.packages["tool-gperf"]["optional"] = False

jlink_conds = [
"jlink" in variables.get(option, "")
@@ -77,15 +78,15 @@ def _add_default_debug_tools(self, board):
upload_protocols = board.manifest.get("upload", {}).get(
"protocols", [])
if "tools" not in debug:
debug['tools'] = {}
debug["tools"] = {}

# CMSIS-DAP / BlackMagic Probe
for link in ("blackmagic", "cmsis-dap", "jlink"):
if link not in upload_protocols or link in debug['tools']:
if link not in upload_protocols or link in debug["tools"]:
continue

if link == "blackmagic":
debug['tools']['blackmagic'] = {
debug["tools"]["blackmagic"] = {
"hwids": [["0x1d50", "0x6018"]],
"require_debug_port": True
}
@@ -94,7 +95,7 @@ def _add_default_debug_tools(self, board):
pyocd_target = debug.get("pyocd_target")
assert pyocd_target

debug['tools'][link] = {
debug["tools"][link] = {
"onboard": True,
"server": {
"package": "tool-pyocd",
@@ -103,14 +104,15 @@ def _add_default_debug_tools(self, board):
"pyocd-gdbserver.py",
"-t",
pyocd_target
]
],
"ready_pattern": "GDB server started on port"
}
}

elif link == "jlink":
assert debug.get("jlink_device"), (
"Missed J-Link Device ID for %s" % board.id)
debug['tools'][link] = {
debug["tools"][link] = {
"server": {
"package": "tool-jlink",
"arguments": [
@@ -126,5 +128,24 @@ def _add_default_debug_tools(self, board):
}
}

board.manifest['debug'] = debug
board.manifest["debug"] = debug
return board

def configure_debug_options(self, initial_debug_options, ide_data):
debug_options = copy.deepcopy(initial_debug_options)
server_executable = debug_options["server"]["executable"].lower()
adapter_speed = initial_debug_options.get("speed")
if adapter_speed:
if "jlink" in server_executable:
debug_options["server"]["arguments"].extend(
["-speed", adapter_speed]
)
elif "pyocd" in debug_options["server"]["package"]:
assert (
adapter_speed.isdigit()
), "pyOCD requires the debug frequency value in Hz, e.g. 4000"
debug_options["server"]["arguments"].extend(
["--frequency", "%d" % int(adapter_speed)]
)

return debug_options

0 comments on commit 2850251

Please sign in to comment.