aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt <stefan.schmidt@huawei.com>2022-01-24 13:43:04 +0100
committerNaveen Saini <naveen.kumar.saini@intel.com>2022-01-27 16:34:30 +0800
commit5518ca2b2e08e55794bba10698fcd7be9df379fa (patch)
treec784ff69416686965a4a3ba389e5b9f06cf0cbb2
parentbef4443f1da38c98b174fdcaefd0db07b085b320 (diff)
downloadmeta-zephyr-5518ca2b2e08e55794bba10698fcd7be9df379fa.tar.gz
meta-zephyr-5518ca2b2e08e55794bba10698fcd7be9df379fa.tar.bz2
meta-zephyr-5518ca2b2e08e55794bba10698fcd7be9df379fa.zip
zephyr-flash-bossac.bbclass: Use internal bossac tool instead looking up PATH
Instead of looking in PATH on the host to find bossac we now depend on the native variant we build and set the path to our yocto build tool. Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com> Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
-rw-r--r--meta-zephyr-core/classes/zephyr-flash-bossac.bbclass9
1 files changed, 4 insertions, 5 deletions
diff --git a/meta-zephyr-core/classes/zephyr-flash-bossac.bbclass b/meta-zephyr-core/classes/zephyr-flash-bossac.bbclass
index 50222d5..51f2dd3 100644
--- a/meta-zephyr-core/classes/zephyr-flash-bossac.bbclass
+++ b/meta-zephyr-core/classes/zephyr-flash-bossac.bbclass
@@ -1,17 +1,17 @@
#@DESCRIPTION: class file to flash boards like Arduino Nano BLE which depends on bossac for flashing
+DEPENDS += "bossa-native"
+
python do_flash_usb() {
import shutil
import subprocess
import serial.tools.list_ports
- # Note: make sure the installed bossac is set to PATH before running flash_usb()
# Check if bossac is avaiable for flashing
- origbbenv = d.getVar("BB_ORIGENV", False)
- bossac_path = shutil.which("bossac", path=origbbenv.getVar('PATH'))
+ bossac_path = shutil.which("bossac")
if not bossac_path:
- bb.fatal("ERROR: bossac not found, please install first and add to PATH")
+ bb.fatal("ERROR: bossac not found.")
board = d.getVar('BOARD')
@@ -47,4 +47,3 @@ python do_flash_usb() {
addtask do_flash_usb after do_deploy
do_flash_usb[nostamp] = "1"
-do_flash_usb[vardepsexclude] = "BB_ORIGENV"