Hy,
 
I want to debug my applications with GDB. After installation and configuration I tried
to debug CountLeds (aka Blink) from Moteiv, which works fine. But now I would like to
automate some behaviours, e.g. to print out some data, when a breakpoint stops my
application if a condition is true.
 
So I set a conditional breakpoint including some commands (see Cygwin console #2,
lines 57->65), but neither the condition nor the commands were considered.
The debuger stops the program, as if there was no condition and didn't executes the
commands (see Cygwin console #2,lines 77->80).
 
To verify my inputs I used the command "info breakpoints", which displayed the
breakpoint properties I assigned (see Cygwin console #2,lines 66->73).
A manually check of the condition (variable) showed that the _expression_ (relational
operator) was not true (see Cygwin console #2,lines 81->82).
 
Perhaps someone was able to implement those kind of breakpoints and can help me
now.
I'm using Windows XP, Boomerang 2.0.4, GDB 6.0 and TMote Sky.
 
Best regards,
                    Ole Bischoff
 
 
---------------------------------------------------------------------------------------------------------------------------
 
Cygwin console #1
01 [EMAIL PROTECTED] ~
02 $ msp430-gdbproxy --port=2000 msp430
03
04 Remote proxy for GDB, v0.7.1, Copyright (C) 1999 Quality Quorum Inc.
05 MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood
06
07 GDBproxy comes with ABSOLUTELY NO WARRANTY; for details
08 use `--warranty' option. This is Open Source software. You are
09 welcome to redistribute it under certain conditions. Use the
10 '--copying' option for details.
11
12 debug: MSP430_Initialize()
13 debug: MSP430_Configure()
14 debug: MSP430_VCC(3000)
15 debug: MSP430_Identify()
16 info:      msp430: Target device is a 'MSP430F1611' (type 42)
17 debug: MSP430_Configure()
18 notice:    msp430-gdbproxy.exe: waiting on TCP port 2000
19 notice:    msp430-gdbproxy.exe: connected
20 debug: MSP430_Registers(READ)
21 debug: command '6572617365'
22 debug: command 'erase'
23 debug: executing target dependant command 'erase'
24 debug: MSP430_Memory(WRITE)
25 debug: MSP430_Memory(WRITE)
26 debug: MSP430_Memory(WRITE)
27 debug: MSP430_Memory(WRITE)
28 debug: MSP430_Memory(WRITE)
29 debug: MSP430_Memory(WRITE)
30 debug: MSP430_Memory(WRITE)
31 debug: MSP430_Memory(WRITE)
32 debug: MSP430_Memory(WRITE)
33 debug: MSP430_Memory(WRITE)
34 debug: MSP430_Memory(WRITE)
35 debug: MSP430_Memory(WRITE)
36 debug: MSP430_Memory(WRITE)
37 debug: MSP430_Memory(WRITE)
38 debug: MSP430_Memory(WRITE)
39 debug: MSP430_Memory(WRITE)
40 debug: MSP430_Memory(WRITE)
41 debug: MSP430_Memory(WRITE)
42 debug: MSP430_Registers(READ)
43 debug: MSP430_Registers(WRITE)
44 debug: MSP430_Memory(READ)
45 debug: MSP430_Memory(READ)
46 debug: MSP430_Memory(READ)
47 debug: MSP430_Memory(READ)
48 debug: MSP430_Memory(READ)
49 debug: MSP430_Memory(READ)
50 debug: MSP430_Breakpoint(ADD)
51 debug: Set breakpoint in BP reg 0 to 0x5680
52 debug: MSP430_Run()
53 debug: MSP430_State()
54 debug: MSP430_State() 3, (-1 steps)
55 debug: MSP430_Registers(READ)
56 debug: MSP430_Breakpoint(REMOVE)
57 debug: Removed breakpoint in BP reg 0
58 debug: MSP430_Registers(READ)

---------------------------------------------------------------------------------------------------------------------------
 
Cygwin console #2
01 [EMAIL PROTECTED] ~
02 $ cd ../../opt/moteiv/apps/Count/CountLeds/
03
04 [EMAIL PROTECTED] /opt/moteiv/apps/Count/CountLeds
05 $ make tmote debug
06 mkdir -p build/tmote
07     compiling CountLedsC to a tmote binary
08 ncc -o build/tmote/main.exe -O1 -g -fnesc-no-inline -Wall -Wshadow -DDEF_TOS_AM_
09 GROUP=0x7d -Wnesc-all -target=tmote -fnesc-cfile=build/tmote/app.c -board= -I..
10 -I/opt/moteiv/tos/platform/tmote -I/opt/moteiv/tos/platform/tmote/util/uartdetec
11 t -I/opt/moteiv/tos/platform/msp430/adc -I/opt/moteiv/tos/platform/msp430/dac -I
12 /opt/moteiv/tos/platform/msp430/dma -I/opt/moteiv/tos/platform/msp430/resource -
13 I/opt/moteiv/tos/platform/msp430/timer -I/opt/moteiv/tos/platform/msp430 -I/opt/
14 moteiv/tos/lib/util/pool -I/opt/moteiv/tos/lib/util/button -I/opt/moteiv/tos/lib
15 /util/null -I/opt/moteiv/tos/lib/util -I/opt/moteiv/tos/lib/MultiHopLQI -I/opt/m
16 oteiv/tos/lib/netsync -I/opt/moteiv/tos/lib/sp -I/opt/moteiv/tos/lib/sp/cc2420 -
17 I/opt/moteiv/tos/lib/timer -I/opt/moteiv/tos/lib/resource -I/opt/moteiv/tos/lib/
18 sched -I/opt/moteiv/tos/lib/Deluge -I/opt/moteiv/tos/lib/Flash/STM25P -I/opt/mot
19 eiv/tos/lib/Flash -I/opt/moteiv/tos/lib/Spram -I/opt/moteiv/tos/interfaces -I/op
20 t/moteiv/tos/lib/CC2420Radio -I/opt/moteiv/tos/system -I/opt/moteiv/tinyos-1.x/t
21 os/lib/CC2420Radio -I/opt/moteiv/tinyos-1.x/tos/lib/Drip -fnesc-scheduler=TinySc
22 hedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask -Wl,--sec
23 tion-start=.text=0x4800,--defsym=_reset_vector__=0x4000 -DLIB_DELUGE -DDELUGE_NU
24 M_IMAGES=6 -mdisable-hwmul -I%T/lib/Deluge -Wl,--section-start=.text=0x4800,--de
25 fsym=_reset_vector__=0x4000 -DIDENT_PROGRAM_NAME=\"CountLedsC\" -DIDENT_USER_ID=
26 \"MASCHINE\" -DIDENT_HOSTNAME=\"sweetrobot\" -DIDENT_USER_HASH=0xd566ae77L -DIDE
27 NT_UNIX_TIME=0x44eae24eL -DIDENT_UID_HASH=0x3a54bb1fL CountLedsC.nc -lm
28     compiled CountLedsC to build/tmote/main.exe
29             5716 bytes in ROM
30               50 bytes in RAM
31 msp430-objcopy --output-target=ihex build/tmote/main.exe build/tmote/main.ihex
32     writing TOS image
33
34 [EMAIL PROTECTED] /opt/moteiv/apps/Count/CountLeds
35 $ cd build/tmote/
36
37 [EMAIL PROTECTED] /opt/moteiv/apps/Count/CountLeds/build/tmote
38 $ msp430-gdb main.exe
39 GNU gdb 6.0
40 Copyright 2003 Free Software Foundation, Inc.
41 GDB is free software, covered by the GNU General Public License, and you are
42 welcome to change it and/or distribute copies of it under certain conditions.
43 Type "show copying" to see the conditions.
44 There is absolutely no warranty for GDB.  Type "show warranty" for details.
45 This GDB was configured as "--host=i686-pc-cygwin --target=msp430"...
46 (gdb) target remote sweetrobot:2000
47 Remote debugging using sweetrobot:2000
48 0x00004000 in ?? ()
49 (gdb) monitor erase
50 Erasing target flash - all... Erased OK
51 (gdb) load main.exe
52 Loading section .text, size 0x1652 lma 0x4800
53 Loading section .data, size 0x2 lma 0x5e52
54 Loading section .vectors, size 0x20 lma 0xffe0
55 Start address 0x4800, load size 5748
56 Transfer rate: 1483 bits/sec, 319 bytes/write.
57 (gdb) break 'LedsC$Leds$set' if CountLedsP$m_count<5
58 Breakpoint 1 at 0x5680: file /opt/moteiv/tinyos-1.x/tos/system/LedsC.nc, line 16
59 8.
60 (gdb) commands
61 Type commands for when breakpoint 1 is hit, one per line.
62 End with a line saying just "end".
63 >printf "m_count = %d\n", CountLedsP$m_count
64 >continue
65 >end
66 (gdb) info Breakpoints
67 Num Type           Disp Enb Address    What
68 1   breakpoint     keep y   0x00005680 in LedsC$Leds$set
69                                        at /opt/moteiv/tinyos-1.x/tos/system/Leds
70 C.nc:168
71         stop only if CountLedsP$m_count < 5
72         printf "m_count = %d\n", CountLedsP$m_count
73         continue
74 (gdb) continue
75 Continuing.
76
77 Program received signal SIGTRAP, Trace/breakpoint trap.
78 LedsC$Leds$set (ledsNum=1 '\001')
79     at /opt/moteiv/tinyos-1.x/tos/system/LedsC.nc:168
80 168         atomic {
81 (gdb) printf "m_count = %d\n", CountLedsP$m_count
82 m_count = 1
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to