[fpc-devel] Missing constants in AVR controller files

Christo christo.crause at gmail.com
Sun Aug 27 07:57:33 CEST 2017


I have noticed missing/incorrectly labeled constants in e.g.
atmega328p.pp, such as the SPI clock rate bit names SPR0/SPR1.  In
atmega328p.pp there is a single constant labeled SPR = 1; which is
obviously wrong compared with the datasheet. I've noticed other missing
constant labels and on closer inspection it appears that the confusion
could have originated during parsing of the atdf files where sequential
bits such as SPR0/SPR1 is represented as:

<bitfield caption="SPI Clock Rate Selects" mask="0x03" name="SPR"
values="COMM_SCK_RATE_3BIT"/>

Another example of sequential bits are UCSZ00/UCSZ01 which is
represented as:

<bitfield caption="Character Size" mask="0x06" name="UCSZ0"/>

I'm not sure whether the controller units where indeed generated from
the atdf (XML) files? If so could someone (laksen?) share the script
used to generate these files so that I can try and fix these issues (if
indeed I have correctly identify the root problem)?



More information about the fpc-devel mailing list