1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/mcuboot
Gaëtan Harter 24a54fe853
tests/mcuboot: handle building 'mcuboot' in docker
When using BUILD_IN_DOCKER only make 'all' execute 'mcuboot' target when
inside the container. Otherwise it will execute it using your host
toolchain.

This is a hack and could be prevented by having a file target put in
FLASHFILE.

This does currently not allow flashing after building in docker as
flashing should be done with `mcuboot-flash` which will not be done in
docker. It would require the `FLASHFILE` fix to be done properly.
2019-06-03 18:09:32 +02:00
..
main.c tests: add mcuboot test application 2017-07-17 14:48:28 +02:00
Makefile tests/mcuboot: handle building 'mcuboot' in docker 2019-06-03 18:09:32 +02:00
README.md make: mcuboot: prefix mcuboot make targets 2017-11-07 12:44:38 +01:00

MCUBoot test application

This test is intended to compile a hello-world program taking into account the existence of the MCUBoot bootloader at the first 32K in the ROM.

For this first support, a pre-compiled mynewt MCUBoot binary is downloaded at compile time.

The goal is to produce an ELF file which is linked to be flashed at a BOOTLOADER_OFFSET offset rather than the beginning of ROM. MCUBoot also expects an image padded with some specific headers containing the version information, and TLVs with hash and signing information. This is done through the imgtool.py application, which is executed automatically by the build system.

Before running the test, be sure that you meet the following Python3 dependencies:

  • pycrypto
  • ecdsa
  • pyasn1

If you don't have one of those, you can install them with the commands:

pip3 install --user pycrypto ecdsa pyasn1

This test can be called using make mcuboot to produce such ELF file, which can also be flashed using make mcuboot-flash.This command also flashes the pre-compiled bootloader.

It's also possible to build and flash MCUBoot by following the instructions on the MCUBoot repository either using mynewt or zephyr operating systems.