Openocd Options wont pass command arguments correctly
I’m using the AC6 eclipse environment for debugging a number of applications running on the Nucleo-64 boards.
Usually I have 2 boards, one running a client application, the other running a server application.
When I’m using a single board the openocd debugging works well.
When I have more boards connected to my system I am unable to control which board Eclipse communicates with. It appears to always pick the first one it sees.
I know I can use the openocd command “hla_serial 066FFF545253675187172455” to select the target board by the serial. I know this works because I use this from the command line to load the images onto individual boards. I should be able to do the same thing from eclipse.
However when I provide the same command using the OpenOCD Options box in the debugger configuration
OpenOCD Options: -c “hla_serial 066FFF545253675187172455”
OpenOCD is unable to separate the command and parameter and thinks the whole string is the command giving this error:
invalid command name “hla_serial 066FFF545253675187172455”
If I remove the quotes then openocd does not receive the serial number argument, and tells me hla_serial requires a parameter.
I’ve tried every way I can think of to specify a string (single quotes, double quotes, escaped quotes, escaped spaces.) I simply cannot pass arguments to openOCD commands using the Options field.
It does appear to work for command strings in the OpenOCD Command field. However commands here come before the configuration script at which point the hla_serial is not valid. It needs to come after the scripts.
I suspect there is some error in the way the Options field is passed to the openocd command.
Has anyone else experienced this issue, and know of a workaround, either for passing the command arguments or selecting the target boards?
Cheers,
Andrew.