Documentation
¶
Overview ¶
Package tree provides utility functions to manage the NAOS build tree.
Package tree provides utility functions to manage the NAOS build tree.
Index ¶
- func ADFDirectory(naosPath string) string
- func AppBinary(naosPath, appName string) string
- func AppELF(naosPath, appName string) string
- func Attach(naosPath, port string, noReset bool, out io.Writer, in io.Reader) error
- func Build(naosPath, appName, tagPrefix, target string, overrides map[string]string, ...) error
- func Bundle(naosPath, file string, addDebug bool, out io.Writer) error
- func Config(naosPath string, values map[string]string, port, baudRate string, ...) error
- func Directory(naosPath string) string
- func Exec(naosPath string, out io.Writer, in io.Reader, noEnv, usePty bool, name string, ...) error
- func Flash(naosPath, port, baudRate string, erase, appOnly, alt bool, out io.Writer) error
- func Format(naosPath string, out io.Writer) error
- func IDFDirectory(naosPath string) string
- func IDFMajorVersion(naosPath string) (int, error)
- func IDFVersion(naosPath string) (string, error)
- func IncludeDirectories(naosPath string) ([]string, error)
- func Install(naosPath, sourcePath, dataPath, version string, force bool, out io.Writer) error
- func InstallAudioFramework(naosPath, version string, force bool, out io.Writer) error
- func InstallComponent(projectPath, naosPath, name, path, repository, version string, force bool, ...) error
- func InstallRegistryComponents(projectPath, naosPath string, components []IDFComponent, force bool, ...) error
- func LoadCoredump(naosPath, appName, elf, port, baudRate string, out io.Writer) ([]byte, error)
- func ParseCoredump(naosPath, appName, elf string, coredump []byte) ([]byte, error)
- func PruneComponents(naosPath string, names []string, out io.Writer) error
- func ReadConfig(naosPath, port, baudRate string, out io.Writer) (map[string]string, error)
- func SourceAndHeaderFiles(naosPath string) ([]string, []string, error)
- func WriteCMakeLists(naosPath string, out io.Writer) error
- func WriteEnvCache(naosPath string) error
- type IDFComponent
- type Partitions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ADFDirectory ¶ added in v0.10.0
ADFDirectory returns the assumed location of the esp-adf directory.
Note: It will not check if the directory exists.
func Build ¶
func Build(naosPath, appName, tagPrefix, target string, overrides map[string]string, files []string, partitions *Partitions, clean, reconfigure, appOnly bool, out io.Writer) error
Build will build the project.
func Directory ¶
Directory returns the assumed location of the build tree directory.
Note: It will not check if the directory exists.
func Exec ¶
func Exec(naosPath string, out io.Writer, in io.Reader, noEnv, usePty bool, name string, arg ...string) error
Exec runs a named command in the build tree. All xtensa toolchain binaries are made available in the path transparently.
func IDFDirectory ¶
IDFDirectory returns the assumed location of the esp-idf directory.
Note: It will not check if the directory exists.
func IDFMajorVersion ¶ added in v0.9.0
IDFMajorVersion will detect and return the major IDF version from the specified path.
func IDFVersion ¶ added in v0.11.0
IDFVersion will detect and return the IDF version from the specified path.
func IncludeDirectories ¶
IncludeDirectories returns a list of directories that will be included in the build process.
func Install ¶
Install will install the NAOS repo to the specified path and link the source path into the build tree.
func InstallAudioFramework ¶ added in v0.10.0
InstallAudioFramework will manage the esp-adf installation.
func InstallComponent ¶
func InstallComponent(projectPath, naosPath, name, path, repository, version string, force bool, out io.Writer) error
InstallComponent will install the specified component in the build tree.
func InstallRegistryComponents ¶ added in v0.12.1
func InstallRegistryComponents(projectPath, naosPath string, components []IDFComponent, force bool, out io.Writer) error
InstallRegistryComponents will install the specified registry components.
func LoadCoredump ¶ added in v0.14.3
LoadCoredump will read the coredump from the flash of an attached device and return a human-readable representation.
func ParseCoredump ¶
ParseCoredump will parse the provided raw coredump data and return a human-readable representation.
func PruneComponents ¶ added in v0.16.0
PruneComponents will remove all components from the build tree that are not part of the provided list. This is needed as the build system picks up every directory in "components" and would keep compiling removed components.
func ReadConfig ¶ added in v0.16.4
ReadConfig will read the parameters stored on an attached device.
func SourceAndHeaderFiles ¶
SourceAndHeaderFiles will return a list of source and header files.
func WriteCMakeLists ¶
WriteCMakeLists will write a CMakeLists.txt with all included directories.
func WriteEnvCache ¶ added in v0.16.0
WriteEnvCache will source the ESP-IDF export script and cache the resulting environment in the build tree. Sourcing the script takes a few seconds, so the cache is what keeps subsequent commands fast.
Types ¶
type IDFComponent ¶ added in v0.12.1
IDFComponent represents a component in the idf-components.yml file.