Documentation
¶
Index ¶
- Constants
- func AddFiles(parent *yaml.Node, files []string)
- func AddGroup(parent *yaml.Node, group string) *yaml.Node
- func AddGroupsAndFiles(node *yaml.Node, zephyr *yaml.Node, groups []string, files []string)
- func AddWestFilesToCbuild(westInfo WestBuildInfo) error
- func AppendFileToGroupUniquely(fileTree *[]Filetree, group, file string)
- func AppendUnique[T comparable](slice []T, elems ...T) []T
- func CheckEnvVars(vars []string)
- func CheckWestSetup() error
- 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 GetCompilerRootFromRootsCMake(filePath string) (string, error)
- func GetDefaultCmsisPackRoot() (root string)
- func GetExecutablePath() (string, error)
- func GetGroupNames(module string) []string
- 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 SetYamlNodeKeyValue(node *yaml.Node, key string, value 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 ¶
View Source
const App = "App"
Group names
View Source
const Generated = "Generated"
View Source
const ZephyrModules = "Zephyr Modules"
View Source
const ZephyrSources = "Zephyr Sources"
Variables ¶
This section is empty.
Functions ¶
func AddGroupsAndFiles ¶ added in v2.13.0
func AddWestFilesToCbuild ¶ added in v2.12.0
func AddWestFilesToCbuild(westInfo WestBuildInfo) error
func AppendFileToGroupUniquely ¶ added in v2.13.0
func AppendUnique ¶
func AppendUnique[T comparable](slice []T, elems ...T) []T
func CheckEnvVars ¶ added in v2.13.0
func CheckEnvVars(vars []string)
func CheckWestSetup ¶ added in v2.13.0
func CheckWestSetup() error
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. silently exits (nothing to delete) if the path does not exist.
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 GetCompilerRootFromRootsCMake ¶ added in v2.13.0
GetCompilerRootFromRootsCMake parses a roots.cmake file and returns the value set for CMSIS_COMPILER_ROOT
func GetDefaultCmsisPackRoot ¶
func GetDefaultCmsisPackRoot() (root string)
func GetExecutablePath ¶
func GetGroupNames ¶ added in v2.13.0
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
func SetYamlNodeKeyValue ¶ added in v2.13.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"`
West struct {
AppPath string `yaml:"app-path"`
} `yaml:"west"`
} `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 {
PlainOutput bool // Indicates if a "plain output" is required instead of "interactive terminal"
// contains filtered or unexported fields
}
func (Runner) ExecuteCommand ¶
type RunnerInterface ¶
Click to show internal directories.
Click to hide internal directories.