[riot-devel] Modify the way of Including MSP430 standard headers?

ROUSSEL Kévin Kevin.Roussel at inria.fr
Wed Dec 4 13:00:55 CET 2013


Hello everyone,

I am currently working on the creation of a RIOT port on Zolertia Z1.

Since this platform is based on a family-2 MSP430 (F2617) --- a kind of 
MCU not yet used in any current port in RIOT ---, I stumbled upon 
inconsistencies with the already included header files.

Instead of adding one more #ifdef case for including the correct 
headers, I think we can just include <msp430.h> in all the concerned 
files : this is a generic file that includes the correct specific 
headers when the right symbol is defined.

Practically, following my idea, we would add lines like this in boards 
definitions:

     #define __MSP430F1611__
   - in telosb/include/board.h, wsn430*/include/board.h,

     #define __MSP430F1612__
   - in msb430/include/board.h,

     #define __CC430F6137__
   - in chronos/include/board.h,

     #define __MSP430F2617__
   - in z1/include/board.h (file I am creating in my new port).

and in generic MSP430 files (in the "core" of RIOT), we would only add 
these "unconditional lines":
     #include "board.h"
     #include <msp430.h>

This would simplify the source files, by reducing the number of ifdefs, 
and allow an easier integration for any future platform based on 
(current or future) MSP430 devices.

What do you think?
-- 


      Kévin Roussel
      Doctorant, projet LAR
      Équipe MADYNES, INRIA Nancy Grand-Est / LORIA
      Tél. : +33 3 54 95 86 27
      Kevin.Roussel at inria.fr



More information about the devel mailing list