From 5152e836f28dfb53c430e72907c95c2941d1df6c Mon Sep 17 00:00:00 2001 From: Christopher Pattenden Date: Fri, 28 Jul 2023 10:58:52 -0400 Subject: [PATCH] JLINKARM_BeginDownload is void, not int. Reading a return value results in a nonsensical value and frequently an invalid exception. --- pylink/jlink.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pylink/jlink.py b/pylink/jlink.py index eb69c67..560cca1 100644 --- a/pylink/jlink.py +++ b/pylink/jlink.py @@ -2194,9 +2194,7 @@ def flash(self, data, addr, on_progress=None, power_on=False, flags=0): pass # Perform read-modify-write operation. - res = self._dll.JLINKARM_BeginDownload(flags=flags) - if res < 0: - raise errors.JLinkEraseException(res) + self._dll.JLINKARM_BeginDownload(flags=flags) if isinstance(data, list): data = bytes(data)