Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libs/rtemodel/src/RteProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,11 @@ bool RteProject::AddTarget(const string& name, const map<string, string>& attrib
if (boardInfo) {
targetAttributes.AddAttributes(boardInfo->GetAttributes(), false);
}
if(targetAttributes.HasAttribute("Dname") &&
!targetAttributes.HasAttribute("Bname")) {
// set empty board name to filter-out board-specific items if device is selected
targetAttributes.AddAttribute("Bname", "");
}

// add Brevision attribute if Bversion is specified
if (!targetAttributes.HasAttribute("Brevision") && targetAttributes.HasAttribute("Bversion")) {
Expand Down
2 changes: 1 addition & 1 deletion libs/rtemodel/test/src/RteModelTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ TEST_F(RteModelPrjTest, LoadCprjM4) {
auto& allLayerDescriptors = rteKernel.GetGlobalModel()->GetLayerDescriptors();
EXPECT_EQ(allLayerDescriptors.size(), 10);
auto& filteredLayerDescriptors = activeTarget->GetFilteredModel()->GetLayerDescriptors();
EXPECT_EQ(filteredLayerDescriptors.size(), 10);
EXPECT_EQ(filteredLayerDescriptors.size(), 7);
ca = activeTarget->GetComponentAggregate("ARM::Device:Startup");
ASSERT_NE(ca, nullptr);
EXPECT_EQ(ca->GetAttribute("layer"), "LayerOne");
Expand Down
Loading