brandonbraun653 / Chimera

A generalized high level interface to commonly used embedded systems resources
MIT License
4 stars 0 forks source link

Improve Storage Options for Const Configuration Data #20

Closed brandonbraun653 closed 4 years ago

brandonbraun653 commented 4 years ago

Chimera derives a lot of its flexibility from being able to easily reconfigure peripherals and decouple the user from hardware specific settings. These settings must be stored somewhere and previously a LightFlatMap was typically used to map the high level options into hardware register values. Unfortunately, this does not scale well to data that is constant, and the LightFlatMap tends to consume an undesirable amount of RAM.

It would be beneficial to provide an interface that accesses const configuration data on a per-peripheral basis. It may be difficult to abstract away some of the specific info. Perhaps have a long list of enums that decay into a lookup table. The main idea is that if a piece of config data is needed, the API will be used to access it. This allows storage of the data to exist in on-chip flash or on external flash without the client code having to care.

brandonbraun653 commented 4 years ago

This ticket is a bit of a non-starter because in order to read external peripheral configuration data, you have to first know how to configure the peripherals that read that data. It's a chicken and egg problem.