Ignoring AVR8 registers that are not in the data address space
This commit is contained in:
@@ -66,7 +66,7 @@ TargetDescriptionFile::TargetDescriptionFile(
|
||||
matchingDescriptionFiles.begin(),
|
||||
matchingDescriptionFiles.end(),
|
||||
std::back_inserter(targetNames),
|
||||
[](const QJsonValue& descriptionFile) {
|
||||
[] (const QJsonValue& descriptionFile) {
|
||||
return QString("\"" + descriptionFile.toObject().find("targetName")->toString().toLower() + "\"");
|
||||
}
|
||||
);
|
||||
@@ -473,6 +473,11 @@ void TargetDescriptionFile::loadTargetRegisterDescriptors() {
|
||||
auto& peripheralRegisterGroups = this->peripheralRegisterGroupsMappedByModuleRegisterGroupName
|
||||
.at(registerGroupName);
|
||||
for (const auto& peripheralRegisterGroup : peripheralRegisterGroups) {
|
||||
if (peripheralRegisterGroup.addressSpaceId.value_or("") != "data") {
|
||||
// Currently, we only deal with registers in the data address space.
|
||||
continue;
|
||||
}
|
||||
|
||||
for (const auto& [moduleRegisterName, moduleRegister] : registerGroup.registersMappedByName) {
|
||||
if (moduleRegister.size < 1) {
|
||||
continue;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Bloom::Targets::TargetDescription
|
||||
std::string name;
|
||||
std::optional<std::string> moduleName;
|
||||
std::optional<std::uint16_t> offset;
|
||||
std::optional<std::string> addressSpaceId;
|
||||
std::map<std::string, Register> registersMappedByName;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -173,6 +173,10 @@ RegisterGroup TargetDescriptionFile::generateRegisterGroupFromXml(const QDomElem
|
||||
registerGroup.moduleName = xmlElement.attribute("name-in-module").toLower().toStdString();
|
||||
}
|
||||
|
||||
if (xmlElement.hasAttribute("address-space")) {
|
||||
registerGroup.addressSpaceId = xmlElement.attribute("address-space").toLower().toStdString();
|
||||
}
|
||||
|
||||
if (xmlElement.hasAttribute("offset")) {
|
||||
registerGroup.offset = xmlElement.attribute("offset").toInt(nullptr, 16);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user