Enable semihosting for pyOCD for 'launch' configs#84
Conversation
…r off is set Signed-off-by: Jens Reinecke <jens.reinecke@arm.com>
|
I have just slightly changed the order of command line options and used Tried it out and it seems to work except the following limitation. In multi-core, the options will be enabled only if the core being launched has telnet enabled (regardless of the other core telnet settings). I'm not sure if this can be covered too. In addition, the semihosting option should be added also to |
Signed-off-by: Jens Reinecke <jens.reinecke@arm.com>
👍
May need monitor commands to enable through GDB
a3a247c , please give it a try @RobertRostohar , it's untested |
|
{
"label": "CMSIS Run",
"type": "shell",
"command": "pyocd",
"options": {
"cwd": "<%= data.cwd %>",
"shell": "<%= data.shell[process.platform] %>"
},
"args": [
"gdbserver",
"--probe",
"stlink:",
"<% if (config['probe-id']) { %>",
"--uid",
"<%= config['probe-id'] %>\n",
"<% } %>",
"--connect",
"attach",
"--persist",
"--reset-run",
"<% const telnetMode = data.telnetOptionsInput[pname ?? '']?.mode ?? data.telnetOptionsDefault.mode %>",
"<% if (telnetMode && telnetMode !== 'off') { %>",
"--semihosting",
"<% } %>",
"--cbuild-run",
"${command:cmsis-csolution.getCbuildRunFile}",
"--quiet",
"--log",
"*.cbuild_run,*server=info"
],
"problemMatcher": []
}, |
Signed-off-by: Jens Reinecke <jens.reinecke@arm.com>
Sorry, my bad. Used |
|
Seems to work now. |
|
@jreineckearm I suggest to use just the 'telnet' node to enable semihosting. When telnet is disabled, the telnet node does not exist. IMHO this is sufficient and should also cover the multi-core scenarios when one core as telnet off. |
|
In the future, pyOCD will automatically enable semihosting when using telnet in Therefore, the command line options are only a temporary solution for this release and will be soon removed. |
|
I am fine either way (will remove now for pyOCD). Will leave it in for J-Link though at the moment as I don't have time for re-testing that part before my holidays. I am more than certain that we'll touch these parts again when we have gained more experience with the feature in the field. So, will clean it up for 1.4.0. |
Signed-off-by: Jens Reinecke <jens.reinecke@arm.com>
|
Please try again: 83643f2 |
|
Seems to work as expected. |
-Sto pyOCDlaunchconfigurations (single and multi-core) iftelnet>modesetting exists and is different fromoff.portwhich should be set via cbuild-run.yml. Could be further cleaned up but leaving as is due to limited time.NOTE: Only did a quick test with a multicore launch config with CMSIS-DAP@pyOCD. Other variants need more testing before release.