2

I'm trying to port Contiki-OS to the MSP430F5 Launchpad from Texas Instrument. The MSP430 is already supported in Contiki, however the it doesn't run on the Launchpad platform.

I've studied some custom Platform port made for other chips and platform. The goal is to add a new folder in the platform folder.

The desired new folder is supposed to have this architecture (like every platforms folder) :

  • myCustomPlatformFolder
    • Makefile (Compile instructions for this platform)
    • contiki-conf.h (Define the configuration of this platform)
    • contifi-main.c (Used by Contiki core to launch the platform)
    • dev
      • optional files defining sensors functionalities

My problem is that I don't really know where to start in order to create a fully operational configuration. There is some parts of the native configuration that I understand and that I can fill using the MSP430F5 data sheet (CLOCK_CONF_SECOND, F_CPU) . However, in every other defined platform, there is a lot a constants in contiki-conf.h that I don't understand / don't know where they come from.

I'm a novice in Contiki development, or even uController development, so I wonder where I can find informations that would help me. Is there a place where I can find some instructions about creating a new Contiki platform port ? What does the contiki-conf.h file should contain in order to make my launchpad work ?

matt.P
  • 136
  • 3

1 Answers1

1

Contiki already has support for the MSP430 Series 5. Specifically, mainline Contiki at the moment includes support for Wismote hardware platform. You should start by looking into the code under platforms/wismote and cpu/msp430/f5xxx.

Next, I would do something like this:

  1. Write main() function and get Contiki to boot up. You can copy contiki-main.c code from some other platform (such as Wismote).

  2. Get serial port to work. No need to write a custom interrupt, the code in cpu/msp430 already has all the functions required; just make sure to configure that correct UART with an acceptable baudrate.

  3. Get timing to work. Again, the code in cpu/msp430 already defines timer interrupts, so this should not be a problem.

  4. Get peripherals to work (ADC, I2C and SPI buses, possibly USB...)

  5. Run a few selected test applications from the examples directory and check that they're working correctly.

As for your other questions, most of the stuff in contiki-conf.h is networking related. As far as I know, Launchpads do not come with a radio transceiver. This means you can safely exclude all of that networking stuff. (It also makes one wonder why would anyone want to port Contiki to such a platform in the first place, as Contiki's main strengths are networking and communication protocols.)

I'm not aware of any official documentation that would describe how to port Contiki to a new platform. Get used to studying the source code. Luckily, Contiki source usually isn't that complicated.

kfx
  • 8,136
  • 3
  • 28
  • 52
  • Thank you very much. I'm actually trying to port Contiki to a launchpad because I'm in development phase (and because it's cheaper than some pre-made platforms). I have some MRF24J40 (Zigbee T/R) that I will connect to the launchpad. – matt.P Aug 12 '14 at 07:51