Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb and mspdebug communication #78

Open
jlbirccyn opened this issue Nov 6, 2018 · 7 comments
Open

gdb and mspdebug communication #78

jlbirccyn opened this issue Nov 6, 2018 · 7 comments

Comments

@jlbirccyn
Copy link

Hello,

mspdebug 0.24
msp430-gdb 7.2
Mac OS X 10.11.6

I am trying to debug using gdb and mspdebug. I am using mspdebug 0.24 that comes in Energia distribution and msp430-gdb from Energia too.

./mspdebug tilib gdb

leads to

MSPDebug version 0.24 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2016 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.3.1.4 Copyright (C) 2013 TI, Inc.

Using new (SLAC460L+) API
MSP430_GetNumberOfUsbIfs
MSP430_GetNameOfUsbIf
Found FET: usbmodem1421
MSP430_Initialize: usbmodem1421
Firmware version is 31300001
MSP430_VCC: 3000 mV
MSP430_OpenDevice
MSP430_GetFoundDevice
Device: MSP430FR6989 (id = 0x0160)
3 breakpoints available
MSP430_EEM_Init
Chip ID data:
  ver_id:         81a8
  ver_sub_id:     0000
  revision:       21
  fab:            55
  self:           5555
  config:         20
Device: MSP430FR6989 [FRAM]
Bound to port 2000. Now waiting for connection...

I launch gdb from another terminal and

(gdb) tar extended-remote :2000
Remote debugging using :2000
Remote register badly formatted: T0500:00440000;01:f4230000;02:00000000;03:00000000;04:10080000;05:0c5a0000;06:10080000;07:5aa50000;08:93000000;09:00000000;0a:08d40000;0b:45010000;0c:89510000;0d:00000000;0e:e0530000;0f:00000000;
here: 0000;01:f4230000;02:00000000;03:00000000;04:10080000;05:0c5a0000;06:10080000;07:5aa50000;08:93000000;09:00000000;0a:08d40000;0b:45010000;0c:89510000;0d:00000000;0e:e0530000;0f:00000000;

Best regards

@dlbeer
Copy link
Owner

dlbeer commented Nov 6, 2018 via email

@jlbirccyn
Copy link
Author

Hello

Thanks to take time

Here is the output:

(mspdebug) gdb
Bound to port 2000. Now waiting for connection...
Client connected from 127.0.0.1:62467
Clearing all breakpoints...
starting GDB reader loop...
<- $qSupported:multiprocess+;qRelocInsn+#2a
process_gdb_command: qSupported:multiprocess+;qRelocInsn+
-> $PacketSize=4000#f4
<- $!#21
process_gdb_command: !
process_gdb_command: unknown command !
-> $#00
<- $Hg0#df
process_gdb_command: Hg0
process_gdb_command: unknown command Hg0
-> $#00
<- $?#3f
process_gdb_command: ?
-> $T0500:00440000;01:f4230000;02:00000000;03:00000000;04:10080000;05:0c5a0000;06:10080000;07:5aa50000;08:32000000;09:00000000;0a:f08a0000;0b:ba000000;0c:b92e0000;0d:00000000;0e:f85c0000;0f:00000000;#58
<- $Hc-1#09
process_gdb_command: Hc-1
process_gdb_command: unknown command Hc-1
-> $#00
<- $qC#b4
process_gdb_command: qC
process_gdb_command: unknown command qC
-> $#00
<- $qAttached#8f
process_gdb_command: qAttached
process_gdb_command: unknown command qAttached
-> $#00
Connection closed
... reader loop returned

Best regards

@dlbeer
Copy link
Owner

dlbeer commented Nov 8, 2018 via email

@dlbeer
Copy link
Owner

dlbeer commented Nov 9, 2018 via email

@glingy
Copy link

glingy commented Jun 6, 2020

This is a bit old, but I had the same problem and using msp430-elf-gcc, it works, but Energia's didn't. With those two lines commented out, it seems to work great.

@maxgerhardt
Copy link

-- this bug seems to be preventing the PlatformIO integration for msp430 to be working correctly with gdb (https://community.platformio.org/t/badly-formatted-error-during-debug/13916). Is there a way the program can be patched so it's compatible with newer and older gdb versions?

@michaelde
Copy link

-- this bug seems to be preventing the PlatformIO integration for msp430 to be working correctly with gdb >(https://community.platformio.org/t/badly-formatted-error-during-debug/13916). Is there a way the >program can be patched so it's compatible with newer and older gdb versions?

Thanks for Your hint! Don't know either how to implement this patch for
PlatformIO running on a Windows PC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants