aboutsummaryrefslogtreecommitdiffstats
path: root/classes/zephyr-flash-pyocd.bbclass
AgeCommit message (Collapse)Author
2022-01-24meta-zephyr-core/bsp: Restructure into sublayersEilís Ní Fhlannagáin
This commit restructures meta-zephyr into meta-zephyr-core and meta-zephyr-bsp. It moves machine definitions into meta-zephyr-bsp in preparation for adding the autogenerated zephyr machines. Signed-off-by: Eilís Ní Fhlannagáin <elizabeth.flanagan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-04-15zephyr-flash-pyocd.bbclass: Fix problems with flashing particular boardsZbigniew Bodek
By default, pyocd uses generic target type called "cortex_m" which should be able to connect and debug but not flash the memory. Normally pyocd would warn us of using default target instead of proper one but this message wasn't displayed. Despite not providing target type, flashing process succeeded but results were undefined. On Nitrogen, sometimes it worked (especially for small images) and sometimes the programmed device crashed miserably. Fix flashing operation by providing pyocd target type acquired from the conditional PYOCD_TARGET variable declared for each machine (chip family). Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17zephyr-flash-pyocd.bbclass: Implement configurable probe IDs to programAndrei Gherzan
Implement logic to configure what probes to program based on the PYOCD_FLASH_IDS variable: 1. by default program all attached probes 2. change default behaviour by listing the probe IDs to flash CONNECT_TIMEOUT_SECONDS was also renamed to maintain consistency with the PYOCD_FLASH_IDS variable. One can query the IDs using `pyocd list`. The value of PYOCD_FLASH_IDS can also be injected into the datastore using BB_ENV_EXTRAWHITE. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17zephyr-flash-pyocd.bbclass: Handle import error for pyocd modulesAndrei Gherzan
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17zephyr-flash-pyocd.bbclass: Flash the first probe found with a timeoutAndrei Gherzan
Currently the code flashes the firmware in a blocking way. If the host is not configured accordingly (for example in terms of permissions), this would hang undefinitely. This can easily confuse users and in order to avoid this, the patch changes to unblocking session creation and opening call, wrapping the tries in some relevant logging. The timeout can be defined with `CONNECT_TIMEOUT_SECONDS` which defaults to 30 seconds. Also, by default, when multiple probes are attached, the session call will return a selection choice. This would obviously break under bitbake with an exception: Exception: EOFError: EOF when reading a line Avoid this by selecting the first found probe. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17zephyr-flash-pyocd.bbclass: Add missing do_flash_usb dependency on do_deployAndrei Gherzan
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2020-12-14zephyr-flash-pyocd.bbclass: support for flashing via pyocdWojciech Zmuda
Implement do_flash_usb for boards supported by pyocd: MACHINE=xxx bitbake yyy -c flash_usb Pyocd support abundance of boards, however for now this meta-layer supports only one board that can be flashed using pyocd, that is 96Boards Nitrogen. Describe the feature in README. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>