Summary
pio run fails at the firmware.bin generation step (after a successful link) when the project directory path contains a space:
Usage: arm-none-eabi-objcopy [option(s)] in-file [out-file]
...
*** Error 1
*** [.pio\build\sim800\firmware.bin] ...\temp.bin: The system cannot find the file specified
Root cause
builder/framework/logicromsdk.py, gen_bin_file():
cmd = ["$OBJCOPY"]
...
cmd.extend(["-O", "binary"])
cmd.append(target_elf.get_abspath())
cmd.append(temp_firm)
env.Execute(env.VerboseAction(" ".join(cmd), " "))
The command is built as a plain space-joined string and executed as a shell command, with no quoting around the elf/output paths. If the project directory (or any ancestor directory) contains a space — e.g. E:\Projects\Foo\SIM800 DEV\.pio\build\sim800\firmware.elf — the shell splits it into two arguments, objcopy receives a malformed argument list, prints its usage text, and temp.bin is never created, causing the next build step to fail with "the system cannot find the file specified".
Repro
Any project whose path contains a space, building with framework = logicromsdk.
Fix
Quote the path arguments before joining, e.g.:
cmd.append('"%s"' % target_elf.get_abspath())
cmd.append('"%s"' % temp_firm)
(Verified locally — this resolves the issue and produces a correct firmware.bin.)
Environment
platform-logicrom 1.1.0
framework-logicromsdk 1.2.0
- Windows 11
Summary
pio runfails at thefirmware.bingeneration step (after a successful link) when the project directory path contains a space:Root cause
builder/framework/logicromsdk.py,gen_bin_file():The command is built as a plain space-joined string and executed as a shell command, with no quoting around the elf/output paths. If the project directory (or any ancestor directory) contains a space — e.g.
E:\Projects\Foo\SIM800 DEV\.pio\build\sim800\firmware.elf— the shell splits it into two arguments,objcopyreceives a malformed argument list, prints its usage text, andtemp.binis never created, causing the next build step to fail with "the system cannot find the file specified".Repro
Any project whose path contains a space, building with
framework = logicromsdk.Fix
Quote the path arguments before joining, e.g.:
(Verified locally — this resolves the issue and produces a correct
firmware.bin.)Environment
platform-logicrom1.1.0framework-logicromsdk1.2.0