vkottler / ifgen

An interface generator for distributed computing.
MIT License
1 stars 0 forks source link

Add support for converting SVD data to `ifgen` config data #24

Closed vkottler closed 1 year ago

vkottler commented 1 year ago

Probably makes sense to implement this after https://github.com/vkottler/ifgen/issues/23.

With something like this, we could go from SVD directly to HAL layer.

vkottler commented 1 year ago

This is next up for the most part but we probably need to figure out how to start a new firmware project, to get up and running..

vkottler commented 1 year ago

Where we can get some sample data: https://github.com/vkottler/xmc/issues/7.

vkottler commented 1 year ago

This is getting implemented on: https://github.com/vkottler/ifgen/pull/28.

Resources:

Current tasks:

vkottler commented 1 year ago

Now that we're done with the SVD parsing + modeling, time to start building struct (and enum) definitions.

vkottler commented 1 year ago

We've pushed generation very far! So far we've discovered one instance of a register "cluster" that we need https://github.com/vkottler/ifgen/issues/31 for (do that next).

Once that's complete, we can resume getting data plugged into the generated configuration!

As we're refining that, we should add a unit test to generate sources based on the generated configs.

vkottler commented 1 year ago

Arrays are now supported.

vkottler commented 1 year ago

One technical challenge that seems to exist here is the need to check for padding bytes.

I suspect a lot of these struct definitions require them

vkottler commented 1 year ago

We might need to knock this out: https://github.com/vkottler/ifgen/issues/33.

That example shows how we might want to put some address info on some of these?

edit: adding the byte offset to the description would probably be helpful

vkottler commented 1 year ago

Probably need to knock out:

as well. We also still need to generate enums and do bit fields...

vkottler commented 1 year ago

Noting that in addition to padding we also need to fix unions/aliases:

image

image

vkottler commented 1 year ago

Another one to implement: https://github.com/vkottler/ifgen/issues/39.

vkottler commented 1 year ago

Just these two things left:

vkottler commented 1 year ago

This gets fully implemented on https://github.com/vkottler/ifgen/pull/43.