zephyr/tests/benchmarks/boot_time
Torsten Rasmussen 407b49b35c cmake: use find_package to locate Zephyr
Using find_package to locate Zephyr.

Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.

Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.

It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
..
src tests: benchmark: boot_time: fixed kernel clock value 2019-11-04 08:51:58 -05:00
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
README.txt
prj.conf subsys/debug: eliminate PEFORMANCE_METRICS and CPU_CLOCK_FREQ_MHZ 2019-09-21 16:43:26 -07:00
testcase.yaml tests: fix test identifiers 2019-12-09 15:53:44 -05:00

README.txt

Title: Boot Time Measurement

Description:

BootTime measures the time:
   a) from system reset to kernel start (crt0.s's __start)
   b) from kernel start to begin of main()
   c) from kernel start to begin of first task
   d) from kernel start to when kernel's main task goes immediately idle

The project can be built using one of the following three configurations:

best
-------
 - Disables most features
 - Provides best case boot measurement

default
-------
 - Default configuration options
 - Provides typical boot measurement

worst
-------
 - Enables most features.
 - Provides worst case boot measurement

--------------------------------------------------------------------------------

Building and Running Project:

This benchmark outputs to the console.  It can be built and executed
on QEMU as follows:

    make run

--------------------------------------------------------------------------------

Troubleshooting:

Problems caused by out-dated project information can be addressed by
issuing one of the following commands then rebuilding the project:

    make clean          # discard results of previous builds
                        # but keep existing configuration info
or
    make pristine       # discard results of previous builds
                        # and restore pre-defined configuration info

--------------------------------------------------------------------------------

Sample Output:

tc_start() - Boot Time Measurement
Boot Result: Clock Frequency: 25 MHz
__start       : 88410717 cycles, 3536428 us
_start->main(): 2422894 cycles, 96915 us
_start->task  : 2450930 cycles, 98037 us
_start->idle  : 37503993 cycles, 1500159 us
Boot Time Measurement finished
===================================================================
PASS - main.
===================================================================
PROJECT EXECUTION SUCCESSFUL