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.

How to Make a New Project Using IAR - Step by Step

IAR can be downloaded here: http://focus.ti.com/docs/toolsw/folders/print/iar-kickstart.html

1. Open IAR. Inside the startup window click the first button: “Create new project in current workspace.”

2. Select Tool Chain: MSP430 and the “Empty project” Template, then click OK.

3. Then you will be asked to name and save your project. Please choose the desired directory and name. Click “OK.” Then your project should appear in the upper left-hand side of the screen. Right-click on it then choose “options.”

4. Inside the options: go to -> General Options category and choose the appropriate MSP430 device. If you are going to be programming in assembly language, also check the “Assembler-only project” box in the lower-right hand side of the screen. If you are programming in C, please leave this box unchecked.

5. For C project please verify that the “Library Configurations” tab has “CLIB” chosen for the library. For assembly projects this option should be selected as “none.”

6. Next select the “Debugger” category on the left-side of the screen. Choose “FET Debugger” under the “Driver” category. For C projects please make sure “Run to main” is checked.

 

 

7. Finally under the “FET Debugger” category please make sure the appropriate hardware programmer is selected under “Connection” and the appropriate JTAG protocol is selected under “Debug protocol.” Next click OK. These should be the only changes necessary to build a simple code and load it onto your MSP430.

NOTE: The Spy-Bi-Wire mode is not supported by the Parallel Programmer (MSP-FET430PIF), when LPTx is selected.

8. Now we are ready to load our code file onto your MSP430. To do this, right-click on your project and go to Add -> Add files. Browse to your code file with a “.c” C-file or “.s43” assembly file.

NOTE: Texas Instruments has an extensive MSP430 code example library available at www.MSP430.com under the “Code Examples” tab. It is recommended to utilize this library to reduce code development time.

9. Now your code should be added to your project. If you double-click on the newly added code file the text should appear in the main window.

 

 

10. Now we are ready to load our code onto the MSP430. Once your MSP430 is connected to your PC via hardware programmer, go to the “Project” menu and choose “Debug.”

You will be asked to name your workspace. Please choose the desired name and directory and click “OK.”

 

11. You should now be in the Debugger. The code is now loaded onto your MSP430. To run this code choose “Go” under the “Debug” menu. Alternatively there is a go button in the upper left-hand side of the screen.

  • I've got some problems about this tutorial.

    5. For C project please verify that the “Library Configurations” tab has “CLIB” chosen for the library. For assembly projects this option should be selected as “none.”
    In my settings, doesn't show any Libs at all to select.

    6. Next select the “Debugger” category on the left-side of the screen. Choose “FET Debugger” under the “Driver” category. For C projects please make sure “Run to main” is checked.
    The checkbox "Run to main" is disabled, can't check it.

    Even then, I tried to debug my code. It shown no errors. But when I try to step over, it just doesn't go through the code lines. Just keeps through those FFFF addresses at the window called "Disassembly".

    Any tips about what could be wrong?

    Thanks!

  • I just  realized that those missing settings above on steps 5 and 6, are only disable for MSP430FG4618. If I choose any other uC, I can pick from libraries. How's that possible?

    I have installed IAR several times, running any kind of different configurations, with no success.

    Please, if someone could help me, I'll appreciate!
    Thanks fellows!

  • Have you any more details about using other library ? Your tutorial is usefull for setting up IAR to blink a LED, have you informations about including C++ library ?
    Thank you !

**Attention** This is a public forum