Retrieving AVR8 target registers and including them in the TargetDescriptor

This commit is contained in:
Nav
2021-08-07 17:15:48 +01:00
parent fd719f1cda
commit d709c8aac9
8 changed files with 205 additions and 12 deletions

View File

@@ -169,6 +169,10 @@ RegisterGroup TargetDescriptionFile::generateRegisterGroupFromXml(const QDomElem
throw Exception("Empty register group name");
}
registerGroup.moduleName = xmlElement.hasAttribute("name-in-module")
? xmlElement.attribute("name-in-module").toLower().toStdString()
: registerGroup.name;
if (xmlElement.hasAttribute("offset")) {
registerGroup.offset = xmlElement.attribute("offset").toInt(nullptr, 16);
}
@@ -207,6 +211,10 @@ Register TargetDescriptionFile::generateRegisterFromXml(const QDomElement& xmlEl
throw Exception("Empty register name");
}
if (xmlElement.hasAttribute("caption")) {
reg.caption = xmlElement.attribute("caption").toStdString();
}
bool conversionStatus;
reg.size = xmlElement.attribute("size").toUShort(nullptr, 10);
reg.offset = xmlElement.attribute("offset").toUShort(&conversionStatus, 16);