Comments (6)
That approach (automatic generation) seems inapplicable in this case, though, does it not?
from ada_drivers_library.
Well, in the immediate case I think we are in hand-generated mode, but what are the possibilities down the road that you see?
from ada_drivers_library.
What would you think of having the package private part generated, containing the register declarations? Or if not the actual package text, maybe just generate the text of the register decls themselves, and then we could manually copy/paste them into a package declaration.
from ada_drivers_library.
All registers of a specific processor are described in its CMSIS-SVD file. Unfortunately, some fields of the description are optional. If all optional information were there, a fully automatic generation of .ads-files with the register definitions would probably be possible. But even with not-so-complete SVD files (e.g. definitions of enumerations are completely missing in SVD files from STM) a fair amount of tedious work can be done automatically. My proof-of-concept SVD to ads converter generates a skeleton with record definitions for the registers. It leaves some manual work with type definitions for the fields in the register (especially if the type should be an enumeration - as I mentioned before, enumerations are missing in the files from STM). Some special constructs in the SVD files aren't recognized at all - but as I said, it is a proof of concept, far away from being complete.
I already had some discussions about the topic 'SVD to Ada converter' with Quentin. I'm not sure if this is the right place to discuss details of such a converter or if there should be another place?!
Regarding your last comment: Copy/paste could be a possibility if there is manual work to do anyway.
Nevertheless, I would prefer a clean separation between the register definitions (= the part with a direct correspondence to the UM of the processor, ideally autogenerated, in reality perhaps with some manual finishing) and functions/procedures based on these definitions. Even if this means that someone has to find even more sensible package names... ;-)
I don't like the idea of hiding the definitions in a private part. I would keep the possibility to access the registers directly - using the convenience functions should not be mandatory.
from ada_drivers_library.
Yes, you should work with Fabien.
I would very much welcome automatic generation, even if incomplete. Deciding whether or not to generate it within the text of a package declaration is a secondary matter.
from ada_drivers_library.
Hello Matthias,
The transition of this drivers repository to make use of the SVD branch is now almost complete. Only one step left (merge the 'svd' branch with the 'master' branch). Il will thus close this Issue.
Best regards,
- Jerome
from ada_drivers_library.
Related Issues (20)
- Support LSM303AGR for newer micro:bit hardware revisions HOT 1
- Target not found for Micro:Bit with Debian Linux HOT 3
- Project Wizard doesn't generate startup files HOT 3
- Include directions in examples/README.md to have compatible versions of bb-runtimes and compiler
- Support for Adafruit Feather M0 board HOT 3
- mma8653 initialization fails on MicroBit HOT 21
- EXAMPLES: Installing run-time dependencies fails with both Python 2 and Python 3 on Linux HOT 2
- Make HAL packages preelaborable HOT 1
- I2C HAL ideas HOT 15
- Many warnings with GCC 12 HOT 2
- RISC-V requires "zicsr" ISA extension to build with FSF GNAT 12.1.1 HOT 11
- IO expander MCP23x08 reports GPIO mode always as Output HOT 1
- Support for STM32F411CEU6 board HOT 1
- Extension zicsr required in HiFive1_rev_B board
- Microbit.Time resets the board
- How to get the toolchain up and running? HOT 15
- Compiler crash with pragma Ada_2022 on body HOT 2
- gnatprove incompatibility
- Incorrect usage of 'Val instead of 'Enum_Val HOT 4
- No repository for HAL crate available. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ada_drivers_library.