Hi all,
The mspgcc examples hasn't seen a lot of activity lately. I thought it
was time to change that. :-) I have adapted all the TI packages of
MSP430 example code to work with mspgcc.
For the C examples, only minor changes were needed. The syntax of the
interrupt routine definitions was changed to the mspgcc form. The main
routines were changed from "void main(void)" to "int main(void)".
The assembly language examples needed greater changes. The binutils
assembler supports the same basic syntax as the TI assembler. However,
much of the control syntax is different - DW => .word; ORG => .org and
has a slightly different meaning; hex numbers need to be in the form
0x1234; a number with a leading "0" is octal; etc.
I changed both the C and assembly language examples to include <io.h>,
instead of specific header files for particular devices - its the mspgcc
way :-)
The modified files is now in the mspgcc CVS, along with make files to
build them (the original packages did not include make files). They all
compile cleanly, but I lack the hardware to test many of them.
I have also been looking through the existing examples in CVS. I changed
the TCP/IP example to build nicely with a make file. Previously there
was no make file, and one .c file included all the other .c files -
messy! The tasker and bufferedUSART examples had make files for MS
nmake. I changed them to build with GNU make, so they now work under
Windows and Linux/BSD/Unix of the month.
I aim to start adding some useful routines I have written. Some of this
stuff should probably form a library. However some will often need
tweaking for a particular use.
Regards,
Steve
- [Mspgcc-users] Examples Steve Underwood
-