User forums > Embedded development

MSP430 debugging closes immediately after connection

<< < (3/3)

ljstrickler:
Oh, and allow the use of multiple tools (add the setsid command to the beginning of the xterm command line. By effectively creating a command line of

--- Code: ---setsid xterm -e mspdebug rf2500 "opt gdb_loop true" "gdb"
--- End code ---
with setsid as the executable and the rest as the parameters allows me to run multiple commands (the second one kills this one and uploads the data).

oBFusCATed:
ljstrickler: I don't you understand it but I'm not an embedded developer, so all these posts mean almost nothing to me.

About autoconfig/detection - patches are welcome. But keep in mind that in the past the config for the debugger to run was stored in the Compiler plugin, not in the debugger. The debugger currently have very simple auto-detected capabilities.


--- Quote from: ljstrickler on June 04, 2013, 11:54:06 pm ---Have you got a clue as to what needs to be done to get the "Additional shell commands" to actually execute?...

--- End quote ---
How can I get a clue, if you don't tell me the steps needed to reproduce your problem?

I'm not sure what killing, what commands and so on you're talking about (probably gdb-server, but how could I be sure).
Try to write with more meaning/information and less word :)

For setsid, you can try to edit Settings -> Environment -> General -> Terminal...

ljstrickler:
OK, it has nothing to do with embedded programming. I'd use the same types of things to create a serial terminal for talking with a console or GUI that I was developing.

In this example I'll use gcalctool (calculator) but you can substitute any command that leaves something running that you don't care if all instances are stopped (killed).

To understand what I'm talking about try the following,
First to show what I'm trying to do, execute these at the command line

--- Code: ---setsid gcalctool
setsid gcalctool
killall gcalctool

--- End code ---
It should bring up two calculators and then kill them when you execute the "killall" command

Now for the CodeBlocks changes, I'm assuming I don't have to tell you every keypress.
Create a new tool "Calc"
Put setsid in the executable entry and gcalctool in the parameters entry.
Set it for the fourth launching option (visible and detached).
Add another tool "Kill Calc"
Put killall in the executable entry and gcalctool in the parameters entry.
Set it for the fourth launching option (visible and detached).
Exit the tools configuration setup

Start a couple of calcs using the tool entry
Use the Kill Calc tool entry to kill them all.

Open a project
Open the properties of the project
Go to the debugger tab
In the Remote debugging support area at the bottom go to the tab for Additional shell commands
In the Before connection area, enter "killall gcalctool"
According to the tip in this area these will be executed whether there is a remote connection or not.
Save the changes and exit the Project/target options

This project should now be setup so that every time you start the debugger the "killall gcalctool" command would be run before starting the gdb session.

Start a couple of session of gcalctool using the Tools menu
Start debugging the project
The calculators should disappear (get killed) when the killall line is executed
They don't.

Anything more you need?

oBFusCATed:

--- Quote from: ljstrickler on June 05, 2013, 02:08:39 am ---Anything more you need?

--- End quote ---
No...

Navigation

[0] Message Index

[*] Previous page

Go to full version