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.

IAR programming (EZ430-F2013) question



When I insert the USB to the computer I can see it flashes the LED. I load the sample code of that program and changes the i value so the LED blinking speed will alter.

I build the project and click download and debug under the project menu. Since I have the FET configured, the code is downloaded but I need to disconnect and reconnect the USB in order to get it to work again. Is this normal?

Also, is there a way to download the code without starting the debugger?

  • Do not know what you mean by "is there a way to download the code without starting the debugger".

    With the IDE, after compile/assemble and Link, you can choose to "debug without download" or "download and debug". Either way you enter the debugger. At that point, you can start to run, set break points and run, run until it reaches where the cursor is, single step one instruction at a time, automatically step through the code at a slow pace, etc.

    If you do not want to use the debugger, you can exit the debugger. You can also start to run and tell it to keep running and exit the debugger.

    Also, you can use a "programmer" to download the object code into the target without using the debugger to begin with. But you cannot use the debugger to to download the code and yet without using the debugger.

     

  • Hi,

    you can use TI's MSP-FET430UIF (JTAG Interface) or any eZ430 Tool and the software FET-PRO430 Lite from Elpotronic for programming (downloading without starting the debugger?) your MSP430 (this software allows to program a hex file) .

    You can find the FET-PRO430 Lite software here: http://www.elprotronic.com/download.html

    Rgds
    aBUGSworstnightmare

  • Maybe I wasn't clear enough in my question... I am used to work with Atmel's AVR Studio where I can compile the code and download it to the target without opening a debugger. Off course the MCU might be inside the destination circuit or not.

    After I make the project I can select either "download and debug" or "debug without downloading" but the "download" sub-menu options are always grey (download active project / download file).

  • Hi Tom,

    well, I must say that I don't understand the logic behind! I either want to debug a Target, or I want to run my code without a debugger (and then redownload it in case I need to debug it again).

    So, let's say that IAR is not a programming software (since AVR Studio has this functionaity implemented); you will need to use a third party SW for this purpose.

    Rgds
    aBUGSworstnightmare

  • So what you are saying is that the development for MSP430 is different than what I got used to using AVRs? IAR is not the equivalent to AVR Studio. For MSP430 I write code using a 3rd party software and use IAR for simulating & debugging? Also it can be used for writing the code and download it to the target...

  • Hi Tom,

    no that's not what I'm saying!

    IAR is an integrated development environment (IDE) for writing (in C and/or assembly language) and debugging (or simulating) code. So, using IAR you can develop and debug your code.

    In case of simple flashing (let's say this instead of programming) you usually have an i.e. Intel .hex-file, a Motorola S-Record file or something like this (remebmer: you have never programmed a .coff file (this is the debug file format which is needed when using AVR studio) when you did ISP programming of your AVRs; you always got a .hex file) which you want to program to a target (i.e. in your production).

    This needs to be done using another software than IAR Embedded Workbench (i.e. the one mentioned above).

    Tom Stern said:
    IAR is not the equivalent to AVR Studio.

    Well, does Studio come with a C-Compiler? No, it doesn't! You need to install GCC vor AVR. Does it support flashing an AVR (programming; using an AVR-ISP, STK500/600, ..)? Yes, but you're using another functionality than you're using when debugging.
    Rgds
    aBUGSworstnightmare
  • Hi,

    forgot a point to mention!

    I never used AVR Studio when developing with AVR! I used IAR's Embedded Workbench instead. I've also used it for developing code for MSP430, NEC 8-bit (78k0) and 32-bit  (V850) Micros, and some Renesas parts.

    The advantage of such a tool is: You do not need to bother on the Compiler or debugger software/functionality. You're working with a tool your familiar with and this is shortening your development time (TIME IS MONEY)!

    Well, now I'm also working with TIs Eclipse based CCS, but that's a different story (by the way: Eclipse tools were also used for AVR32 and LOTS of other manufactures micros).

    Rgds
    aBUGSworstnightmare 

  • Thanks for the detailed answers. It is pretty hard to get this info from the web (was easier to get it for AVRs, that's why I ended up using them). So the main difference is that the actual flashing should be done using a dedicated tool? The main functionality of this software is using it to emulate the code in circuit?

    So this brings me to my last question... the EZ430-F2013 is a product used to evaluate the CPU / coding? Seems to me like it is not really for developing a complete project unless I will solder wires to the target board while attached to the USB stick. I thought it is something like a JTAG programmer but not really?

  • Hi Tom,

    well, eZ430-F2013 is a tool which is supporting only some MSP430 devices in Spy-Bi-Wire mode (something like atmels debugWire Debug mode. The eZ430-F2013 is the oldest of all eZ430xx ones.
    The eZ430U (this is the USB part of the tool) of the CHRONOS package has the latest firmware and is supporting more MSP430 devices (but only Spy-Bi Wire!).

    The real 'JTAG debugger' is MSP-FET430UIF (supporting all MSP430 devices in JTAG ans Spy-Bi-Wire mode) which can be compared to Atmels AVR-JTAGICE MKII.

    You can use both of them for code development and (with the right software) as In-Circuit Programmers (ISP programming).

    Hope this helps!
    aBUGSworstnightmare

  • The following 3rd party has a programmer GUI I have used with the TI MSP430 USB FET tool:

    http://www.elprotronic.com/download.html

    I used:

    Flash Programmers for TI's MSP430 MCU uses TI's FET Adapter.
    * FET-Pro430 * - Flash programming software uses TI's FET - USB (MSP-FET430UIF), EZ430 or parallel port (MSP-FET430IF) adapter.

  • Looks like this thread slipped my attention.

    I think the main cause of confusion is the wa things work uder the surface. It has influenced the development of the tools.

    I was also use to use a programmer after compilation and then, if I want, to start a debugger. That's the way it works for PC software (compile - install - debug), for the AVR (compile - write to AVR - debug) and for most other devices. It is the traditional way and people got used to it. When I started with MSP, I used the existing mspgcc setup and there it was similar. The was a debugger available, but  you could just call the msp430-jtag.exe and flash the copiled program to the MSP.The debugger there was the linux GDB, using a smal program named gdbproxy to do the JTAG connection.

    IAR and CCS are different. Why? To understand this you must udnerstand that for all other processors, JTAG was an option, but not the default way to program the device. The 8052 used an eprom burner, AVE has the STK500 serial downloader etc. The upcoming of JTAG was just another option and was treated liek the other way when implemented into the newer devices of the existing processor series.

    MSP started with JTAG right away and as the standard way of programming. So how does JTAG programming work? It, well, debugs the processor. During this debug session, the programming software injects code into the processor ram and executes it. THis code will then copy it attached data part into flash. Piece by piece. So when programming the MSP, you're in fact opening and establishing a debug session.
    Since this always was the default method for MSPs, the download feature has been included into the debugger as a 'macro' of the already established debug session, rather than programming the whole thing twice and separate it into two programs.
    YOu can even manually do what the program downlaoder does automated and download your own code by poking into the attached MSPs memory.

    I msut admit, however, that a 'download and run' option in addition to the 'debug with or without download' options would be a useful thing. The debugger would still be run to do the download, but it could do so silently, and exit after completion.
    Due to my mspgcc background (and the fact that the debugger cannot freeze external realtime events, liek incoming radio waves), I never used a debugger at all on the MSP. I always downloaded and let it run.

**Attention** This is a public forum