mcuboot/sim
David Brown 7ad8088a57 sim: Match spacing on csupport/run.c
Re-tab run.c to match the rest of the files in the system.  This was
indented using Zephyr conventions (tabs for indent).  Re-indent using
spaces, with a 4-space indent level.

Signed-off-by: David Brown <david.brown@linaro.org>
2017-06-20 15:30:36 -06:00
..
csupport sim: Match spacing on csupport/run.c 2017-06-20 15:30:36 -06:00
src sim: add stricter write checking 2017-06-19 14:46:48 -06:00
.gitignore sim: Add simulator code 2017-01-09 12:28:10 -07:00
Cargo.lock sim: Use logging to control output 2017-01-09 12:28:10 -07:00
Cargo.toml sim: Use logging to control output 2017-01-09 12:28:10 -07:00
README.rst sim: Create a small README.rst 2017-01-09 12:28:11 -07:00
build.rs sim: use flash_area_get_sectors() 2017-06-15 13:24:15 -04:00

README.rst

MCUboot Simulator
#################

This is a small simulator designed to exercise the mcuboot upgrade
code, specifically testing untimely reset scenarios to make sure the
code is robust.

Prerequisites
=============

The simulator is written in Rust_, and you will need to install it to
build it.  The installation_ page describes this process.  The
simulator can be built with the stable release of Rust.

.. _Rust: https://www.rust-lang.org/

.. _installation: https://www.rust-lang.org/en-US/install.html

Building
========

Once Rust is installed, build cargo by::

  $ cargo build --release

this should download and compile the necessary dependencies, compile
the relevant modules from mcuboot, and build the simulator.  The
resulting executable will be placed in ``./target/release/bootsim``
and can be run directly::

  $ ./target/release/bootsim run --device k64f

Calling with ``--help`` will give a more thorough usage.

Debugging
=========

If the simulator indicates a failure, you can turn on additional
logging by setting ``RUST_LOG=warn`` or ``RUST_LOG=error`` in the
environment::

  $ RUST_LOG=warn ./target/release/bootsim run ...