forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts/dts: Clarify extract/flash.py some more
Think I understand it now, and that was the goal. - _extract_partition() adds index-based entries. extract_partition() adds label-based entries. Rename them to _add_partition_index_entries() and _add_partition_label_entries(), and call them from a top-level extract_partition() function. This makes the logic clearer. It took me a long time to spot it. - Generate indicies with a simple counter and remove the _flash_area logic. This would break if partitions were extracted more than once, but they aren't, and now you know that they can't be. - Rename _create_legacy_label() to add_legacy_alias() and make it global. It doesn't use 'self'. - Break the logic for finding the flash controller into a separate helper function - Add doc-comments for the new functions - Misc. other small clean-ups generated_dts_board.conf and generated_dts_board_unfixed.h were verified to be identical for disco_l475_iot1 and frdm_kw41z before and after the cleanup. Signed-off-by: Ulf Magnusson <[email protected]>
- Loading branch information
1 parent
14537fe
commit e1f0b61
Showing
1 changed file
with
52 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters