Commit Graph

9 Commits

Author SHA1 Message Date
Kumar Gala 45b00acf0f scripts/assemble: Rework to use EDT library to get devicetree data
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-05-15 15:11:56 -06:00
Henrik Brix Andersen a40b199761 scripts: assemble.py: switch to using devicetree_legacy_unfixed.h
Switch to using the devicetree_legacy_unfixed.h header for extracting
flash partition information.

Zephyr has switched to using a new gen_defines.py script and a new set
of macros/defines for devicetree code generation for all nodes except
flash partitions, which are still in the legacy format.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-03-31 08:47:40 -03:00
Ulf Magnusson e96b6873bd dts: Include devicetree.h instead of generated_dts_board.h
Needed for https://github.com/zephyrproject-rtos/zephyr/pull/20757, to
avoid a warning-turned-error.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 11:41:28 +01:00
Fabio Utzig 539d7662d1 Fix assemble.py tool for compatibility
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>
2019-09-06 09:31:57 -03:00
Evan Gates 0ccee8741d fix the offset and size regular expressions in assemble.py
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>
2018-07-10 11:11:52 -03:00
Kiril Zyapkov 5d5c446443 Fix regexp matchers for FLASH_AREA_* defines
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>
2018-06-01 13:40:23 -03:00
David Brown b730e2431a assemble.py: Add explicit license declaration
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>
2018-01-04 10:36:25 -07:00
David Brown 2cf522c3d8 scripts: assemble: Fix problem with missing output
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>
2017-07-20 14:55:50 -06:00
David Brown dbc5727902 samples: Add a 'full.bin' target to Zephyr sample
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>
2017-07-20 14:55:50 -06:00