I am trying to do some parsing after the elf file was created.
Win10, PIO version 5.1.1, robotdyn_blackpill_f303cc
For this I am trying to call gdb-python27 from MinGW (GNU gdb (GDB) 7.5, installed a few days ago).
Regardless of the input commands I provide, or even just calling the exe itself, I get an error in the python lib provided with PIO.
The error seems to be reproducable by just trying to create a subprocess of gdb. Adding arguments or setting other parameters (shell, text, or cwd) do not alter the behavior.
ret = subprocess.run(“C:/MinGW/bin/gdb-python27.exe”)
Starting postbuild, cmd C:/MinGW/bin/gdb-python27.exe --batch -ex “py inputFile = ‘firmware.elf’;outputFile = ‘dbg_readout.json’”-x C:/Users/Kevin/Documents/Projekte/FanControl/Control_V2/GDBReadoutDirect_27.py
File “C:\Users\Kevin.platformio\python3\lib\site.py”, line 177
SyntaxError: invalid syntax
CompletedProcess(args=‘C:/MinGW/bin/gdb-python27.exe --batch -ex “py inputFile = ‘firmware.elf’;outputFile = ‘dbg_readout.json’”-x C:/Users/Kevin/Documents/Projekte/FanControl/Control_V2/GDBReadoutDirect_27.py’, returncode=1)
The error occurs in site.py in the function
def addpackage(sitedir, name, known_paths):
“”“Process a .pth file within the site-packages directory:
For each line in the file, either combine it with sitedir to a path
and add that to known_paths, or execute it if it starts with 'import '.
The error does not appear when I try to run the command from PyCharm with either my local python 3.9 or even the PIO provided 3.7 instance. Paths etc. are hard-coded in this case.
What could be the cause here? Executing an echo command works fine.