MSP430 with IAR

First of all the question is why IAR why not CCS or GCC, here is my answer

You are learning all these not just for fun, if it is then you may with gcc also. but if you are learning both for fun and career then you should prefer one which is used by industry, and both TI’s CCS and IAR EW costs same, so why not choose the one with multiple compilers in the Same IDE design although they sold all of them individually.

Download the installer from IAR Systems page . Now you can install this with two different modes One is code size limited version Second is full Version Time limited Licences validity. Now click Project-> Create New Project, Now you can choose the language C, C++ or assembly and for c and C++ you can choose template or project with main().

Anyway all these things are useless for geeks  like you. The real question is the headers and the libraries, where are the standard functions and MACROs, how is the C C++ standard differ from other C standards(although embedded C is always a NonStandard C).

Step 1 should be to download The Family User Guide, like if i am using MSP430F149, i should read MSP430x1xx Family User Guide i.e. www.ti.com/lit/ug/slau049f/slau049f.pdf

Default UI based project adds io430.h this includes it need you to define your chip name in define statement i.e. #define MSP430F149

But i will prefer to add the specific header file instead of these chains i.e. msp430f149.h with hardware description of the specific chip.

For delay you may use __delay_cycles(x), which gives delay of x instruction cycles, and one instruction cycles duration=(1/MCLK frequency in Hz)Seconds

Leave a Reply