From patchwork Mon Jan 24 12:43:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 2841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E0DAC433F5 for ; Mon, 24 Jan 2022 12:43:41 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mx.groups.io with SMTP id smtpd.web11.3075.1643028220111342239 for ; Mon, 24 Jan 2022 04:43:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gherzan.com header.s=fm1 header.b=eoGoP+5c; spf=pass (domain: gherzan.com, ip: 66.111.4.26, mailfrom: andrei@gherzan.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6577F5C00DF; Mon, 24 Jan 2022 07:43:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 24 Jan 2022 07:43:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; bh=rGc5t2pjtMk1ux/e/U+04JWKgA9qUrYFD93CbdkSAW0=; b=eoGoP +5cX/L2EuQy2H2vOp4A+BpMkxRka8vr/Px+Svfbr3/iujnA9Ro+Y2eShtB+8g6kn 87se79gDhQ4Ir3IoAY/8kM5yOs5nAJcaXxtvQp6orhokajVWRGD3sRAEjZdPKuF/ nojR8XMgCyp4xrkb2xiFsB458s9a7FS/ee48+CMftwnCBAxxGCOdRSHt8IAKEIDq RAsxw8TK0HxPIwndoRbsp54WuwfP64yBiwBt28jBdClEM6jQOC2eM4+yD/umrz6j PpWlTFpxW25MGP2IgHl/cqa2bgA5UKhiQIYT/Ff3bQ5S1+U12TVQQPOlORBuuY6i yBDftjjbKzUu2+dhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=rGc5t2pjtMk1ux/e/U+04JWKgA9qU rYFD93CbdkSAW0=; b=dzeLBnwPq9D9yDVk3eoxwbz58vWARj5/sJ06e10O8MO82 P++NuHRJPFIitikm3z0YG1eAlStQTqu2Hk0Kt2ziJvbQxi/BocGSUEJD6mdv/Moh vEZPm6rLZLSlVo1Iq6Je1+rm+xBRPAhYHZJEpddcfJJaTI0WJPUGarIgdcb4yUdU OXYkjYuU3U6artdndGGDvuOsBe9KSOwIVdWTQBHxT/aRmwtsFS3W/v//09qUeCi8 XoWuTdsm3IrEdMSaB2EKnel+kqFBPch+ZKkGXujbZAYewuwV0k1jAC9CU98u4F1O 7Hh/qvq7XwartEeHugWtTw6pHsK9k54QogSIFTE6g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheptehnughrvghiucfi hhgvrhiirghnuceorghnughrvghisehghhgvrhiirghnrdgtohhmqeenucggtffrrghtth gvrhhnpedvleefteetkeekvdfgheelteekjeeuueetgfetvdfhjeetvdekhfekledthffg teenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghisehghhgvrhiirghnrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:43:38 -0500 (EST) From: Andrei Gherzan To: yocto@lists.yoctoproject.org Cc: andrei@gherzan.com, Stefan Schmidt , Andrei Gherzan Subject: [meta-zephyr][PATCH 1/2] bossa-native: Add Arduino variant of the bossa flashing tool Date: Mon, 24 Jan 2022 13:43:03 +0100 Message-Id: <20220124124304.2492266-1-andrei@gherzan.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 24 Jan 2022 12:43:41 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/55953 From: Stefan Schmidt This native recipe will be used to streamline the flashing of out Arduino Nano 33 BLE target. Until now we have pointed to the full Arduino IDE to get it installed and setting the PATH correctly before any flashing would work. Having the tool supplied under the hood for flashing will simplify documentation and support. Signed-off-by: Stefan Schmidt Signed-off-by: Andrei Gherzan --- .../bossa/bossa-native_git.bb | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 meta-zephyr-core/recipes-devtools/bossa/bossa-native_git.bb diff --git a/meta-zephyr-core/recipes-devtools/bossa/bossa-native_git.bb b/meta-zephyr-core/recipes-devtools/bossa/bossa-native_git.bb new file mode 100644 index 0000000..b645ecf --- /dev/null +++ b/meta-zephyr-core/recipes-devtools/bossa/bossa-native_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "Arduino variant of the BOSSA flashing tool" +HOMEPAGE = "https://github.com/arduino/BOSSA" +SECTION = "devel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bcf9399f7b9b96149837290bcdc3ad39" + +SRC_URI = "git://github.com/arduino/BOSSA.git;protocol=https;branch=nrf" + +PV = "1.9.1+git${SRCPV}" +SRCREV = "89f3556a761833522cd93c199581265ad689310b" + +S = "${WORKDIR}/git" + +inherit native + +do_compile() { + # We only compile the bossac commandline tool, not the graphical version. + oe_runmake bossac +} + +do_install() { + install -D -m 0755 ${B}/bin/bossac ${D}${bindir}/bossac +} From patchwork Mon Jan 24 12:43:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 2842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1C4EC433EF for ; Mon, 24 Jan 2022 12:43:41 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mx.groups.io with SMTP id smtpd.web09.3070.1643028221014446226 for ; Mon, 24 Jan 2022 04:43:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gherzan.com header.s=fm1 header.b=XvTXda4N; spf=pass (domain: gherzan.com, ip: 66.111.4.26, mailfrom: andrei@gherzan.com) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 59E165C0127; Mon, 24 Jan 2022 07:43:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 24 Jan 2022 07:43:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=zOaJ0HIOCKCrEa7ZgwYII6/WqbTGgd eol6ELDQnLhoU=; b=XvTXda4NWCUZv29FNZw89MFaxIwmO+IrXAjIPrMBNiSoo6 ot0idzZs7MMzdLcHXqaCXBUdtcvaUfpEzgS0QIkDGwsEafkZlJaOHF4EPOCO/nCS W0z2LiLTtPDCAJjrm0NKDq1XhDnuLafG0VBidkt+QWyw19aisrcMwoCe7Ne8UCZ3 iDN8qzwdqCJgGmhi2T+0ZTvoouElM9L0LbmWBb5UPRxi5Tv0VVZ0CxnbjG+TFO3G QmWDhhk6fzWOhFYptDY6xYAFlSHTXcp+rMD9nJwOKrrtY0BPQqNMyx34Wq+zXboE h5vE4omly5YNDBghchkW0UwYQi1udy67TNrwpyiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zOaJ0H IOCKCrEa7ZgwYII6/WqbTGgdeol6ELDQnLhoU=; b=A0c/0qh2MbzzxYeNwks7mM t8B9h3pt3xI4FjC6rUAvjgyhq0TBe12ngfF2Z1lS65us76jdXvkylpgRCJobElAQ /VwXqRYw70059t4UBZHbXaYCPkllSt7STxmd8xZ4FPJ5FZBE9osVURtQD2RCixnt r6p2i4MjeRdsHwyBDP7xp0Vr6jouyzZ8yPduDRYJzv8DwjGcXQ5avZGTlb7JR3+n UOOcT1isiCK5nyFPoVT2bhlfQs8LgbMPYL/YroQ/TtHjv9OJB9mcdYhowL2hdbmw RtoVTcafjpGNCGVf4QE7X7BjzWbRCs2V19wras184MZNNvS4GYqWasfMAw+NgsQg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehnughrvghi ucfihhgvrhiirghnuceorghnughrvghisehghhgvrhiirghnrdgtohhmqeenucggtffrrg htthgvrhhnpeettddvffefkeetveekteeiveeggeevieeiudejfeeitedvkeelvdekheej lefffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvihesghhhvghriigrnhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:43:39 -0500 (EST) From: Andrei Gherzan To: yocto@lists.yoctoproject.org Cc: andrei@gherzan.com, Stefan Schmidt , Andrei Gherzan Subject: [meta-zephyr][PATCH 2/2] zephyr-flash-bossac.bbclass: Use internal bossac tool instead looking up PATH Date: Mon, 24 Jan 2022 13:43:04 +0100 Message-Id: <20220124124304.2492266-2-andrei@gherzan.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220124124304.2492266-1-andrei@gherzan.com> References: <20220124124304.2492266-1-andrei@gherzan.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 24 Jan 2022 12:43:41 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/55954 From: Stefan Schmidt 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 Signed-off-by: Andrei Gherzan --- meta-zephyr-core/classes/zephyr-flash-bossac.bbclass | 9 ++++----- 1 file 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"