Skip to content

Add optional /bits/ parsing#58

Open
tinnedkarma wants to merge 1 commit intosifive:masterfrom
tinnedkarma:gramar-bits-parsing
Open

Add optional /bits/ parsing#58
tinnedkarma wants to merge 1 commit intosifive:masterfrom
tinnedkarma:gramar-bits-parsing

Conversation

@tinnedkarma
Copy link
Copy Markdown

Summary

Add support for parsing the /bits/ directive in devicetree cell arrays, which allows specifying element sizes other than the default 32-bit.

Description

Hi, I'm using pydevicetree as project dependency for memory constrained devices.

Although not in the v0.4 specs, the device tree compiler supports /bits/ directive specified here which I use to reduce the device tree blob size.

I've noticed that the pydevicetree parser fails if the /bits/ directive is present in the dts files.

This PR adds new optional tokens/elements to cell_array parser and updates the CellArray class to support the new bits parameter. By default, the new CellArray member bits is 32 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant