pyocd / pyOCD

Open source Python library for programming and debugging Arm Cortex-M microcontrollers
https://pyocd.io
Apache License 2.0
1.14k stars 485 forks source link

disable telnet when starting pyocd-gdbserver #301

Open jupe opened 7 years ago

jupe commented 7 years ago

Description

When user doesn't need to use telnet server there should be way to disable it. It just waste of cpu&memory (& one extra socket) which might be problematic in "low-end-hosts" like odroid.

jupe commented 6 years ago

@kjbracey-arm would it be hard to implement this as well? :)

kjbracey commented 6 years ago

That'll teach me to start responding to issues.

kjbracey commented 6 years ago

This should be achievable by either turning off the enable_semihosting session option, or by setting semihost_console_type to stdx.

(Semihosting routes I/O calls on the device to the debugger machine - eg printf or file accesses. There are some hooks for this in Mbed OS, but it's not normally used, so disabling should normally be fine).

flit commented 5 years ago

This can currently be achieved by setting semihost_console_type to something other than "telnet".

Setting enable_semihosting to False does not work. The semihosting objects are always created. The enable flag just determines whether halts while running are examined for semihosting breakpoints. It's done this way to support the "arm semihosting enable" gdb monitor command to turn enable semihosting after the gdbserver is already running, mostly for OpenOCD compatibility.