Author Topic: Debugging an MSP430  (Read 1759 times)

0 Members and 1 Guest are viewing this topic.

Offline RFZTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: de
Debugging an MSP430
« on: June 21, 2026, 04:24:02 pm »
So, I'm currently debugging an issue with an MSP430F2252 microcontroller. I'm running Windows.

I've downloaded https://gnutoolchains.com/msp430/ which includes "mspdebug.exe".

My issue is: Once the code is halted using the debugger, it will never run normally again. Whenever I issue "run" it only executes a few cycles and then halts again.

When I start the debugger, the IC is hold in reset. When I then issue "run", it runs. When I hit "CTRL+C" it halts. So far so good.
When I then issue "run" again, it halts again after just a few cycles. Same if I reset and "run".

See:
https://youtu.be/abnVCSkxTNw

Any Ideas? This is not an issue with the MCU I'm debuging. It also happens with the MCU on the Launchpad.

I've spent half of the day trying to compile https://github.com/dlbeer/mspdebug my own because it's available in v0.26 and the gnutoolchains only was v0.22 and it's a PITA to find ANY binaries.
However, after I kind of succeeded, I have the same issue with v0.26.

Is this an issue with the TI LaunchPad MSP-EXP430G2 I use as debugger?
 

Offline josip

  • Regular Contributor
  • *
  • Posts: 175
  • Country: hr
Re: Debugging an MSP430
« Reply #1 on: June 28, 2026, 06:54:49 am »
Why mspdebug? On Windows? Today?

When all TI software/hardware msp430 related tools are open source and working on any OS.

I don't know what is the last version of "msp430.dll" that support old G2 LP, but I guess it is not so hard to find out.

Just replace "msp430.dll" (that is also open source) in any TI tool with last one that support old G2 LP, and it should be fine.
 
The following users thanked this post: Smokey

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 8459
  • Country: ro
Re: Debugging an MSP430
« Reply #2 on: June 30, 2026, 11:48:50 am »
Don't know to answer your question.  It can be a million reasons for why your GDB install does not work.  The GNU GDB is a 3rd party debugger, it was not made for this particular MCU.  However, the TI debugger (IIRC a GDB customised by TI) should work flawlessly.  Or at least that's how I remember the TI debugger from when I was fooling around with MSP430.

My recommendation would be to use a virtual machine (VM), and install inside that VM all the TI's proprietary toolchain/compilers from 10-20 years ago.  They can be found and downloaded from the TI SW archives for free (so, do not install the latest/current SW, go for the versions that were in use while your MCU was at its peak selling).  Licenses that used to be payed compiler license are now free to use (by TI, not talking about hacking, you can download the TI compilers full license from the TI SW archives, for free).

Those proprietary TI compiler and debuggers versions used to work better, and often produce smaller code than the most recent versions.  AFAIK, older (upto v7 IIRC were GPL licensed anyway, a GNU/GCC toolchain which was heavily customized by TI, but this is fade memory and don't have any evidence right now, so don't quote me on it). 

Anyways, install the old TI toolchain in a VM, then save the VM on your disks, and keep that VM and all the MSP430 devtools isolated (offline).  If the TI SW was good enough 10-20 years ago, it is certainly just as good today for the same old MCUs.  :)

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: de
Re: Debugging an MSP430
« Reply #3 on: June 30, 2026, 06:26:33 pm »
So, I'm currently debugging an issue with an MSP430F2252 microcontroller. I'm running Windows.

I've downloaded https://gnutoolchains.com/msp430/ which includes "mspdebug.exe".


Forget this. Use Code Composer. It's free, has better compilers and a better debugger.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf