Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BareCommand ¶
func (BareCommand) Run ¶
func (cmd BareCommand) Run(ctx *Context) error
type Context ¶
type Context struct { // Build options HardwareDirs paths.PathList BuiltInToolsDirs paths.PathList BuiltInLibrariesDirs *paths.Path OtherLibrariesDirs paths.PathList LibraryDirs paths.PathList // List of paths pointing to individual library root folders WatchedLocations paths.PathList FQBN *cores.FQBN Clean bool // Build options are serialized here BuildOptionsJson string BuildOptionsJsonPrevious string PackageManager *packagemanager.Explorer RequiredTools []*cores.ToolRelease TargetBoard *cores.Board TargetPackage *cores.Package TargetPlatform *cores.PlatformRelease ActualPlatform *cores.PlatformRelease BuildProperties *properties.Map BuildPath *paths.Path SketchBuildPath *paths.Path CoreBuildPath *paths.Path CoreBuildCachePath *paths.Path CoreArchiveFilePath *paths.Path CoreObjectsFiles paths.PathList LibrariesBuildPath *paths.Path LibrariesObjectFiles paths.PathList SketchObjectFiles paths.PathList IgnoreSketchFolderNameErrors bool Sketch *sketch.Sketch WarningsLevel string // Libraries handling LibrariesManager *librariesmanager.LibrariesManager LibrariesResolver *librariesresolver.Cpp ImportedLibraries libraries.List LibrariesResolutionResults map[string]LibraryResolutionResult IncludeFolders paths.PathList UseCachedLibrariesResolution bool // C++ Parsing LineOffset int // Verbosity settings Verbose bool // Dry run, only create progress map Progress ProgressStruct // Send progress events to this callback ProgressCB rpc.TaskProgressCB // Custom build properties defined by user (line by line as "key=value" pairs) CustomBuildProperties []string // Reuse old tools since the backing storage didn't change CanUseCachedTools bool // Experimental: use arduino-preprocessor to create prototypes UseArduinoPreprocessor bool // Parallel processes Jobs int // Out and Err stream to redirect all output Stdout io.Writer Stderr io.Writer // Sizer results ExecutableSectionsSize ExecutablesFileSections // Compilation Database to build/update CompilationDatabase *builder.CompilationDatabase // Set to true to skip build and produce only Compilation Database OnlyUpdateCompilationDatabase bool // Source code overrides (filename -> content map). // The provided source data is used instead of reading it from disk. // The keys of the map are paths relative to sketch folder. SourceOverride map[string]string // contains filtered or unexported fields }
Context structure
func (*Context) ExtractBuildOptions ¶
func (ctx *Context) ExtractBuildOptions() *properties.Map
func (*Context) PushProgress ¶
func (ctx *Context) PushProgress()
type ExecutableSectionSize ¶
type ExecutableSectionSize struct { Name string `json:"name"` Size int `json:"size"` MaxSize int `json:"max_size"` }
ExecutableSectionSize represents a section of the executable output file
type ExecutablesFileSections ¶
type ExecutablesFileSections []ExecutableSectionSize
ExecutablesFileSections is an array of ExecutablesFileSection
func (ExecutablesFileSections) ToRPCExecutableSectionSizeArray ¶
func (s ExecutablesFileSections) ToRPCExecutableSectionSizeArray() []*rpc.ExecutableSectionSize
ToRPCExecutableSectionSizeArray transforms this array into a []*rpc.ExecutableSectionSize
type LibraryResolutionResult ¶
type ProgressStruct ¶
type ProgressStruct struct { Progress float32 StepAmount float32 Parent *ProgressStruct }
func (*ProgressStruct) AddSubSteps ¶
func (p *ProgressStruct) AddSubSteps(steps int)
func (*ProgressStruct) CompleteStep ¶
func (p *ProgressStruct) CompleteStep()
func (*ProgressStruct) RemoveSubSteps ¶
func (p *ProgressStruct) RemoveSubSteps()
type SourceFile ¶
type SourceFile struct { // Sketch or Library pointer that this source file lives in Origin interface{} // Path to the source file within the sketch/library root folder RelativePath *paths.Path }
func MakeSourceFile ¶
func MakeSourceFile(ctx *Context, origin interface{}, path *paths.Path) (*SourceFile, error)
Create a SourceFile containing the given source file path within the given origin. The given path can be absolute, or relative within the origin's root source folder
func (*SourceFile) DepfilePath ¶
func (f *SourceFile) DepfilePath(ctx *Context) *paths.Path
func (*SourceFile) Equals ¶
func (f *SourceFile) Equals(g *SourceFile) bool
func (*SourceFile) ObjectPath ¶
func (f *SourceFile) ObjectPath(ctx *Context) *paths.Path
func (*SourceFile) SourcePath ¶
func (f *SourceFile) SourcePath(ctx *Context) *paths.Path
type UniqueSourceFileQueue ¶
type UniqueSourceFileQueue []*SourceFile
func (UniqueSourceFileQueue) Contains ¶
func (queue UniqueSourceFileQueue) Contains(target *SourceFile) bool
func (UniqueSourceFileQueue) Empty ¶
func (queue UniqueSourceFileQueue) Empty() bool
func (*UniqueSourceFileQueue) Pop ¶
func (queue *UniqueSourceFileQueue) Pop() *SourceFile
func (*UniqueSourceFileQueue) Push ¶
func (queue *UniqueSourceFileQueue) Push(value *SourceFile)
Click to show internal directories.
Click to hide internal directories.