Commit Graph

6 Commits

Author SHA1 Message Date
Carles Cufi 9b4eb37f38 scripts: remove west from scripts/
west will now be installed via pip in order for the bootstrapper to be
decoupled from the west runners.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Marti Bolivar 9e3edbbd80 scripts: fix west launcher for macOS
The $(readlink -f) call in scripts/west doesn't work on macOS.

Let's just ensure compatibility on all the platforms by moving
scripts/west-launcher.py to scripts/west, making it executable on
macOS and Linux, and launching it from the Windows doskey macro.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-26 00:33:45 +02:00
Marti Bolivar 55b462cdfa scripts: update west to latest upstream version.
Update to the latest west. This includes a new 'attach' command. There
are also multi-repo commands, but those won't get exposed to the user
unless they install Zephyr using "west init" + "west fetch" (and not,
say, "git clone").

Replace the launchers; they now detect whether zephyr is part of a
multi-repo installation, and run the west code in its own repository
if that is the case.

This also requires an update to:

- the flash/debug CMakeLists.txt, as the new west package is no longer
  executable as a module and must have its main script run by the
  interpreter instead.

- the documentation, to reflect a rename and with a hack to fix
  the automodule directive in flash-debug.rst for now

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-25 17:51:22 +02:00
Marti Bolivar b6af8eb932 scripts: create meta-tool package, "west"
We have agreed to develop a meta-tool named "west", which will be a
swiss-army knife of Zephyr development. It will support use cases like
building, flashing and debugging; bootloader integration; emulator
support; and integration with multiple git repositories.

The basic usage for the tool is similar to git(1):

    west [common opts] <command-name> [command opts] [<command args>]

There are common options, such as verbosity control, followed by a
mandatory sub-command. The sub-command then takes its own options and
arguments.

This patch adds the basic framework for this tool, as follows:

- a Python 3 package named 'west', in scripts/meta. There is no PyPI
  integration for now; the tool will be improving quickly, so we need
  to keep users up to date by having it in tree.
- an main entry point, main.py, and a package-level shim, __main__.py
- a cmd subpackage, which defines the abstract base class for commands
- logging (log.py)
- catch-all utilities (util.py)
- Windows and Unix launchers so users can type "west" to run the tool
  after sourcing the appropriate zephyr-env script for their
  environment.

Subsequent patches will start to add individual commands.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-19 07:01:39 +03:00
Maureen Helm c33087d336 build: doc: Add support for a Windows equivalent to .zephyrrc
Adds support for setting user environment variables in the file
%userprofile%\zephyrrc.cmd

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-03-29 10:35:19 -04:00
Carles Cufi 980c0cf4ac build: win: Add a new zephyr-env.cmd file
Add a new zephyr-env.cmd that mirrors the functionality of zephyr-env.sh
but on Windows platforms. It sets ZEPHYR_BASE to the location of the
script.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-12 19:22:22 -05:00