1

I am setting up openOCD and Eclipse on a new operating system, using a Nucleo F030R8 board that debugs fine on another system. When I run the debugger in Eclipse I get "error in final launch sequence":

Error in final launch sequence

Failed to execute MI command:

-target-select remote localhost:3333

Error message from debugger back end:

localhost:3333: No such file or directory.

Failed to execute MI command:

-target-select remote localhost:3333

Error message from debugger back end:

localhost:3333: No such file or directory.

localhost:3333: No such file or directory.

I can run the debugger in terminal with ./openocd -f board/st_nucleo_f0.cfg and get:

*GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.9.0-00073-gdd34716 
(2015-05-19-12:55)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

Info : The selected transport took over low-level target control. The results 
might differ compared to plain JTAG/SWD

adapter speed: 1000 kHz

adapter_nsrst_delay: 100

none separate

srst_only separate srst_nogate srst_open_drain connect_deassert_srst

Info : Unable to match requested speed 1000 kHz, using 950 kHz

Info : Unable to match requested speed 1000 kHz, using 950 kHz

Info : clock speed 950 kHz

Info : STLINK v2 JTAG v25 API v2 SWIM v13 VID 0x0483 PID 0x374B

Info : using stlink api v2

Info : Target voltage: 3.257369

Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints''*

and the LED LD1 blinks alternatively green and red. Similarly, I can run External Tools in Eclipse just fine, but this doesn't open the debugger. So it seems like I'm close, but something isn't quite right. Let me know if you need any other details of my system.

Using:

Eclipse Mars.2 (4.5.2)

Mac 10.12.1

OpenOCD 0.10.0-201601101000-dev

GNU Tools gcc-arm-none-eabi-5_4-2016q3

Bobby Digital
  • 45
  • 1
  • 8
  • By "debugs fine on another system" I'm assuming that you mean you also use Eclipse and you're importing the same project, but you simply cannot start the debug session. If so, I'd start by not only importing the project itself, but also the openocd debug configuration from the system where it works. You can do that by going to the debug configuration on the working pc and in the last Common tab selecting "Shared file". This will cause the debug configuration to be stored in the project directory. Do the same on the second station and substitute the file. – J_S Dec 14 '16 at 16:58
  • Yes, this is what I mean. But both are just a simple blinkLED default project that Eclipse has to verify the installation. The debug settings are identical on both (only custom things are calling out board in debugger > config options; and setting the openocd path variables correctly). openOCD launches fine suggesting the debug config variables are fine, but Eclipse is getting hung on one of the systems when launching the debugger. – Bobby Digital Dec 14 '16 at 18:20
  • The only other thing that I can think of right now is checking your openocd path in eclipse under preferences->run/debug/openocd. – J_S Dec 14 '16 at 19:20
  • Yeah, I've even played around with that by editing the path to something that doesn't exist and it kicks it out saying "no such file". So it's reading the path right. – Bobby Digital Dec 14 '16 at 19:55
  • Are you sure that the openOCD is actually started with correct config file? Try to rename the config file on disk. Also, have you seen this: http://stackoverflow.com/questions/13678923/eclipse-failed-to-execute-mi-command ? – mactro Dec 15 '16 at 14:46
  • https://www.element14.com/community/servlet/JiveServlet/downloadImage/2-210974-352921/Screen+Shot+2016-12-12+at+10.36.22+AM.png this is the way i have it set up. if i rename the config file, eclipse kicks it back saying 'can't find board' so i know i'm at least pointing to the right file. if i set this up as external tools with same settings it executes fine, and the debugger runs (but obviously doesn't go to debug mode). as far as the second thread, i don't really understand. they are setting up Remote Application, not GDB OpenOCD Debugging. – Bobby Digital Dec 15 '16 at 17:39

1 Answers1

1

Ok so I figured it out with major credit due to http://www.carminenoviello.com. Running this in terminal:

>telnet localhost 3333
localhost: nodename nor servname provided, or not known

showed this wasn't working correctly. checking /etc/hosts, the file was empty. I changed it to:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

And that was that. Can now enter debug mode.

Bobby Digital
  • 45
  • 1
  • 8