Closed ianmcmahon closed 5 years ago
One thing I found is that it doesn't handle bare named registers, for instance DSI has a register called simply "VR", and there's a define for "DSIVR"; stm32xgen looks for a register called "VR
I put in code to skip any register bitmasks that end in _\d
, they were failing to parse
The issue of redefined constants seems to be unrelated; I don't think stm32xgen has any provision to deal with register bits that have the same name in different registers.
I got a handle on the tweaks code in stm32xgen, came up with solutions to the issues and made a pull request:
I've got an stm32f469 discovery board, I've added preliminary support for the chip and can successfully run blinky.
I'm trying to write a driver for the dsi display peripheral, and stm32xgen doesn't seem to handle its registers properly, along with perhaps a lot of other registers. The common factor seems to be registers which expose individual bits I think? like this:
The generated dsi.go has a bunch of constants with the same name, and I get a ton of errors:
etc
I'm looking at stm32xgen's parser and trying to understand how to correct this, but it's a bit hard to follow. Any suggestions?