Problem with telnet session between OpenOCD and Eclipse

Zingemneire
Posts: 68
Joined: Tue Apr 17, 2018 7:35 am

Problem with telnet session between OpenOCD and Eclipse

Postby Zingemneire » Wed May 09, 2018 7:32 am

Hi,

I am making progress with using an ES32-WROVER based module but I have run into an odd problem when I try to run an msys2 script from within Eclipse to stop the OpenOCD server.

The script I use to start the OpenOCD server, which I can call perfectly well from Eclipse is:

Code: Select all

#!/bin/bash
echo "Starting OpenOCD"
cd /C/msys32/home/ESPdev/esp/openocd-esp32
bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
The script that causes a problem is:

Code: Select all

#!/bin/bash
echo "Stopping OpenOCD"
echo "shutdown" | /c/msys32/usr/bin/telnet localhost 4444
One odd thing is that yesterday it did work a few times but it does not any more, the other oddity is that if I run the telnet session via putty the OpenOCD server happily accepts the shutdown command. If I try to run the script from Eclipse I get the following messages from the OpenOCD server:

Info : accepting 'telnet' connection on tcp/4444
Info : dropped 'telnet' connection


Obviously the OpenOCD server is working but why would it not accept the shutdown command?

Any help much appreciated.

Zingemneire
Posts: 68
Joined: Tue Apr 17, 2018 7:35 am

Re: Problem with telnet session between OpenOCD and Eclipse

Postby Zingemneire » Fri May 18, 2018 9:54 am

Hi,

It took quite a bit of time but I finally found a solution. Instead of running an msys32 script I run a batch file with the following code:

Code: Select all

echo shutdown | plink -telnet 127.0.0.1 -P 4444
That will do it provided you have putty installed on your machine which also instaals the command line plink uitility.

Who is online

Users browsing this forum: No registered users and 79 guests