beautypg.com

2 program development – Philips Bluetooth QuickStart Kit User Manual

Page 16

background image

Bluetooth QuickStart Kit Version 1.0 - User’s Guide

Page 16

Copyright 2004-2005 © Embedded Artists AB

application and a makefile. The makefile contains directives of how to compile and link the
complete application. A typical makefile is listed in Figure 11 below.

/*
* Example makefile that creates a program called ‘mySampleApp’
*/

# name of the program
NAME = mySampleApp

PROJECT_ROOT = .

# Link program to RAM or ROM (possible values for RAMROM is RAM or ROM,
# if not specified = ROM)
RAMROM = ROM

# ELF-file contains debug information, or not
# (possible values for DEBUG are 0 or 1)
DEBUG = 1

# Optimization setting
# (-Os for small code size, -O2 for speed)
DBFLAGS = -Os

#Extra flags
EFLAGS = -mthumb-interwork

# Processes run in ARM or THUMB mode
# OBS. Do not change this setting. Instead, re-generate the operating system
TASK = THUMB

# subdirectories to recursively invoke make in
SUBDIRS =

# additional libraries to merge into this library
LIBS = ../quickstart/quickstart_vXYZ.a

# c-code files
CSRCS = ../glue.c \
mySampleApp.c

include program.mk

Figure 11 – Example Makefile

A typical application (mySampleApp.c, in this case) includes the file glue.c (under the
file root) and includes quickstart_vXYZ.h whenever the platform API must be used.
The file glue.c contains a number of initialization functions and program hooks (can be
used for extending the functionality of the platform). Also, the library
quickstart_vXYZ.a is included in the final link stage.

4.2 Program Development

Three different application program development environments are supported:

InfraBed from Embedded Artists

Embedded Artists unique configurable software generator contains a complete GCC
build environment for very easy program development. The current version of GCC
is 3.4.3. By installing InfraBed you will automatically also get a complete setup of
the build environment. This is the preferred way of developing and compiling
application programs.

IAR Embedded Workbench

A complete development environment from IAR Systems, including an editor,
project manager, a complete compiler build environment, and a debugger. This
development environment must be bought separately from IAR.

Include the platform
library: quickstart.a

Always include glue.c
Also include all application files,
in this case: mySampleApp.c

Name of final program.