func loaderFromPaths(t *target.Target) []string { if t.LoaderName == "" { return nil } return []string{ /* <loader>.elf */ builder.AppElfPath(t.Name(), builder.BUILD_NAME_LOADER, t.Loader().Name()), /* <app>.img */ builder.AppImgPath(t.Name(), builder.BUILD_NAME_LOADER, t.Loader().Name()), } }
func NewTargetTester(target *target.Target, testPkg *pkg.LocalPackage) (*TargetBuilder, error) { if err := target.Validate(testPkg == nil); err != nil { return nil, err } bspPkg, err := pkg.NewBspPackage(target.Bsp()) if err != nil { return nil, err } compilerPkg, err := project.GetProject().ResolvePackage( bspPkg.Repo(), bspPkg.CompilerName) if err != nil { return nil, err } t := &TargetBuilder{ target: target, bspPkg: bspPkg, compilerPkg: compilerPkg, appPkg: target.App(), loaderPkg: target.Loader(), testPkg: testPkg, injectedSettings: map[string]string{}, } return t, nil }