Firmware_symbolizer.py misquotes the .elf on Windows

When running firmware_symbolizer.py on Windows with the following arguments I get an error seemingly due to the quoting of the .elf path.

arm-none-eabi-addr2line: ''C:\Users\<user>\gamedev\zig\<game>\zig-out\pdx_source_dir\pdex.elf'': No such file
Traceback (most recent call last):
  File "C:\Users\<user>\Documents\PlaydateSDK\bin\firmware_symbolizer.py", line 39, in <module>
    symbolize()
    ~~~~~~~~~^^
.... (full callstack)....
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'arm-none-eabi-addr2line -f -i -p -e 'C:\Users\<user>\gamedev\zig\<game>\zig-out\pdx_source_dir\pdex.elf' '0x00000000' '0x90003c49'' returned non-zero exit status 1.

This was a simple fix for me from:

cmd = f"arm-none-eabi-addr2line -f -i -p -e '{elf}' '0x{pc}' '0x{lr}'"

to

cmd = f"arm-none-eabi-addr2line -f -i -p -e {elf} '0x{pc}' '0x{lr}'"

Might also be the click module misbehaving with powershell and py?

Thanks for the report, your fix looks good. We'll get it integrated into the next release.

1 Like

To be fair it then won't work with a space in the path, I assume. Might need something better :slight_smile:

If you look at the error the path looks like it's double single quoted; I think it's probably already quoted but I'll make sure it works. :slight_smile:

1 Like

Ah touche, click must be doing something nice

Just saw the fix in the 2.7.4 notes, thanks!