From d24609b89e26da75a5a7fe01df2b98818716611f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Jun 2022 17:59:34 +0200 Subject: [PATCH] Add support for filesystem flashing with JLink --- builder/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builder/main.py b/builder/main.py index 21cc542..9825d56 100644 --- a/builder/main.py +++ b/builder/main.py @@ -330,10 +330,11 @@ elif upload_protocol.startswith("jlink"): if not isdir(build_dir): makedirs(build_dir) script_path = join(build_dir, "upload.jlink") + upload_addr = hex(env["FS_START"]) if "uploadfs" in COMMAND_LINE_TARGETS else board.get( + "upload.offset_address", "0x0") commands = [ "h", - "loadbin %s, %s" % (source, board.get( - "upload.offset_address", "0x0")), + "loadbin %s, %s" % (source, upload_addr), "r", "q" ]