From 9870c4cec4bba3d35a523fcc6018ac18525068be Mon Sep 17 00:00:00 2001 From: dlbogdan Date: Fri, 22 Apr 2022 09:13:03 +0300 Subject: [PATCH] Update main.py because of the logic selecting elf or firm (bin), we need to default to no offset on normal firmware upload because we already defaulted to elf a few lines below if upload.offset_address is not user set so when no offset is needed. programming fails otherwise Unfortunately, my way of modifying the code probably sucks because I've never written anything in python but I assumed the second arg is the default n case the first is missing. Haven't had time to dig too much into it. --- builder/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/main.py b/builder/main.py index dd77a18..e78dcd8 100644 --- a/builder/main.py +++ b/builder/main.py @@ -381,7 +381,10 @@ elif upload_protocol in debug_tools: # normal firmware upload. flash starts at 0x10000000 openocd_args.extend([ "-c", "program {$SOURCE} %s verify reset; shutdown;" % - board.get("upload.offset_address", "0x10000000") + # board.get("upload.offset_address", "0x10000000") + board.get("upload.offset_address", "") + #because of the logic selecting elf or firm (bin), we need to default to no offset because we already defaulted to elf a few lines below when no offset is needed + # programming fails otherwise ]) openocd_args = [ f.replace("$PACKAGE_DIR", platform.get_package_dir(