tree

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADFDirectory added in v0.10.0

func ADFDirectory(naosPath string) string

ADFDirectory returns the assumed location of the esp-adf directory.

Note: It will not check if the directory exists.

func AppBinary

func AppBinary(naosPath string) ([]byte, error)

AppBinary will return the bytes of the built app binary.

func Attach

func Attach(naosPath, port string, out io.Writer, in io.Reader) error

Attach will attach to the specified serial port using the idf.py monitor.

func BinDirectory

func BinDirectory(naosPath string) (string, error)

BinDirectory returns the assumed location of the xtensa toolchain 'bin' directory.

Note: It will not check if the directory exists.

func Build

func Build(naosPath, target string, overrides map[string]string, files []string, clean, reconfigure, appOnly bool, out io.Writer) error

Build will build the project.

func Config added in v0.8.0

func Config(naosPath string, values map[string]string, port string, out io.Writer) error

Config will write settings and parameters to an attached device.

func Directory

func Directory(naosPath string) string

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 Flash

func Flash(naosPath, target, port, baudRate string, erase, appOnly, alt bool, out io.Writer) error

Flash will flash the project using the specified serial port.

func Format

func Format(naosPath string, out io.Writer) error

Format will format all source files in the project if 'clang-format' is available.

func IDFDirectory

func IDFDirectory(naosPath string) string

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

func IDFMajorVersion(naosPath string) (int, error)

IDFMajorVersion will detect and return the major IDF version from the specified path.

func IDFVersion added in v0.11.0

func IDFVersion(naosPath string) (string, error)

IDFVersion will detect and return the IDF version from the specified path.

func IncludeDirectories

func IncludeDirectories(naosPath string) ([]string, error)

IncludeDirectories returns a list of directories that will be included in the build process.

func Install

func Install(naosPath, sourcePath, dataPath, version string, force bool, out io.Writer) error

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

func InstallAudioFramework(naosPath, version string, force bool, out io.Writer) error

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 InstallToolchain

func InstallToolchain(naosPath string, force bool, out io.Writer) error

InstallToolchain will install the toolchain for v4+ projects. An existing toolchain will be removed if force is set to true. If out is not nil, it will be used to log information about the installation process.

func InstallToolchain3 added in v0.9.0

func InstallToolchain3(naosPath, version string, force bool, out io.Writer) error

InstallToolchain3 will install the toolchain for v3 projects. An existing toolchain will be removed if force is set to true. If out is not nil, it will be used to log information about the installation process.

func ParseCoredump

func ParseCoredump(naosPath string, coredump []byte) ([]byte, error)

ParseCoredump will parse the provided raw coredump data and return a human-readable representation.

func RequiredToolchain

func RequiredToolchain(naosPath string) (string, error)

RequiredToolchain returns the required toolchain version by the current NAOS installation.

func SourceAndHeaderFiles

func SourceAndHeaderFiles(naosPath string) ([]string, []string, error)

SourceAndHeaderFiles will return a list of source and header files.

func WriteCMakeLists

func WriteCMakeLists(naosPath string, out io.Writer) error

WriteCMakeLists will write a CMakeLists.txt with all included directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL