chiptool icon indicating copy to clipboard operation
chiptool copied to clipboard

Unmappable memory generator

Open SpinFast opened this issue 2 years ago • 3 comments

Adds a custom generator for interface based (unmappable memory) register manipulation.

Based on the i2c branch adds a interface based regblock where the interface is expected to provide a simple single register read/write fallible function pair.

Every register then can be written, read, modified similarly to how chiptool does things for mappable memory regions.

I'm testing this out in conjunction with a driver for the WM8960 on many imxrt boards

https://github.com/spinfast/wm8960-rs

SpinFast avatar Nov 29 '23 03:11 SpinFast

Maybe not complete or full proof yet, but the idea and code seems to be working out for me.

SpinFast avatar Nov 30 '23 13:11 SpinFast

@Dirbaio I'm waiting on this to publish my wm8960 crate, it would be great if this could be added and rolled into a new released version of chiptool

wm8960-rs is working well for me

SpinFast avatar Dec 06 '23 05:12 SpinFast

I've done almost the same experiments like this. https://github.com/embedded-drivers/yaml2pac

https://github.com/embedded-drivers/edrv-uart/blob/main/uart_dw_apb.yaml

I was thinking something like:

yaml2pac --memory-access i2c sensor.yaml

yaml2pac --memory-access csr riscv-csr.yaml

yaml2pac --memory-access none whatever.yaml

IMHO, it is better to keep chiptool as it is for generating MCU register blocks.(introducing unused field is no meaning to metapac crates). The idea of mapping register blocks using YAML can be borrowed.

bh1xuw avatar Jul 15 '24 16:07 bh1xuw