There is a codepath is "load_section_callback" where the variable "err" will not end up being assigned a value, and hence will default to whatever happened to be on the stack at its location. And in my case, it was defaulting to a vlaue which signaled an error, when none had occured. This causes the following problem: When attempting a "load" to a remote target, "load" fails after first packet is successfuly transfered to the target with: Loading section .text, size 0xdc220 lma 0x0 Sending packet: $X0,400:..... [$][O][K][#][9][a]Packet received: OK remote:target_xfer_partial (2, (null), 0x0, 0x40ed9008, 0x0, 1024) = 1024, bytes = 48 00 40 00 41 50 50 20 ... Memory access error while loading section .text. The call to "target_write_memory_partial" will not set "err" if it uses "target_xfer_partial" to do the memory transfer, as "target_xfer_partial" does not take "err" as a parameter. The attached patch fixes this, by simply defaulting "err" to 0, the OK state. This is the subject of PR# 1944 Steven Johnson