User forums > Embedded development

MSP430 linux toolchain with C::B

<< < (2/7) > >>

ywi:
> regs
Use 'info registers'.
pc/r0: 9800  sp/r1: 1cfa  sr/r2: 0000     r3: 0000 
fp/r4: 0000     r5: 5a8c     r6: 0000     r7: 0000 
   r8: 0000     r9: 0000    r10: 0000    r11: 0000 
  r12: 0000    r13: 0022    r14: 0182    r15: 0519 

oBFusCATed:

--- Quote from: ywi on May 11, 2012, 04:08:20 pm ----> Thx, I did not catch that update. I can now configure my own debugger, but I get the following error message when I run it: "Starting the debuggee failed: Don't know how to run." I do not have this message with 10.05 ("do *not* run the debugee" option is disabled in both cases). When I use a custom command file (-x option) I don't get the previous error, I can talk to the proxy, erase and load the flash, but gdb does not seem to release the target from reset, so I cannot debug.

--- End quote ---
Steps to reproduce please, because I don't understand much of what you've written.
Keep in mind that I'm not embedded developer and proxy/reset/erase-load doesn't mean much to me.

ywi:
Case 1 :
=====

I configure the following :
Settings -> Debugger -> GDB Debugger -> MSPGDB -> execute path : /usr/local/bin/msp430-gdb
Settings -> Debugger -> GDB Debugger -> MSPGDB -> arguments :

I run the debugger :

...
Starting debugger: /usr/local/bin/msp430-gdb -nx -fullname  -quiet  -args /projects/cb/test/bin/Debug/test
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.2
Starting the debuggee failed: Don't know how to run.  Try "help target".
Debugger finished with status 0

Case 2
=====

a) I configure the following :
Settings -> Debugger -> GDB Debugger -> MSPGDB -> execute path : /usr/local/bin/msp430-gdb
Settings -> Debugger -> GDB Debugger -> MSPGDB -> arguments : -x /usr/local/msp430/gdb.ini

b) gdb.ini contains commands for the mspdebug proxy :

target remote :2000 // connect to the proxy
erase // erase flash
load // load executable to flash
continue // release CPU from reset

c) I run the proxy, then I run the debugger:

The debugger connects successfully to the proxy, the commands are passed to the proxy and executed successfully. But then I lose control on gdb (I can push the buttons, write commands in the command line, but they are not taken into account).

"do *not* run the debugee". It is disabled in both cases.

oBFusCATed:
Have you tried to setup the remote debugging options for your project in  Project -> Properties -> Debugger-> Remote connection?

p.s. All please enable the full log in the Settings->Debugger, before posting more logs from the debugger...

ywi:
I set the remote connection in Project -> Properties -> Debugger-> Remote connection. It works. I not have the "Don't know how to run" error anymore (Case 1, default setting and not using a command file). I can see the gdb connect to the proxy and send the "continue" command. I then lose control over the command line and the buttons. I can stop gdb only by killing the proxy.

Here is the full log :


--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /projects/cb/test/
Adding source dir: /
Adding file: /projects/cb/test/bin/Debug/test
Changing directory to: /projects/cb/test/.

[debug]LD_LIBRARY_PATH=.:/projects/cb/test:/usr/local/lib:
[debug]Command-line: /usr/local/bin/msp430-gdb -nx -fullname  -quiet  -args /projects/cb/test/bin/Debug/test
[debug]Working dir : /projects/cb/test

Starting debugger: /usr/local/bin/msp430-gdb -nx -fullname  -quiet  -args /projects/cb/test/bin/Debug/test
done

[debug]Reading symbols from /projects/cb/test/bin/Debug/test...done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Connecting to remote target
Setting breakpoints

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.2
[debug]Copyright (C) 2010 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=msp430".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.2

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]No symbol "disassembly" in current context.
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /projects/cb/test/
[debug]>>>>>>cb_gdb:
[debug]> directory /
[debug]>>>>>>cb_gdb:
[debug]> target remote tcp:127.0.0.1:2000
[debug]Queued:[tty /dev/pts/3]
[debug]_reset_vector__ () at ../../../gcc-4.5.3/gcc/config/msp430/crt0.S:118
[debug]/home/toto/msp430/gcc-4.5.3/gcc/config/msp430/crt0.S:118:3824:beg:0x9800
[debug]>>>>>>cb_gdb:

Connected

[debug]> tty /dev/pts/3

At /home/toto/msp430/gcc-4.5.3/gcc/config/msp430/crt0.S:118

[debug]> tty /dev/pts/3
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> continue
--- End code ---

EDIT:
Please use code-tags if you post such an amount of log entries or source-code the next time, because it's much more readable.
I changed your post.

Jens

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version