RIOT os and CC430

Hi! I try to port riot to CC430F5137 using a panstamp board ( http://www.panstamp.com/product/197/ ). I didn’t have any luck with the old msp430debug package which i’ve found in the latest ubuntu. The first thing I’ve tried to do is to get a simple UART example working, but when I’ve tried to enable the interrupts with: __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, interrupts enabled the whole thing freezed. I guess that some other kind of interrupt happens all the time, but I haven’t been able to debug it ( yet ). So I’ve started using TI’s / redhat’s gcc compiler, and it worked just ok ( under windows ). So I’ve moved on to this compiler, which I’ve installed by this tutorial: http://www.simplyembedded.org/tutorials/compile-install-msp430-gcc/ I’ve tried to use chronos version for the first time, I’ve deleted all the LCD headers, and modified stdio.h a little bit, so it doesn’t looks for these kind of files. The compilation worked previously with the obsolete mspgcc, so that worked somewhat. Now when I do BOARD=chronos make then it doesn’t finds msp430-gcc. So I’ve moved everything from opt/msp430-toolchain/bin ( the place where I’ve installed the new TI mspgcc ) to bin, so it found the new mspgcc compiler. Now it was missing the header file, I’ve modified the makefile.include so it found it now. There were some missing stuff , but I’ve solved these problems, but now I have this error: as: unrecognized option ‘-mP’ I’ve did a verbose output with make -n, this came out: http://pastebin.com/BDQjdaJG I have found -mP but only with msp430-gcc, and there is no as program as far as I know, so I doesn’t really understand this.

My first question is: how to install this compiler properly, so that whenever I use msp430-gcc then this new compiler will be called? I’ve also tried to use the installer…sh file from ti, but it doesn’t install it to /bin or anything in the $PATH so I can’t use it with the current makefiles. The current solution is…hmm kind of ugly and doesn’t works :slight_smile:

The second question: Should I use the obsolete ti compiler instead? What causes this bug?

The third one is: What is this as / -mp thing?

Thanks for any help, and sorry for my ugly English. Viktor

Hi Viktor,

first a disclaimer:

It is a lot of time that I don’t work with msp430 silicon, so my knowledge it is not up to date, so please take this a a starting point: I think a RIOT msp430 maintainer could make a more clean and polite job than me, and I think it would be a GREAT thing.

Now some info and a recipe to try get a working RIOT port to “the new” msp-elf-gcc.

I have arranged a build for chronos board with the fork:

https://github.com/attdona/RIOT (some minor patches about removing duplicated types definition and the new msp430 gcc ISR syntax)

and with the following compiler version (not mandatory, just for reference):

msp430-elf-gcc -v

Using built-in specs. COLLECT_GCC=msp430-elf-gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-msp430-elf-dev-20141215/libexec/gcc/msp430-elf/5.0.0/lto-wrapper Target: msp430-elf Configured with: /home/attilio/MIOT/gcc_repo/gcc/configure --prefix=/usr/local/gcc-msp430-elf-dev-20141215 --target=msp430-elf --with-newlib --enable-languages=c Thread model: single gcc version 5.0.0 20141105 (experimental) (GCC)

The ugly part it is that I needed to patch the compiler !!!

You will find the instructions into cpu/msp430-common/gcc-patch/README.md

I’ve just verified that the platform build successfully but I have not tested the fw.

Let me know if it works for you.

ciao Attilio

Hi all, I’m nbew on this forum, and mostly interested (at first) to know how realistic it is to use Riot (or maybe a part of it) on very low power 8-bit cores. I have used panstamps (mostly the ATmega/arduino-like version) for close to 10 years now, in a somewhat critical environment (for me) : my home heating system. I know that system is somewhat outdated, but in case Viktor and/or attilio are still part of this, news would be welcome. Viktor, did you pursue with the porting at that moment ? Maybe there is another thread somewhere about that ?