device: dynamic device handles were declared as const
When CONFIG_HAS_DYNAMIC_DEVICE_HANDLES is selected, devices handles are placed in RAM region so that they can be modified at runtime. However, the gen_handles.py script added the `const` attribute to the device handle arrays regardless of this setting, leading to faults when running the application. This may be an indicator that this feature is not actively used. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
9f25fa20ce
commit
e5335f345a
2 changed files with 15 additions and 3 deletions
|
@ -897,6 +897,10 @@ zephyr_get_include_directories_for_lang(C
|
|||
)
|
||||
|
||||
if(CONFIG_HAS_DTS)
|
||||
if(CONFIG_HAS_DYNAMIC_DEVICE_HANDLES)
|
||||
set(dynamic_handles --dynamic-handles)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC)
|
||||
set(number_of_dynamic_devices ${CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM})
|
||||
else()
|
||||
|
@ -912,6 +916,7 @@ if(CONFIG_HAS_DTS)
|
|||
${ZEPHYR_BASE}/scripts/build/gen_handles.py
|
||||
--output-source dev_handles.c
|
||||
--output-graphviz dev_graph.dot
|
||||
${dynamic_handles}
|
||||
--num-dynamic-devices ${number_of_dynamic_devices}
|
||||
--kernel $<TARGET_FILE:${ZEPHYR_LINK_STAGE_EXECUTABLE}>
|
||||
--zephyr-base ${ZEPHYR_BASE}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue