blob: b3c7ecb23b5832621951763bf4f3090069450904 [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
19Building
20========
21
22Once Rust is installed, build cargo by::
23
24 $ cargo build --release
25
26this should download and compile the necessary dependencies, compile
27the relevant modules from mcuboot, and build the simulator. The
28resulting executable will be placed in ``./target/release/bootsim``
29and can be run directly::
30
31 $ ./target/release/bootsim run --device k64f
32
33Calling with ``--help`` will give a more thorough usage.
34
35Debugging
36=========
37
38If the simulator indicates a failure, you can turn on additional
39logging by setting ``RUST_LOG=warn`` or ``RUST_LOG=error`` in the
40environment::
41
42 $ RUST_LOG=warn ./target/release/bootsim run ...