This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430I2031: Programming with the MSP-FET

Part Number: MSP430I2031
Other Parts Discussed in Thread: MSP-FET, EVM430-I2040SUBMTR, MSP430I2041

Tool/software: Code Composer Studio

I'm new to the TI ecosystem, and I want to create a small project using the MSP430i2031 MCU that I would like to program (and debug) with the MSP-FET device I recently bought.  Is the MSP-FET what I really want for this?  Why does it call itself a "Flash Emulation Tool"?  I don't want to emulate anything!  I want to program and debug for real.  Am I thinking too hard here?  Also, I would really like to use the VisualGDB IDE instead of the CCS IDE.  Can anyone here verify that VisualGDB works okay with the MSP-FET device?  In any case, HOW do ya choose between 4-wire full JTAG and 2-wire JTAG (aka Spy-By-Wire), given that there is no switch on the MSP-FET device?  Finally, does anyone have a COMPLETE MSP430i2031 project to share?  This chip seems really simple, but an EXAMPLE is always worth a thousand manuals.  Thanks.

  • Hi, 

    In the MSP-FET web page, the name is MSP MCU Programmer and Debugger. So if you want to program and debug MSP430i2031, MSP-FET is the right tool. Emulation means MSP-FET to communicate with MSP device and control the MSP device. So it is also called debug probe.

    I am not very familiar with VisualGDB. From VisualGDB web page, it can work with many MCUs for debug, including MSP430. But VisualGDB should reuse some free compiler to compile MSP430, and it will also use some hardware debug probe like MSP-FET, eZ-FET for the MSP430 device debug. From TI, the formal IDE for MSP430 debug is the CCS IDE or IAR IDE. Both IDE support MSP-FET. 

    You don't need to select 4-wire JTAG or Spy-By-Wire. The IDE tool can detect and select the JTAG interface automatically. You can refer to CCS or IAR user menu for details. 

    You can download code example for MSP430i2031 from ti.com: http://www.ti.com/lit/zip/slac676 . You can also find more reference hardware and software from web page http://www.ti.com/product/MSP430I2031/toolssoftware 

    Best Regards,

    Lixin

  • Hello Lixin, and thank you for your prompt and comprehensive reply.  Okay, you (and the VisualGDB folks) have convinced me that the MSP-FET I bought is the programming/debugging device I want.  I'll just ignore the fact that it is labeled a "Flash Emulation Tool".  I have installed the CCS and created a bare project for my MSP430i2041 chip, but it seems to me to be incomplete.  There is no startup code at all, for instance to load the C variables from FLASH to SRAM, or even to initialize the stack-pointer register.  I also created a bare project for this chip with VisualGDB, and it also is incomplete.  It does not have ANY startup code,like that for my ST Micro projects.  The VIsualGDB folks tell me that, yes, VGDB will successfully create projects for the TI MSP chips, but they will not LOOK quite like my STM projects.  In particular, I will not see the name of the TI programmer devices like I see for the STM programmer devices.  They say they have no control over this because they are constrained to use the all-inclusive TI library (msp430.dll).  I have ordered some MSP430i2041 chips and also created a small circuit board to test the chip, so I should have a real test setup in a few days.  I suspect that I will indeed be able to create projects for this chip using either VGDB or CCS, although sometimes I suffer from excessive optimism. :-)  One thing I have given up on, is my new EVM430-i2040SUBMTR device, which seems to be a total waste of 100 $US.  It came with a CD-ROM, but there does not appear to be any CCS project of that board on the CD.  (This crummy CD doesn't even auto-start!).  If and when I do get this thing working, I would be glad to share a small COMPLETE CCS or VGDB project if there is any interest.  Thanks again for your help, Lixin.

    -eNick

  • Hi, eNick, 

    It is recommended to use CCS for the MSP430 project development, programming and debug. 

    For the startup code, I have mentioned in my first reply that you can find the code examples forMSP430i20xx: http://www.ti.com/lit/zip/slac676 

    http://www.ti.com/lit/an/slaa638/slaa638.pdf

    When using CCS to build C code with selected MSP430 device, and if the "#include "msp430.h"" is in your code, the MSP430 compiler and linker in CCS will automatically handle the variables address locating and stack-pointer locating.  You can also search the i2040 in the CCS Resource Explorer and you can also find the i2040 document and code examples with assembly, register level, and Driver Library. 

    If you are not familiar how to use CCS to develop MSP430 firmware, please refer to the Getting Started with Code Composer Studio training video and more videos in the YouTube (there is link in the CCS window).

    Hope this can help you to start development with MSP430 device successfully. 

    Best Regards, 

    Lixin

    Lixin 

  • Hi, eNick, 

    Do you have any other questions about this?

    Regards, 

    Lixin

  • Apologies for the lengthy silence; I was doing other things, while waiting for a circuit board to be made for my MSP430i2041 project.

    Yes I have a question: Why doesn't my program RUN? :-)  I have created a small circuit board hosting the TI MSP430i2041 MCU, and I am able to program it successfully with the TI MSP-FET programmer device. Everything seemed terrific until I noticed that the program does not actually RUN. :-) When I try to debug it, NOTHING happens. The TI MSP-FET device claims to support both full JTAG and 2-wire JTAG (Spy-By-Wire). My circuit uses the 2-wire connection. Note that all this is with VisualGDB; I have not managed to get CCS to work yet, and I guess I will need some time to study the CCS docs.  All my program does is toggle bit #0 of Port1 (after disabling the watchdog timer and setting the port bit to output mode).  Note that I have never (knowingly) used JTAG in my life. Why would I want 4-wire JTAG anyway? Is that significantly FASTER than the 2-wire version, or does it allow more breakpoints or other features, or what?

    -eNick

  • Hi, eNick, 

    TI officially support CCS and IAR for MSP430 device development. We are not familiar with VisualGDB. Please go to VisualGDB to check your questions if you want to develop MSP430 device code in VisualGDB environment. 

    CCS is very simple. Everything (document, example codes) is in the CCS environment for user to develop MSP430 devices. 

    CCS + MSP-FET supports both 4-wire JTAG and 2-wire Spy-By-Wire (SBW). For debug, there is no difference for them. You don't need to use 4-wire JTAG. 2-wire Spy-By-Wire should work without problem in your system. 

    If my post helped solve your issue, please click on the  This resolved my issue    button. 

    Thanks, 

    Lixin 

  • Happy Monday, Lixin,

    Good news!  I got my MSP430i2041 barebones program working fine on my custom circuit board, using VisualGDB.  This is HUGE, because it means that both the program and the circuit board are okay.  I have not yet managed to get it to work using CCS, but that I hope is coming soon.  The one problem is have is that the program will not run after loading, UNTIL I UNPLUG the 14-pin cable from the MSP-FET programmer and then Reset the chip.  (I suspect that this stuff was actually working days ago, and I just didn't know it until now when -- just on a  whim -- I tried unplugging the programmer.

    I certainly have not given up on CCS, and I will not bother you guys here with VisualGDB stuff.  You may be interested to know that the VisualGDB Tech Support folks (who provide EXCELLENT support) spend just as much time telling me to stop asking TI-specific questions as you spend telling me to stop asking VisualGDB related questions. :-)

    I still don't understand WHY both 4-wire JTAG and 2-wire JTAG exist, if, as you say, there is no difference for debugging.  Are you really saying that the 4-wire JTAG is not at least FASTER?  Why does 4-wire JTAG exist at all?  Did it simply come first historically, or what?

    -eNick

  • Hi, eNick, 

    I am happy you got the MSP430i2041 barebones program working fine on your board with VisualGDB. That means your successfully pass the system setup. 

    Regarding the 4-wire JTAG, it is a debug standard in the industry. That is same as your guess - from first historical release. The reason why TI designed 2-wire SBW is some customers would like to use simpler cable connection for debug and to save more pins for GPIO. In fact, 2-wire SBW module convert the 2-wire signals to 4-wire JTAG signals in the MCU which logic is not visible for customers. 

    Hope my answer can help you for your questions. If it resolved your issue, please click on the  This resolved my issue    button. 

    Best Regards, 

    Lixin 

  • Thanks for the JTAG explanation, Lixin.  And thanks much for all the other help!  My MSP430i2041 barebones project is working just fine now, so I will indeed mark this thread Resolved.

    -eNick

**Attention** This is a public forum