chiptools.wrappers.toolchains module

ToolchainBase provides a base class for all tool wrappers and provides the ability to automatically detect the presence of the toolchain on the user’s system by searching the PATH variable. For system configurations where the toolchain is not available on the user PATH, or there are multiple versions of a toolchain, the .chiptoolsconfig configuration file in the user home directory can be updated to point directly to the toolchain installation directories.

class chiptools.wrappers.toolchains.ToolchainBase(project, executables, user_paths)[source]

Bases: object

static environ_paths()[source]

Return a list of the paths found in the PATH environment variable.

executables: List[str] = []
static find_executable(executable, paths)[source]

Form a list of paths from the input path list pointing to the given executable. Only paths that point to the executable in the file system will be returned.

static find_toolchain(executables, paths)[source]

Return the first path from the paths list that contains all supplied executable names.

static get_path(executables)[source]

Return the first path in the PATH environment path list that contains all of the executable names required by this toolchain.