BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Platform Model

Table of Contents

Definition of a platform for BSP430 requires three files be created and placed in a standard location. For out-of-tree platforms, the BSP430_PLATFORM_CUSTOM feature can be used to allow BSP430 to access the platform without source code modifications. For in-tree platforms, you should define a platform identifier (e.g., em430f5137 or chronos), create the files below in the source tree, and modify the dispatch headers bsp430/platform.h and bsp430/platform/bsp430_config.h so that the platform is included in the template expansion.

Remember that all BSP430 headers first include <bsp430/core.h>, which in turn will normally include the application "bsp430_config.h", which includes the generic bsp430_config.h which includes the platform bsp430_config.h before doing platform-independent configuration. The order ensures the customization points are encountered from most-specific to least-specific, and each must defer to the configuration specified by a previously-included customization point.


This file, placed to be found at bsp430/platform/custom/platform.h should contain a documentation block describing the platform, as well as default assignments for core features like:

There are expansion templates that help generate the correct C preprocessor directives to allow user override of default values defined in the platform header. See any of the in-tree examples.

Remember to add the following at the end:

/* Include generic file, in case this is being included directly */


This file, placed to be found at bsp430/platform/custom/bsp430_config.h, parallels platform.h and adds configuration defaults for resources that were default-identified in that header. Here too you will want to use the expansion templates.


In this file, located in src/platform/custom/custom.c or another location specified in your platform-specific Makefile, you will place:


In this file, located in src/platform/custom/Makefile.common, you will place:

Again see the in-tree platforms for examples.

Copyright 2012-2014, Peter A. Bigot