Skip to content

Commit

Permalink
[LTD fromlist] scripts: extract_dts_includes.py: Correct LOAD_OFFSET
Browse files Browse the repository at this point in the history
This patch fixes the LOAD_OFFSET calculation to use the actual offset
of the partition.  This assumes the reg entry in the DTS for that
partition is in relative offset to the flash base address.

Signed-off-by: Andy Gross <[email protected]>
  • Loading branch information
Andy Gross authored and Marti Bolivar committed Jun 16, 2017
1 parent a014822 commit c9579f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/extract_dts_includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,7 @@ def main():
"PARTITION", 1, 'offset')
part_base = lookup_defs(part_defs, chosen['zephyr,code-partition'],
'PARTITION_OFFSET')
load_defs['CONFIG_FLASH_LOAD_OFFSET'] = \
hex(int(part_base, 16) - int(flash_base, 16))
load_defs['CONFIG_FLASH_LOAD_OFFSET'] = part_base
load_defs['CONFIG_FLASH_LOAD_SIZE'] = \
lookup_defs(part_defs, chosen['zephyr,code-partition'],
'PARTITION_SIZE')
Expand Down

0 comments on commit c9579f2

Please sign in to comment.