On Nov 20, 2019, at 5:11 AM, "曹子龙 <firstname.lastname@example.org> wrote:
I know the device three mechanism is also applied in zephyr sdk, but it seems something diffferent compare with in linux.
in linux, the dtsi script file would be compiled to a binary blob which would be pared in running time, so, the driver would do some dynamically decision in running time to different branch.
but in zephyr sdk, the dts are commpiled to a intermidate dts script file, which would be parsed by tools before building process are held.
finally, the dts configuration would convert to header files,and just used in compile time, so cant used to do the branch control like linux.
is this right? and is there anyway to get the configuration in runtime in zephyr?
thnks for your help.
Your understanding is correct. Because of the space constrained systems Zephyr has targeted the size of both the DTB and code to parse the DTB is seen as too large, and thus we went the way of using DTS for code generation.
Can you explain a bit further what kinda of config you’d like to do at run time? This might help us understand what solution would make sense.