Skip to content
Open
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
Fix for @repo targets
Without the fix, building targets such as
target.app: "@mcuboot/boot/mynewt" fails,
since the path to the .manifest, .hex and .bin is wrong.

This can be fixed by using the target app's FullName() instead of Name().

Signed-off-by: Stefan Diewald <[email protected]>
  • Loading branch information
dwld committed Apr 1, 2020
commit 96899e5bf8bc894a9542b39fd91ba34492a4b0fd
2 changes: 1 addition & 1 deletion newt/mfg/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func newMfgBuildTarget(dt DecodedTarget,
}

mpath := builder.ManifestPath(dt.Name, builder.BUILD_NAME_APP,
t.App().Name())
t.App().FullName())
man, err := manifest.ReadManifest(mpath)
if err != nil {
return MfgBuildTarget{}, util.FmtNewtError("%s", err.Error())
Expand Down
10 changes: 5 additions & 5 deletions newt/mfg/emit.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,22 @@ type MfgEmitter struct {
func targetSrcBinPath(t *target.Target, isBoot bool) string {
if isBoot {
return builder.AppBinPath(t.Name(), builder.BUILD_NAME_APP,
t.App().Name())
t.App().FullName())
} else {
return builder.AppImgPath(t.Name(), builder.BUILD_NAME_APP,
t.App().Name())
t.App().FullName())
}
}

// Calculates the source path of a target's `.elf` file.
func targetSrcElfPath(t *target.Target) string {
return builder.AppElfPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name())
return builder.AppElfPath(t.Name(), builder.BUILD_NAME_APP, t.App().FullName())
}

// Calculates the source path of a target's manifest file.
func targetSrcManifestPath(t *target.Target) string {
return builder.ManifestPath(t.Name(), builder.BUILD_NAME_APP,
t.App().Name())
t.App().FullName())
}

func newMfgEmitTarget(bt MfgBuildTarget) (MfgEmitTarget, error) {
Expand All @@ -127,7 +127,7 @@ func newMfgEmitTarget(bt MfgBuildTarget) (MfgEmitTarget, error) {
BinPath: targetSrcBinPath(bt.Target, bt.IsBoot),
ElfPath: targetSrcElfPath(bt.Target),
ManifestPath: builder.ManifestPath(bt.Target.Name(),
builder.BUILD_NAME_APP, bt.Target.App().Name()),
builder.BUILD_NAME_APP, bt.Target.App().FullName()),
ExtraManifest: bt.ExtraManifest,
}, nil
}
Expand Down