Hi,
I have been trying to compile MSP430x2617 a few weeks. And finally, i obtained a compilation. I must probe in a real micro but the preliminary compiling is ok!. The steps are the follows: How to install the toolchain MSP430X to compile the family 2 MSP2617 from TinyOS-2.x in a enviroment debian ubuntu 8.0.4. First, you need to install de toolchain MSP430X, To perform this setup, you can follow the directions on the website that states: http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Linux_installation_(MSP430X) Following the instructions on the website discussed above, is achieved by properly installing the toolchain msp430X, what happens that as we are going to use from TinyOS, which is implemented in NESC should be performed some simple modifications to adapt the differences existing between the GCC Toolchain and ncc of TinyOS. In particular the modification to make is to add in the file located in the directory: /opt/mspgcc/sf/packaging/build/binutils-2.18/gas/config/tc-msp430.h in the “#define LEX_DOLLAR 0” the following line: #undef LEX_DOLLAR The reason for adding this line of code is because there is a historical error due to GCC and NESC, NESC used as the separator "$" and the GCC compiler does not recognize it, then in order to adjust the toolchain and not give msp430x build problems with TinyOS (uses language NESC). But in order to this change becomes effective, it must be done before running the command CC = gcc-3.4 make build ". Therefore we must modify the makefile in the directory /opt/mspgcc/sf/packaging. In order to make this change, I downloaded the file tc-MSP430, added the modification explained above, saved that file in /opt/mspgcc and finally added these two commands in the makefile just before applying the patches to binutils-2.18 : rm-r / opt/mspgcc/sf/packaging/build/binutils-2.18/gas/config/tc-msp430.h cp-r / opt/mspgcc/tc-msp430.h / opt/mspgcc/sf/packaging/build/binutils-2.18/gas/config/tc-msp430.h Once you've added these two commands in the makefile, you can run the command CC = gcc-3.4 make build ", which made the entire installation automatically. Once we have the msp430x toolchain installed and adapted to work with TinyOS, the variable "PATH" from tinyos.sh file (/ opt/tinyos-2.x/tinyos.sh) due modify : PATH = "/opt/mspgcc/bin: $PATH" export PATH With this modification we are telling it that it not use default TinyOS toolchain (which uses binutils-2.17, which does not support msp430x) and on the other hand there are the libraries of TinyOS, referring to msp2617, which is the microcontroller which we will work on TinyOS. These libraries can be found in the directory called "dexma/tos/chips/msp430X" found under the directory of the contributions of Tiny-2.x-contrib. In particular we must add the folder "msp430X" folder on Tiny-2.x/tos/chips. Including this library (msp430X), just it is necessary to create a new platform in TinyOS to use with msp2617 microcontroller. To create the new platform in TinyOS-2.x, you can follow the steps outlined on the following link: http://docs.tinyos.net/index.php/Platforms As a footnote to take into account in this last step: This new microcontroller is no longer used the UART component now uses the USCI component. we must modify the components that control the UART. On the other hand it should make an appropriate allocation of pins on the platform file created hardware.h . And finally we recommend installing the testing applications that are in the directory Tiny-2.x/apps to make sure everything works properly. Best regards alditu wrote: > > Hello José Miguel, > I'm only using the mspgcc binary (latest version), provided in > sourceforge, > to run msp430-gdb and msp430-gdbproxy. > > There is an historical error due to GCC and nesC. nesC uses '$' signs as > separators, but the GCC compiler does not recognize them and you have the > assembler messages you posted. > > To solve it, you have to mount and build binutils and gcc by hand. I'm > using > CygWin. > > See this website: > http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Building_MSPGCC_from_Source_Code > * > * > Download binutils version 2.19 and patch it doing the following: > > Modify the file /binutils-xx-xx/gas/config/tc-msp430.h, BEFORE DOING MAKE, > with the following: > > #define > LEX_DOLLAR 0 > > add the new > line > > *#undef > LEX_DOLLAR* > > The build and compile GCC as says in the website. > > Hope this helps :) > > Regards, > > Aldo > > * > * > > * > * > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- View this message in context: http://www.nabble.com/compiling-TinyOS-with-differente-MSPGCC-versions-tp25353529p26111494.html Sent from the TinyOS - Help mailing list archive at Nabble.com. _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
