Skip to content

Commit 427c42b

Browse files
committed
builder: Add conditional flash map overrides in bsp.yml
This allows to conditionally override flash maps in bsp.yml and target.yml with bsp.flash_map.<CONDITION> Initial priority of bsp.yml and target.yml is preserved - if there is any bsp.flash_map definition in target.yml, all flash maps from bsp.yml are ignored. Default bsp.flash_map definition (without any condition) is still needed.
1 parent 61185b8 commit 427c42b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

newt/builder/targetbuild.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ func NewTargetTester(target *target.Target,
9595
injectedSettings: cfgv.NewSettings(nil),
9696
}
9797

98+
if err := t.ensureResolved(); err != nil {
99+
return nil, err
100+
}
101+
102+
if err := t.bspPkg.Reload(t.res.Cfg.SettingValues()); err != nil {
103+
return nil, err
104+
}
105+
98106
return t, nil
99107
}
100108

0 commit comments

Comments
 (0)