DeviceTree - timvideos/litex-buildenv GitHub Wiki
We want to use DeviceTree to allow MicroPython to automatically customize itself based on the FPGA configuration.
This involves 3 parts;
- Making LiteX / Migen+MiSoC generate DeviceTree - https://github.com/fupy/issues-wiki/issues/6
- Making MicroPython understand DeviceTree - https://github.com/fupy/issues-wiki/issues/7
- Adding support for peripherals under MicroPython
This has other useful advantages;
- LiteX / Migen+MiSoC supporting DeviceTree makes porting Linux to it possible.
- MicroPython understanding DeviceTree makes it easier to port MicroPython to more SoCs.
Useful DeviceTree links
- DeviceTree: The Devicetree Specification - https://www.devicetree.org/
- Device Tree for Dummies - Free Electrons
- libfdt - https://github.com/dgibson/dtc/tree/master/libfdt - http://ozlabs.org/~dgibson/
- https://pypi.python.org/pypi/pyfdt/0.3 and github https://github.com/superna9999/pyfdt
- pyfdt looks like it might work. It uses struct, json, os (which all appear to have MP equivalents), strings, and copy (which don't) standard library functions. Perhaps a upyfdt might be forked from it.