Documentation
¶
Index ¶
- func AddWestFilesToCbuild(westInfo WestBuildInfo) error
- func AppendFileToGroup(fileTree *[]Filetree, group, file string)
- func AppendUnique[T comparable](slice []T, elems ...T) []T
- func ComparePaths(path1, path2 string) (bool, error)
- func Contains[T comparable](slice []T, elem T) bool
- func CreateContext(contextItem ContextItem) (context string)
- func DeleteAll(path string, excludeFilePatterns []string) error
- func ExecuteCommand(program string, args ...string) (string, string, error)
- func FileExists(filePath string) (bool, error)
- func FormatTime(time time.Duration) string
- func GetDefaultCmsisPackRoot() (root string)
- func GetExecutablePath() (string, error)
- func GetInstalledExePath(exeName string) (path string, err error)
- func GetModule(file string, modules []Module) string
- func GetOutDir(cbuildIdxFile string, context string) (string, error)
- func GetParentFolder(path string) (string, error)
- func GetTargetSetProjectContexts(csolutionFile string, selectedTargetSet string) []string
- func GetTmpDir(csolutionFile string, outputDir string) (string, error)
- func GetYamlNodeByKey(node *yaml.Node, key string) *yaml.Node
- func IsWildcardPattern(str string) bool
- func LogStdMsg(msg string)
- func MatchString(str string, pattern string) (bool, error)
- func NormalizePath(path string) string
- func ParseAndFetchToolchainInfo(toolchainFile string) string
- func ParseYAMLFile(filePath string, out interface{}) error
- func PrintSeparator(delimiter string, length int)
- func RemoveDuplicates(input []string) []string
- func ResolveContexts(allContext []string, contextFilters []string) ([]string, error)
- func SetExample(name string)
- func SetYamlNodeByKey(base *yaml.Node, node *yaml.Node, key string)
- func ToRegEx(str string) string
- type Cbuild
- type CbuildIndex
- type CbuildSet
- type CompileCommands
- type Configurations
- type ContextItem
- type Csolution
- type EnvVars
- type Filetree
- type Module
- type PerformanceTracker
- type Runner
- type RunnerInterface
- type WestBuildInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddWestFilesToCbuild ¶ added in v2.12.0
func AddWestFilesToCbuild(westInfo WestBuildInfo) error
func AppendFileToGroup ¶ added in v2.12.0
func AppendUnique ¶
func AppendUnique[T comparable](slice []T, elems ...T) []T
func ComparePaths ¶ added in v2.5.0
checks if two paths are equivalent
func Contains ¶
func Contains[T comparable](slice []T, elem T) bool
func CreateContext ¶
func CreateContext(contextItem ContextItem) (context string)
func DeleteAll ¶ added in v2.7.0
DeleteAll removes everything under path except files whose base name matches any of the provided glob patterns. If patterns is empty, it just calls os.RemoveAll.
func ExecuteCommand ¶ added in v2.5.0
This exclusive function returns the standard output and standard error as strings
func FileExists ¶ added in v2.5.0
func FormatTime ¶ added in v2.4.0
func GetDefaultCmsisPackRoot ¶
func GetDefaultCmsisPackRoot() (root string)
func GetExecutablePath ¶
func GetInstalledExePath ¶
func GetParentFolder ¶ added in v2.9.0
func GetTargetSetProjectContexts ¶ added in v2.12.0
func GetYamlNodeByKey ¶ added in v2.12.0
func IsWildcardPattern ¶
func NormalizePath ¶
func ParseAndFetchToolchainInfo ¶ added in v2.8.0
func ParseYAMLFile ¶ added in v2.7.0
func PrintSeparator ¶ added in v2.5.0
func RemoveDuplicates ¶ added in v2.5.0
func ResolveContexts ¶
func SetExample ¶ added in v2.9.0
func SetExample(name string)
func SetYamlNodeByKey ¶ added in v2.12.0
Types ¶
type Cbuild ¶ added in v2.7.0
type Cbuild struct {
Build struct {
OutputDirs struct {
Intdir string `yaml:"intdir"`
Outdir string `yaml:"outdir"`
} `yaml:"output-dirs"`
} `yaml:"build"`
}
func ParseCbuildFile ¶ added in v2.7.0
type CbuildIndex ¶
type CbuildIndex struct {
BuildIdx struct {
GeneratedBy string `yaml:"generated-by"`
Cdefault string `yaml:"cdefault"`
Csolution string `yaml:"csolution"`
TmpDir string `yaml:"tmpdir"`
Cprojects []struct {
Cproject string `yaml:"cproject"`
} `yaml:"cprojects"`
Licenses interface{} `yaml:"licenses"`
Cbuilds []struct {
Cbuild string `yaml:"cbuild"`
West bool `yaml:"west"`
Project string `yaml:"project"`
Configuration string `yaml:"configuration"`
Rebuild bool `yaml:"rebuild"`
Messages struct {
Warnings []string `yaml:"warnings"`
Info []string `yaml:"info"`
} `yaml:"messages"`
} `yaml:"cbuilds"`
Executes []interface{} `yaml:"executes"`
Rebuild bool `yaml:"rebuild"`
ImageOnly bool `yaml:"image-only"`
} `yaml:"build-idx"`
}
func ParseCbuildIndexFile ¶
func ParseCbuildIndexFile(cbuildIndexFile string) (CbuildIndex, error)
Wrapper functions for specific types
type CbuildSet ¶
type CbuildSet struct {
ContextSet struct {
GeneratedBy string `yaml:"generated-by"`
Contexts []struct {
Context string `yaml:"context"`
} `yaml:"contexts"`
Compiler string `yaml:"compiler"`
} `yaml:"cbuild-set"`
}
func ParseCbuildSetFile ¶
type CompileCommands ¶ added in v2.12.0
type CompileCommands struct {
Directory string `json:"directory"`
File string `json:"file"`
Output string `json:"output"`
Command string `json:"command"`
}
Compile Commands
func ParseCompileCommandsFile ¶ added in v2.12.0
func ParseCompileCommandsFile(compileCommandsFile string) ([]CompileCommands, error)
type Configurations ¶
func GetInstallConfigs ¶
func GetInstallConfigs() (configs Configurations, err error)
type ContextItem ¶
func ParseContext ¶
func ParseContext(context string) (item ContextItem, err error)
type Csolution ¶ added in v2.7.0
type Csolution struct {
Solution struct {
TargetTypes []struct {
Type string `yaml:"type"`
TargetSet []struct {
Set string `yaml:"set"`
Images []struct {
ProjectContext string `yaml:"project-context"`
} `yaml:"images"`
} `yaml:"target-set"`
} `yaml:"target-types"`
OutputDirs struct {
Tmpdir string `yaml:"tmpdir"`
} `yaml:"output-dirs"`
} `yaml:"solution"`
}
func ParseCsolutionFile ¶ added in v2.7.0
type EnvVars ¶
func UpdateEnvVars ¶
type PerformanceTracker ¶ added in v2.9.0
type PerformanceTracker struct{}
PerformanceTracker is a no-op stub version used in normal mode to resolve build errors
func GetTrackerInstance ¶ added in v2.9.0
func GetTrackerInstance(outputPath string) *PerformanceTracker
func (*PerformanceTracker) SaveResults ¶ added in v2.9.0
func (pt *PerformanceTracker) SaveResults() error
func (*PerformanceTracker) StartTracking ¶ added in v2.9.0
func (pt *PerformanceTracker) StartTracking(tool string, args string)
func (*PerformanceTracker) StopTracking ¶ added in v2.9.0
func (pt *PerformanceTracker) StopTracking()
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (Runner) ExecuteCommand ¶
type RunnerInterface ¶
Click to show internal directories.
Click to hide internal directories.