scripts: build: gen_device_deps: s/--dynamic-handles/--dynamic-deps
Align naming of the CLI option with recent changes in handles naming. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
aedcc0b59d
commit
b6d5d246b7
2 changed files with 7 additions and 7 deletions
|
@ -914,7 +914,7 @@ zephyr_get_include_directories_for_lang(C
|
||||||
|
|
||||||
if(CONFIG_HAS_DTS)
|
if(CONFIG_HAS_DTS)
|
||||||
if(CONFIG_DEVICE_DEPS_DYNAMIC)
|
if(CONFIG_DEVICE_DEPS_DYNAMIC)
|
||||||
set(dynamic_handles --dynamic-handles)
|
set(dynamic_deps --dynamic-deps)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC)
|
if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC)
|
||||||
|
@ -932,7 +932,7 @@ if(CONFIG_HAS_DTS)
|
||||||
${ZEPHYR_BASE}/scripts/build/gen_device_deps.py
|
${ZEPHYR_BASE}/scripts/build/gen_device_deps.py
|
||||||
--output-source device_deps.c
|
--output-source device_deps.c
|
||||||
--output-graphviz dev_graph.dot
|
--output-graphviz dev_graph.dot
|
||||||
${dynamic_handles}
|
${dynamic_deps}
|
||||||
--num-dynamic-devices ${number_of_dynamic_devices}
|
--num-dynamic-devices ${number_of_dynamic_devices}
|
||||||
--kernel $<TARGET_FILE:${ZEPHYR_LINK_STAGE_EXECUTABLE}>
|
--kernel $<TARGET_FILE:${ZEPHYR_LINK_STAGE_EXECUTABLE}>
|
||||||
--zephyr-base ${ZEPHYR_BASE}
|
--zephyr-base ${ZEPHYR_BASE}
|
||||||
|
|
|
@ -46,8 +46,8 @@ def parse_args():
|
||||||
|
|
||||||
parser.add_argument("-k", "--kernel", required=True,
|
parser.add_argument("-k", "--kernel", required=True,
|
||||||
help="Input zephyr ELF binary")
|
help="Input zephyr ELF binary")
|
||||||
parser.add_argument("--dynamic-handles", action="store_true",
|
parser.add_argument("--dynamic-deps", action="store_true",
|
||||||
help="Indicates if device handles are dynamic")
|
help="Indicates if device dependencies are dynamic")
|
||||||
parser.add_argument("-d", "--num-dynamic-devices", required=False, default=0,
|
parser.add_argument("-d", "--num-dynamic-devices", required=False, default=0,
|
||||||
type=int, help="Input number of dynamic devices allowed")
|
type=int, help="Input number of dynamic devices allowed")
|
||||||
parser.add_argument("-o", "--output-source", required=True,
|
parser.add_argument("-o", "--output-source", required=True,
|
||||||
|
@ -95,7 +95,7 @@ def c_handle_comment(dev, handles):
|
||||||
lines.append(' */')
|
lines.append(' */')
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
def c_handle_array(dev, handles, dynamic_handles, extra_support_handles=0):
|
def c_handle_array(dev, handles, dynamic_deps, extra_support_handles=0):
|
||||||
handles = [
|
handles = [
|
||||||
*[str(d.handle) for d in handles["depends"]],
|
*[str(d.handle) for d in handles["depends"]],
|
||||||
'Z_DEVICE_DEPS_SEP',
|
'Z_DEVICE_DEPS_SEP',
|
||||||
|
@ -108,7 +108,7 @@ def c_handle_array(dev, handles, dynamic_handles, extra_support_handles=0):
|
||||||
ctype = (
|
ctype = (
|
||||||
'{:s}Z_DECL_ALIGN(device_handle_t) '
|
'{:s}Z_DECL_ALIGN(device_handle_t) '
|
||||||
'__attribute__((__section__(".__device_deps_pass2")))'
|
'__attribute__((__section__(".__device_deps_pass2")))'
|
||||||
).format('const ' if not dynamic_handles else '')
|
).format('const ' if not dynamic_deps else '')
|
||||||
return [
|
return [
|
||||||
# The `extern` line pretends this was first declared in some .h
|
# The `extern` line pretends this was first declared in some .h
|
||||||
# file to silence "should it be static?" warnings in some
|
# file to silence "should it be static?" warnings in some
|
||||||
|
@ -159,7 +159,7 @@ def main():
|
||||||
extra_sups = args.num_dynamic_devices if dev.pm and dev.pm.is_power_domain else 0
|
extra_sups = args.num_dynamic_devices if dev.pm and dev.pm.is_power_domain else 0
|
||||||
lines = c_handle_comment(dev, sorted_handles)
|
lines = c_handle_comment(dev, sorted_handles)
|
||||||
lines.extend(
|
lines.extend(
|
||||||
c_handle_array(dev, sorted_handles, args.dynamic_handles, extra_sups)
|
c_handle_array(dev, sorted_handles, args.dynamic_deps, extra_sups)
|
||||||
)
|
)
|
||||||
lines.extend([''])
|
lines.extend([''])
|
||||||
fp.write('\n'.join(lines))
|
fp.write('\n'.join(lines))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue