commit | e5d8b38a4814e88b04bcad8e8e9835c375e725bd | [log] [tgz] |
---|---|---|
author | Brian Duddie <bduddie@google.com> | Tue Apr 11 12:20:22 2017 -0700 |
committer | Brian Duddie <bduddie@google.com> | Tue Apr 11 12:29:56 2017 -0700 |
tree | 2819ddc68693fd3bf4699187ab6c00e05fb92529 | |
parent | 65d679851a2c062c26f685afb450f17bce177d29 [diff] |
Reduce logspam from start/stop events Update sample apps to ignore nanoapp started/stopped events if they don't use them. Test: run simulator Change-Id: Icba38c137ef8687e23a7d4c20ebf9802f246bfe2
Build targets are arranged in the form of a variant triple consisting of:
vendor_arch_variant
The vendor is the provider of the CHRE implementation (ex: google, qcom). The arch is the CPU architecture (ie: hexagonv60, x86, cm4). The variant is the target platform (ie: slpi, nanohub, linux, googletest).
CHRE is compatible with Linux as a simulator.
The build target for x86 linux is google_x86_linux
. You can build/run the simulator with the following command:
./run_sim.sh
You can run all unit tests with the following command. Pass arguments to this script and they are passed to the gtest framework. (example: --gtest_filter=DynamicVector.*
)
./run_tests.sh
First, setup paths to the Hexagon Tools (v8.x.x), SDK (v3.0), and SLPI source tree, for example:
export HEXAGON_TOOLS_PREFIX=~/Qualcomm/HEXAGON_Tools/8.0 export HEXAGON_SDK_PREFIX=~/Qualcomm/Hexagon_SDK/3.0 export SLPI_PREFIX=~/Qualcomm/msm8998/slpi_proc
Then use the provided Makefiles to build:
make google_hexagonv62_slpi -j
The CHRE project is organized as follows:
chre_api
core
pal
platform
platform/shared
platform/linux
apps
util
Within each of these directories, you may find a tests
subdirectory containing tests written against the googletest framework.
This project includes a number of nanoapps that serve as both examples of how to use CHRE, debugging tools and can perform some useful function.
All nanoapps in the apps
directory are placed in a namespace when built statically with this CHRE implementation. When compiled as standalone nanoapps, there is no outer namespace on their entry points. This allows testing various CHRE subsystems without requiring dynamic loading and allows these nanoapps to coexist within a CHRE binary. Refer to apps/hello_world/hello_world.cc
for a minimal example.
Any of the nanoapps that end with the term World are intended to test some feature of the system. The HelloWorld nanoapp simply exercises logging functionality, TimerWorld exercises timers and WifiWorld uses wifi, for example. These nanoapps log all results via chreLog which makes them effective tools when bringing up a new CHRE implementation.
This nanoapp implements IMU calibration.
This codebase is intended to be ported to a variety of operating systems. If you wish to port CHRE to a new OS, refer to the platform
directory. An example of the Linux port is provided under platform/linux
.
There are notes regarding initialization under platform/include/chre/platform/init.h
that will also be helpful.
There are many well-established coding standards within Google. The official C++ style guide is used with the exception of Android naming conventions for methods and variables. This means 2 space indents, camelCase method names, an mPrefix on class members and so on. Style rules that are not specified in the Android style guide are inherited from Google.
This project uses C++11, but with two main caveats: