platformio / platform-timsp430

TI MSP430: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/timsp430
Apache License 2.0
19 stars 17 forks source link

Unable to use mspdebug tool using MSP430G2452 #15

Open JJeng opened 4 years ago

JJeng commented 4 years ago

Ran into the same issues mentioned in community post here PIO versions: Home 3.0.1 Core 4.1.0 on Visual Studio Code 1.41.1 for Windows Modification made to piomisc.py:324 to allow debug mode to compile. debug_flags = ["-O0", "-g3", "-ggdb", "-gdwarf-2"]

Debug Console Output:

Processing debug (platform: timsp430; board: lpmsp430g2452; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/timsp430/lpmsp430g2452.html
PLATFORM: TI MSP430 2.2.0 > TI LaunchPad MSP-EXP430G2 w/ MSP430G2452
HARDWARE: MSP430G2452 16MHz, 256B RAM, 8KB Flash
DEBUG: Current (mspdebug) On-board (mspdebug)
PACKAGES: toolchain-timsp430 1.40603.190926 (4.6.3), framework-energiamsp430 1.10807.190926 (1.8.7)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 18 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Checking size .pio\build\debug\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
DATA:    [=         ]   8.6% (used 22 bytes from 256 bytes)
PROGRAM: [==        ]  17.6% (used 1444 bytes from 8192 bytes)
========================= [SUCCESS] Took 2.94 seconds =========================

Environment    Status    Duration
-------------  --------  ------------
lpmsp430g2452  IGNORED
debug          SUCCESS   00:00:02.944
========================= 1 succeeded in 00:00:02.944 =========================
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.
----------------- NOTE ------------------
Modified version of mspdebug for Energia
            Do not use standalone
-----------------------------------------
Chip info database from MSP430.dll v3.3.1.4 Copyright (C) 2013 TI, Inc.

Using new (SLAC460L+) API
MSP430_GetNumberOfUsbIfs
Reading symbols from c:\Users\JJeng\Documents\PlatformIO\Projects\test1\.pio\build\debug\firmware.elf...
done.
PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = mspdebug
PlatformIO: Initializing remote target...
MSP430_GetNameOfUsbIf
Found FET: HID0092:COM3
MSP430_Initialize: HID0092:COM3
Firmware version is 20409001
MSP430_VCC: 3000 mV
MSP430_OpenDevice
MSP430_GetFoundDevice
Device: MSP430G2xx2 (id = 0x00cf)
2 breakpoints available
MSP430_EEM_Init
Chip ID data:
  ver_id:         5224
  ver_sub_id:     0000
  revision:       00
  fab:            a0
  self:           0000
  config:         00
Device: MSP430G2xx2
Bound to port 2000. Now waiting for connection...
Client connected from 127.0.0.1:57272
Clearing all breakpoints...
Connection closed
MSP430_Run
.pioinit:11: Error in sourced command file:
Remote register badly formatted: T0500:00e00000;01:fc020000;02:00000000;03:00000000;04:eb990000;05:085a0000;06:02000000;07:40000000;08:aa000000;09:00000000;0a:ffff0000;0b:22000000;0c:c0000000;0d:02000000;0e:0e000000;0f:ec7b0000;
here: 0000;01:fc020000;02:00000000;03:00000000;04:eb990000;05:085a0000;06:02000000;07:40000000;08:aa000000;09:00000000;0a:ffff0000;0b:22000000;0c:c0000000;0d:02000000;0e:0e000000;0f:ec7b0000;
paccerdk commented 4 years ago

Having the same issue (Remote register badly formatted) with an msp430g2230, using the following platformio.ini configuration:

[env:msp430g2230]
platform = timsp430
board = lpmsp430g2231
board_build.mcu = msp430g2230
board_build.f_cpu = 16000000L
debug_tool = mspdebug
debug_build_flags = -O0 -g3 -ggdb -gdwarf-2

home: 3.1.0-rc.2, core: 4.1.1b9 (on vscode)

glingy commented 4 years ago

It's been a while, but I wanted to add this similar thread in case anyone's still having similar issues.

https://community.platformio.org/t/badly-formatted-error-during-debug/13916/2

rei-vilo commented 3 years ago

It seems Platformio doesn't launch mspdebug automatically, as I experienced at https://github.com/platformio/platform-timsp430/issues/17#issuecomment-813002528.

However, Platfomio doesn't launch mspdebug automatically. I have to open a Terminal window and run ./mspdebug tilib gdb manually.