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.

MCU programming/debugging General Question

Other Parts Discussed in Thread: MSP430F5529, MSP430F5528

Hello,

First of all, the purpose of this question is to get general understanding of MCU programming/debugging.

I don't actually expect to get some in depth answers, but still, some general info, or maybe references to some useful resources for further studying.

Hope, you won't get too bored of reading my post ^_^

My background is: third year EE student, recently took Microcontroller Lab.

At this lab we work with: MSP-EXPFG4618 board. (page link:  http://www.ti.com/tool/msp-exp430fg4618)

I also have MSP430 LaunchPad and MSP430-EXPFR5739 boards at home.

For now, I have some really basic understanding of "how the stuff works", among them:  leds, timers, DAC/ADC outputs  and etc.

Now for the question itself:

In the class we use FET "Debugger" - MSP-FET430IF (link: http://www.ti.com/graphics/tool/msp-fet430uif.jpg) to connect the board and the PC. Unlike MSP430 LaunchPad or FR5739 boads, which have direct USB connection, cause they have emulation circuit on them.

So, till now everything is mostly understandable:

1) I write some code on CCS.

2) Then I connect my board to it via FET debugger or directly via USB.

3) The code is translated to binary and gets to board memory.

4) Everything works fine (hopefully ^_^).

Form this point forward things got bit complicated for me.

The first question raised when I asked myself, how to load the data to MCU when I do not have those "starter boards" with the emulation circuits?

For example: MSP430 Launchpad has two detachable MCU chips (M430G2454 and M430G2353), let's assume for the moment, that I bought those for some prototyping work. So I have CCS software for coding, some passive components (like resistors, caps, transistors), and that's all. Is it possible to transfer my code to MCU? If yes, how it is done?  The same question may be implemented to FR5739 CPU (when bought separately).

Furthermore I got similar questions when I "scavenged"  for some old  TV and Microwave boards, and found some  8bit/4bit  MCUs mounted on them.

For example: Toshiba -something like TMP87CK38N (8bit MCU), so I went  to Toshiba site, and found some datasheets for similar 8bit MCU. They also offer a programming software like CCS, but there was no info regard to how actually load all my code to the MCU. 

I googled more and found some

"Debug Probes" (by iAR and for the rich people ^_^): JTAGjet for ARM7911C and so on.

link (not for add purpose):  https://www.iar.com/Products/E-shop/

There were, some "Programming Adapters" like this one: http://www.wvshare.com/product/GP-QFP144-0.5.htm

One addition thing, I found some info about PIC Micro-controllers, they are producing special boards for programming they chips.(link: http://www.wvshare.com/column/PIC_DevelopmentBoard.htm)  

So finally I got tally frustrated and lost, between all these stuff.

In general, I would like to know:

1) How to load data(code) to MCU itself when it bought separately for prototyping projects?

 For example: for LaunchPad or FR5739 or some Stellaris CPU's or even DSPs.

2) What is JTAG Debugger? I read some WiKi, and if I get them right, JTAG is used for some      
    verification/debugging and additional checks (of what?).

     Especially those debuggers sold by iAR, why are they    
     so expensive and what are they used for (data(code) transfer or something else)?  

3) Do I must use, those RF connections or there is some possibility to load the code via USB cable only?

4) When UART comes to the game? 

I really hope, that my questions are clear and understandable.

Any help, will be greatly appreciated.

Thanks in advance,

Ivan.

 

or "Programming Adapters"  

 

  • Ivan Evstegneev said:

    The first question raised when I asked myself, how to load the data to MCU when I do not have those "starter boards" with the emulation circuits?

    FET's use SBW / JTAG for flashing / debugging target device (slau320 MSP430 Programming Via the JTAG Interface). There is also BSL, that can be used for flashing (not debugging) with some simple glue logic over UART or USB (slau319 MSP430 Programming Via the Bootstrap Loader). Most of MSP430 are coming by default with BSL stored in ROM / Flash.

    Ivan Evstegneev said:

    Furthermore I got similar questions when I "scavenged"  for some old  TV and Microwave boards, and found some  8bit/4bit  MCUs mounted on them.

    Well, it can be MCU with ROM, without possibility to change program, or with external memory, or some special chip (produced just for dedicated product) and development tools not exist or not available outside the company. Also it can be some very old chip, without possibility to find any info / datasheet about it.

    Ivan Evstegneev said:

    1) How to load data(code) to MCU itself when it bought separately for prototyping projects?

    Most of the devices have boot loaders, where with simple glue logic (PC > MCU UART voltage level translator) is possible to update flash contest.

    Ivan Evstegneev said:

    2) What is JTAG Debugger? I read some WiKi, and if I get them right, JTAG is used for some      
        verification/debugging and additional checks (of what?).

         Especially those debuggers sold by iAR, why are they    
         so expensive and what are they used for (data(code) transfer or something else)?  

    IAR is complete development environment with editor, compiler, linker, debugger.

    MSP430 JTAG debugging part is not explained in any TI document, but it is open source.

    http://processors.wiki.ti.com/index.php/MSPDS_Open_Source_Package

    Ivan Evstegneev said:

    3) Do I must use, those RF connections or there is some possibility to load the code via USB cable only?

    4) When UART comes to the game? 

    You can use whatever you want to update flash on MSP430 device. You can also made your own, as I made mine (BSL / SBW hardware and software). There is also now, open source with hardware schematic, MSP430F5528 based eZ-FET lite that is used on MSP430F5529 LP and Wolverine LP, and support all SBW MSP430 devices.

    http://processors.wiki.ti.com/index.php/EZ-FET_lite

  • Ivan Evstegneev said:
    2) What is JTAG Debugger? I read some WiKi, and if I get them right, JTAG is used for some      
        verification/debugging and additional checks (of what?).

         Especially those debuggers sold by iAR, why are they    
         so expensive and what are they used for (data(code) transfer or something else)?  

    Some people say ‘JTAG debugger’ to the FET, the JTAG interface.

    FET actually stands for “Flash Emulation Tool”. Because a FET and an MSP together give a “Flash Emulator”, like those unbelievably expensive replacement CPU simulators for debugging, that were common a decade ago.

    There is the general purpose stand-alone FET430UIF or the built-in eZ430 FETs on the various LaunchPads and experimenter boards. There are also GANG-FETs for production and 3rd-party devices. (We use an Olimex RF FET for field updates)

    Of course calling the FET a JTAG Debugger is wrong, as the FET itself doesn’t debug. It just provides low-level access to the MSP core (through some sort of JTAG). Whether this is used for debugging or firmware upload, depends on the controlling PC software. And the Debugger software on PC could work without knowing that JTAG is being used between FET andf MSP. So "JTAG" and "Debugger" are actually two independent things, just usually used together.

**Attention** This is a public forum