This is an automated email from the ASF dual-hosted git repository.

mgorecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git


The following commit(s) were added to refs/heads/master by this push:
     new 427c42b2 builder: Add conditional flash map overrides in bsp.yml
427c42b2 is described below

commit 427c42b2198776fb28031408908e5413628b7e59
Author: Michal Gorecki <[email protected]>
AuthorDate: Tue Nov 26 11:01:46 2024 +0100

    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.
---
 newt/builder/targetbuild.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/newt/builder/targetbuild.go b/newt/builder/targetbuild.go
index 26cf2ec6..b8874503 100644
--- a/newt/builder/targetbuild.go
+++ b/newt/builder/targetbuild.go
@@ -95,6 +95,14 @@ func NewTargetTester(target *target.Target,
                injectedSettings: cfgv.NewSettings(nil),
        }
 
+       if err := t.ensureResolved(); err != nil {
+               return nil, err
+       }
+
+       if err := t.bspPkg.Reload(t.res.Cfg.SettingValues()); err != nil {
+               return nil, err
+       }
+
        return t, nil
 }
 

Reply via email to