AN-000227
Document Number: AN-000227
Page 6 of 15
Revision: 1.0
BUILDING THE PRESENCE DETECTION APPLICATION
•
Open Atmel Studio 7
•
Open the Presence Detection project:
o
Open
File
menu
o
Select
File > Open > Project/Solution…
o
Select the
atmelstudio/smartsonic-presence-example/smartsonic-presence-example.atsln
file
in the project directory.
o
Click
Open
. The program should locate the project files and display the name of the project.
•
The Presence Detection project files are organized in three top-level sub-directories under
source
:
o
algo
– contains
src
and
inc
sub-directories with the motion detection algorithm code and
definitions
o
application
– contains src and inc directories with the Presence Detection application
The
application/smartsonic-presence-example/main.c
file contains the entry point for
the application along with various routines that demonstrate how to read and manage
the Chirp sensor(s). See the comments in that file for detailed information about the
operation of the application.
The
application/smartsonic-presence-example/inc/app_config.h
file specifies the
overall measurement interval. The default is 100 ms (10 Hz sample rate).
o
board
– contains support files for the Chirp SmartSonic board.
The main board support package routines, as defined in
drivers/chirpmicro/inc/chirp_bsp.h
, are in the
board/HAL/src/chbsp_chirp_samg55.c
file.
The
board/config/chirp_board_config.h
file is required by SonicLib. This file contains
definitions for the number of possible devices and I
2
C buses on the board and is used for
static allocation of arrays.
o
drivers/chirpmicro
– contains the SonicLib API and driver files, sensor firmware modules, and
other distribution files from Chirp.
The
drivers/chirpmicro/inc
directory contains header files that must be included when
building applications with SonicLib. In particular, the
drivers/chirpmicro/inc/soniclib.h
file contains the key definitions for the SonicLib API.
•
Build the project:
o
Select
Build > Build Solution
The project should build successfully. The default build configuration is “Debug” so the build
output files will be placed in the
Debug
sub-directory.