This accounts for changes in the Zephyr build which include:
1) Flash areas are prefixed with `DT_`
2) The generated DTS was renamed to generated_dts_board_unfixed.h
3) The build tree has an extra "zephyr" dir.
Fixes#408
Signed-off-by: Fabio Utzig <utzig@apache.org>
Given the example lines:
#define FLASH_AREA_MCUBOOT_OFFSET_0 0x0
#define FLASH_AREA_MCUBOOT_OFFSET FLASH_AREA_MCUBOOT_OFFSET_0
Changing OFFSET_0 to OFFSET(_0)? allows the re to possibly match the
second line where it would have stopped the match before. This combined
with the (0x)? means that the re does match the second line, with the
third group being just the F of FLASH_AREA_IMAGE_1_OFFSET_0. The int()
function fails because F is not a valid number. This commit makes the
matching more precise by 1) matching the 0x when there are hex digits
and without the 0x when there are decimal digits and 2) matching until
the end of the line.
Signed-off-by: Evan Gates <evan@gnarbox.com>
Zephyr has changed the format of macros used to define flash
area partitions -- they no longer contain the `_0` suffix.
Signed-off-by: Kiril Zyapkov <kiril.zyapkov@gmail.com>
Although this file is likely implicitly licensed under the Apache 2.0
license because of the LICENSE file for this project, make this explicit
in this file.
Signed-off-by: David Brown <david.brown@linaro.org>
Adding an os.unlink() call to remove the outfile results in an exception
being thrown if the file does not exist. Fix this by trapping, and
checking for the specific error we get on a missing file.
Signed-off-by: David Brown <david.brown@linaro.org>
This full.bin target demonstrates how to assemble all of the images into
a single file which can be flashed to the device. As it is, it will
then boot into the first "primary" image. The second image will be
present, but will not ever be run.
Signed-off-by: David Brown <david.brown@linaro.org>