Compiling the MSP source code
Building the base source tree
If you'd like to make any changes to the MSP software, or would like to build new applications on top of the existing MSP software, you'll first need to compile the MSP source tree. To do so:
- Check out the MSP source code from the CSE subversion repository:
svn co svn+ssh://<username>@coco.cs.washington.edu/projects/ubicomp/uwar/subversion/msp
. TODO: Move this to a public repository. - Switch to the source directory:
cd msp/src
- Run the configure script. If building the MSP software for a native system, just run:
./configure
If building the MSP software for the MSP, execute:CROSS_COMPILE=<path to cross-compiler>/bin/arm-linux- ./configure
On CSE machines, this would be:CROSS_COMPILE=/projects/ubicomp/uwar/arm-linux/3.4.3_binutils/bin/arm-linux- ./configure
- Execute make:
make
Extending the source code
If you'd like to develop your own applications, there are a few things you need to do to integrate it with the MSP build system:
- Create a directory in src for your project.
- In that directory, create a Makefile. Use this template:
include ../Makefile.conf MODULE_NAME = "<short module name>" MODULE_COMMENT = "<module description>" CFLAGS += IFLAGS += LFLAGS += -lglobal -lipc <any other libs you need> SOURCES = <a list of source files, seperated by spaces> PUBLIC_INCLUDES = <any header files to make available to other apps, seperated by spaces> PUBLIC_LIBRARIES = <any library files to make available to other apps, seperated by spaces> PUBLIC_BINARIES = <any binaries to copy to the bin directory> MAN_PAGES = TARGETS = <a list of the binaries and potentially libraries to build, seperated by spaces> target-1: <source objects, seperated by spaces> target-2: <source objects, seperated by spaces> # rules include ../Makefile.rules
Here's an example Makefile from the camera server:include ../Makefile.conf
MODULE_NAME = "Camera" MODULE_COMMENT = "Camera Server"
CFLAGS += IFLAGS += -I../../extern/ipp/5.0/pca_wmmx/include/ LFLAGS += -L../../extern/ipp/5.0/pca_wmmx/lib/pvkit -l ippIP_WMMX50LNX_r -l ippJP_WMMX50LNX_r -l ippAC_WMMX50LNX_r -l ippSP_WMMX50LNX_r -lglobal
SOURCES = cam-server.c ippimem.c
PUBLIC_INCLUDES = camera_interface.h
PUBLIC_LIBRARIES = libcamera_interface.a
PUBLIC_BINARIES =
TARGETS = libcamera_interface.a cam-server
PUBLIC_LIBRARIES_SO =
libcamera_interface.a: camera_interface.o
cam-server: cam-server.o ippimem.o crc32.o
- rules
include ../Makefile.rules
- Add the directory name to the list of PACKAGES in the main Makefile:
PACKAGES = ipc global fileio activity-inference msb imu logger proccontrol system-tools gps examples \ lsb new-gps camera gps-debug sb-update <new directory>