Merge pull request #4 from dlbogdan/patch-2

Update main.py
This commit is contained in:
Maximilian Gerhardt 2022-05-06 21:17:08 +02:00 committed by GitHub
commit 74a6e8a2cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(