Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums-run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/793050/#msg_793050
Cross-development effort. Host is a Windows XP SP3 system loaded with the Atollic Lite package for ARM and the CodeSourcery Lite package for compile/link/etc.
I've been trying to get an LED blinker running in an STM32F4_Discovery board.
The board is connected to the computer with two USB cables; one on the debug port, the other to the data end.
Here's one site with instructions and a note that Indigo was good:
shareee_dot_netne_dot_net/wordpress/?p=5
Compiling the sample code (LED_Blink) goes smoothly. Both hex and binary files are built. But trying to run or debug the code in the target produces an error:
+==============================================
| Error in final launch sequence
| Failed to execute MI command:
| -exec-run
| Error message from debugger back end:
| Don't know how to run. Try "help target".
| Don't know how to run. Try "help target".
+==============================================
gdbserver did start. When it does, the Discovery board LED's stop flashing.
I can manually run gdb from the command line and load binaries into the target. That part works. It's awkward to use... but it does work. However, the Eclipse debugging end of things ... won't run due to the problem above.
A cut/paste from a log file is attached below.
A .gdbinit file is called out in the debugger setup pane... but I haven't been able to find it in either the Workspace or Eclipse trees.
Is there a way to suppress the "-run-exec" that's bothering gdb ? Or have I loaded the wrong CDT package?
!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2012-02-07 12:08:50.312
!MESSAGE Error in final launch sequence
!STACK 1
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run. Try "help target".
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:114)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:211)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:98)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:87)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.Exception: Don't know how to run. Try "help target".
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:889)
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:720)
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2012-02-07 12:08:50.312
!MESSAGE Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run. Try "help target".
!STACK 0
java.lang.Exception: Don't know how to run. Try "help target".
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:889)
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:720)
]]>Mark Becker2012-02-07T18:05:56-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/793054/#msg_793054
when doing remote debugging, eclipse should be sending -exec-continue and not -exec-run. Which version of eclipse are you using?
You may want to look at this description on how to do remote debugging: http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_debug_a_remote_application.3F
Marc]]>Marc Khouzam2012-02-07T18:13:22-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/793059/#msg_793059
Thank you for your quick response. Appreciated.
Eclipse IDE for C/C++ Developers
Version: Indigo Service Release 1
Build id: 20110916-0149
Mark
]]>Mark Becker2012-02-07T18:19:55-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/793061/#msg_793061
Also, be aware that you can look at all the communication with GDB from the 'gdb traces' console: http://wiki.eclipse.org/CDT/User/FAQ#I.27ve_been_asked_for_.27gdb_traces.27.2C_where_can_I_find_them.3F
Marc
]]>Marc Khouzam2012-02-07T18:22:49-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/793089/#msg_793089
This is only a little ..frustrating.
Now Eclipse is saying:
> Error while launching command: gdb --version
Think I'd better stare at the document Real Hard and see what's going on.
Mark
]]>Mark Becker2012-02-07T19:14:53-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/793093/#msg_793093
Go to
Run-> Debug Configurations...
select your launch
got to the Debugger tab and look at the location of gdb.
And here's the server in External Tools Configurations:
F:\Program Files\TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0\Servers\ST-LINK_gdbserver\ST-LINK_gdbserver.exe
The config file for ST-LINK_gdbserver.exe specifies port 61234 .. and so does the entry in Eclipse for launching the debugger.
There's a C/C++ Remote Application entry in the Debug Configurations pane but I cannot specify it to do anything. Eclipse keeps renaming the any entry to something else... and then more error messages pop up.
Just loaded RSE .. and it's not in the Debug Configurations pane.
Back to reading web pages...
Mark
]]>Mark Becker2012-02-07T20:46:24-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/794059/#msg_794059
Tuesday evening I *finally* got things to the point where the project could be compiled, linked, *and* got the debugger running. And I did it three more times, from Ground Zero, just to make sure getting the configuration right wasn't a fluke. Went home.
Return Wednesday... and nothing worked properly. Spent most of Wednesday re-jumping through hoops to get it running again. This time I took notes.
Here's what I did for creating a new debug configuration.
Run --> Debug Configurations brings up a large pane titled "Debug Configurations".
Right-click under GDB Hardware Debugging and create a new configuration. When I did this with the project set to "LED_Blink", the name of the generated configuration was set to "LED_Blink Debug".
In the Main tab, The C/C++ Application is set to Debug\LED_Blink.elf .
Project was set to LED_Blink.
Just below that there is the boxed area labeled "Build (if required) before launching".
Build configuration --> Use Active .
The radio button for "Use workspace settings" is on.
At the bottom of that pane, it has "Using GDB (DSF) Hardware Debugging Launcher". Left-clicking on "Select other" brings up a "Select Preferred Launcher" pane. At the bottom of that, under "Description" it has, "Jtag hardware debugging u sing the Debugger Services Framework (DSF)". I didn't change that.
Back in the Debug Configurations pane, there is the Debugger tab. I have the GDB command set to CodeSourcery's arm-none-eabi-gdb.exe . The boxed area labeled "Remote Target" has the "Use remote target" checkboxed checked. JTAG Device is "Generic TCP/IP", host name is localhost, and the port number is 61234.
-----
Now.. I select the C++ perspective, select Console, and start gdbserver (per directions in the sharee site). It's pretty obvious when the server successfully starts. That.. and the STM32F407 board stops flashing those four LED's and LD1 flashes red and green.
Whapping F11 (Debug) brings up the Debug perspective... and one long moment later up pops all the pretty debugging windows. It comes up in startup_stm32f4xx.S.
After all that... now I think I can start writing code.
======
Remaining problems:
1. In the Problems tab, there are eight errors of symbols that could not be resolved. One header file had not been #include'd so that was fixed. The source code now compiles... but Eclipse seems unable to resolve those eight symbols.
(It calls this a "Semantic Error". But the compiler compiles it anyway.)
2. According to the user manual for the Discovery board, jumpers can be changed to put RAM at address 0x0 which might be a good idea while debugging. I'm a little unsure as to what to change in the .ld file to get all the modules in the right places to make that happen properly.
Cheers.
Mark
]]>Mark Becker2012-02-08T22:03:02-00:00Re: -run-exec in Eclipse --> CodeSourcery/arm-none-eabi-gdb --> gdb --> Atollic/gdbserver ?
https://www.eclipse.org/forums/index.php/mv/msg/287085/794786/#msg_794786
I'm glad you made such good progress.
> 1. In the Problems tab, there are eight errors of symbols that could not be resolved.
> One header file had not been #include'd so that was fixed. The source code now compiles...
> but Eclipse seems unable to resolve those eight symbols.
I'm no expert on build. I'd google it. Or maybe someone else can jump in.
> 2. According to the user manual for the Discovery board, jumpers can be changed to put RAM at
> address 0x0 which might be a good idea while debugging. I'm a little unsure as to what to change
> in the .ld file to get all the modules in the right places to make that happen properly.