Retrieving AVR8 target registers and including them in the TargetDescriptor
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user