EmbeddedRelated.com
Forums

msp430 beginner

Started by darknightx April 6, 2008
Hi.

I recently bought a msp-fet430u80 kit form TI and installed MSPGCC . Im
used to make desings with PICs from Microchip but this TI MCU for me is
really new and I think that I require a little bit of help, so if somebody
just can advice me or answer this message, could probably help me a lot.

My questions/troubles are:

1- Is there any C command guide for MSPGCC in where I can read how to use
the instructions ( C instructions)

2-Does mspgcc for example can understand code like this:

ME1=0X40;       //usart 0 spi enable
IE1=0XC0;       //usart 0 interrupt enabled
UCTL0 |= SYNC;
UCTL0 |=STC;  
UCTL0 |=FF;   

3- Where can I find source code and examples for  mspgcc  in order to
learn how the programming structure is?


Thanks



On 2008-04-06, darknightx <erickelmalo@gmail.com> wrote:

> I recently bought a msp-fet430u80 kit form TI and installed > MSPGCC . Im used to make desings with PICs from Microchip but > this TI MCU for me is really new and I think that I require a > little bit of help, so if somebody just can advice me or > answer this message, could probably help me a lot. > > My questions/troubles are: > > 1- Is there any C command guide for MSPGCC in where I can read > how to use the instructions ( C instructions).
I'm not sure what you're asking. If you're asking how to use the toolchain, then look here: http://mspgcc.sourceforge.net/manual/ http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/ http://www.mikrocontroller.net/en/mspgcc
> 2-Does mspgcc for example can understand code like this: > > ME1=0X40; //usart 0 spi enable > IE1=0XC0; //usart 0 interrupt enabled > UCTL0 |= SYNC; > UCTL0 |=STC; > UCTL0 |=FF;
Yes.
> 3- Where can I find source code and examples for mspgcc in order to > learn how the programming structure is?
http://mspgcc.cvs.sourceforge.net/mspgcc/examples/ You use google mail, yet don't know how to use google? -- Grant Edwards grante Yow! I want to read my new at poem about pork brains and visi.com outer space...
On Sun, 06 Apr 2008 09:32:39 -0500, Grant Edwards wrote:

> On 2008-04-06, darknightx <erickelmalo@gmail.com> wrote: > >> I recently bought a msp-fet430u80 kit form TI and installed MSPGCC . Im >> used to make desings with PICs from Microchip but this TI MCU for me is >> really new and I think that I require a little bit of help, so if >> somebody just can advice me or answer this message, could probably help >> me a lot. >> >> My questions/troubles are: >> >> 1- Is there any C command guide for MSPGCC in where I can read >> how to use the instructions ( C instructions). > > I'm not sure what you're asking. If you're asking how to use the > toolchain, then look here: > > http://mspgcc.sourceforge.net/manual/ > http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/ > http://www.mikrocontroller.net/en/mspgcc > >> 2-Does mspgcc for example can understand code like this: >> >> ME1=0X40; //usart 0 spi enable >> IE1=0XC0; //usart 0 interrupt enabled UCTL0 |= SYNC; >> UCTL0 |=STC; >> UCTL0 |=FF; > > Yes. >
It'll certainly understand the _code_, but you may want to double-check that the symbols ME1, IE1, etc. are properly defined. Understanding the code is a compiler function, getting the symbols defined is a matter of header files (and possibly library functions). If the compiler barfs on the above then you aren't including the right header. If the linker or locater barfs on it then you need a .o (or .obj) file or a locater command file. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
On Apr 6, 9:39=A0am, "darknightx" <erickelm...@gmail.com> wrote:
> Hi. > > I recently bought a msp-fet430u80 kit form TI and installed MSPGCC . Im
If you have such basic questions then you should start by experimenting with the 4K IAR Kickstart compiler. This will get you some familiarity with programming in C on a different microcontroller.
On 2008-04-06, larwe <zwsdotcom@gmail.com> wrote:
> On Apr 6, 9:39&#4294967295;am, "darknightx" <erickelm...@gmail.com> wrote: >> Hi. >> >> I recently bought a msp-fet430u80 kit form TI and installed MSPGCC . Im > > If you have such basic questions then you should start by > experimenting with the 4K IAR Kickstart compiler. This will get you > some familiarity with programming in C on a different microcontroller.
Unless you're already a Unix/gcc/command-line sort of person. Admittedly, it's pretty unlikely that's the case for somebody who's only exposure to embedded work is the PIC. -- Grant
darknightx wrote:

> 3- Where can I find source code and examples for mspgcc in order to > learn how the programming structure is?
Best place to look is in the "examples" directory of the mspgcc install! It includes the TI- supplied examples plus others including UARTs, TCP/IP, character and graphic LCDs, multitasking etc.