blob: 17ecaba57a4ab841eb176ad88d89cea95fe73472 [file] [log] [blame]
David Brown841d73a2017-01-09 12:23:09 -07001MCUboot Simulator
2#################
3
4This is a small simulator designed to exercise the mcuboot upgrade
5code, specifically testing untimely reset scenarios to make sure the
6code is robust.
7
8Prerequisites
9=============
10
11The simulator is written in Rust_, and you will need to install it to
12build it. The installation_ page describes this process. The
13simulator can be built with the stable release of Rust.
14
15.. _Rust: https://www.rust-lang.org/
16
17.. _installation: https://www.rust-lang.org/en-US/install.html
18
David Brown9600ec82017-07-21 08:28:28 -060019Dependent code
20--------------
21
22The simulator depends on some external modules. These are stored as
23submodules within git. To fetch these dependencies the first time::
24
25 $ git submodule update --init
26
27will clone and check out these trees in the appropriate place.
28
David Brown841d73a2017-01-09 12:23:09 -070029Building
30========
31
32Once Rust is installed, build cargo by::
33
34 $ cargo build --release
35
36this should download and compile the necessary dependencies, compile
37the relevant modules from mcuboot, and build the simulator. The
38resulting executable will be placed in ``./target/release/bootsim``
39and can be run directly::
40
41 $ ./target/release/bootsim run --device k64f
42
43Calling with ``--help`` will give a more thorough usage.
44
45Debugging
46=========
47
48If the simulator indicates a failure, you can turn on additional
49logging by setting ``RUST_LOG=warn`` or ``RUST_LOG=error`` in the
50environment::
51
52 $ RUST_LOG=warn ./target/release/bootsim run ...