January 2019
1000-3960 Revision 1.5
© 2019 Hillcrest Laboratories, Inc. All rights reserved
15 / 17
Figure 21: Source Code Structure
The software is organized as an IAR EWARM project that can be dropped into the IAR IDE on a Windows
PC. Follow this procedure to compile the project and download the software to the Nucleo board.
•
Open IAR Embedded Workbench for ARM (EWARM) version 7.x
•
In the File menu, select Open and choose Workspace. Browse to where the example package is
extracted and
select “sh
2-demo-
nucleo/EWARM/Project.eww”. This should open an IAR
workspace with all the files within the project.
•
Select demo-i2c, demo-spi or demo-uart in the project configuration based on the board
settings of SW2/SW4/SW6. Refer to Section 1.3.
•
In the
“
Project
”
menu, select
“
Rebuild All
”
to compile the project.
•
After the project is successfully compiled, go to the Project menu and select Download and
Debug.
The “sh
2
” directory contains a full implementation of the
Hillcrest communications protocol for the
BNO080 and User
’
s Guide for Hil
lcrest’s SH
-
2™
driver.
The reader is encouraged to review the BNO080 datasheet
and the SH-2 Reference Manual
details on how to construct messages. The output from the BNO080 is printed through the serial port.
The first few lines indicate that the host has established prope
r communication (“Product ID Request”)
with the BNO080 and the BNO080 has responded with
version information (“Product ID Response”).
Rotation vector is enabled at 100Hz by default and reports are printed through the serial port.
sh
2-
dem
o-
nu
cleo
Nucleo Example
Application
ST Drivers
SH2 Driver