summaryrefslogtreecommitdiff
path: root/zephyr/zmake/README.md
blob: 63144a32db67209640ad175a8fd4c1625138c314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Zmake

<!-- Auto-generated contents!  Run "zmake generate-readme" to update. -->

[TOC]

## Usage

**Usage:** `zmake [-h] [--checkout CHECKOUT] [-j JOBS] [--goma] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL} | -D] [-L] [--log-label] [--modules-dir MODULES_DIR] [--zephyr-base ZEPHYR_BASE] subcommand ...`

Chromium OS's meta-build tool for Zephyr

#### Positional Arguments

|   |   |
|---|---|
| `subcommand` | Subcommand to run |

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `--checkout CHECKOUT` | Path to ChromiumOS checkout |
| `-j JOBS`, `--jobs JOBS` | Degree of multiprogramming to use |
| `--goma` | Enable hyperspeed compilation with Goma! (Googlers only) |
| `-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}`, `--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}` | Set the logging level (default=INFO) |
| `-D`, `--debug` | Alias for --log-level=DEBUG |
| `-L`, `--no-log-label` | Turn off logging labels |
| `--log-label` | Turn on logging labels |
| `--modules-dir MODULES_DIR` | The path to a directory containing all modules needed.  If unspecified, zmake will assume you have a Chrome OS checkout and try locating them in the checkout. |
| `--zephyr-base ZEPHYR_BASE` | Path to Zephyr OS repository |

## Subcommands

### zmake configure

**Usage:** `zmake configure [-h] [-t TOOLCHAIN] [--bringup] [--clobber] [--allow-warnings] [-B BUILD_DIR] [-b] [--test] project_name_or_dir [-c]`

#### Positional Arguments

|   |   |
|---|---|
| `project_name_or_dir` | Path to the project to build |

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `-t TOOLCHAIN`, `--toolchain TOOLCHAIN` | Name of toolchain to use |
| `--bringup` | Enable bringup debugging features |
| `--clobber` | Delete existing build directories, even if configuration is unchanged |
| `--allow-warnings` | Do not treat warnings as errors |
| `-B BUILD_DIR`, `--build-dir BUILD_DIR` | Build directory |
| `-b`, `--build` | Run the build after configuration |
| `--test` | Test the .elf file after configuration |
| `-c`, `--coverage` | Enable CONFIG_COVERAGE Kconfig. |

### zmake build

**Usage:** `zmake build [-h] build_dir [-w]`

#### Positional Arguments

|   |   |
|---|---|
| `build_dir` | The build directory used during configuration |

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `-w`, `--fail-on-warnings` | Exit with code 2 if warnings are detected |

### zmake list-projects

**Usage:** `zmake list-projects [-h] [--format FORMAT] [search_dir]`

#### Positional Arguments

|   |   |
|---|---|
| `search_dir` | Optional directory to search for BUILD.py files in. |

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `--format FORMAT` | Output format to print projects (str.format(config=project.config) is called on this for each project). |

### zmake test

**Usage:** `zmake test [-h] [-c] build_dir`

#### Positional Arguments

|   |   |
|---|---|
| `build_dir` | The build directory used during configuration |

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `-c`, `--coverage` | Run lcov after running test to generate coverage info file. |

### zmake testall

**Usage:** `zmake testall [-h] [--clobber] [-B BUILD_DIR]`

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `--clobber` | Delete existing build directories, even if configuration is unchanged |
| `-B BUILD_DIR`, `--build-dir BUILD_DIR` | Build directory |

### zmake coverage

**Usage:** `zmake coverage [-h] [--clobber] build_dir`

#### Positional Arguments

|   |   |
|---|---|
| `build_dir` | The build directory used during configuration |

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `--clobber` | Delete existing build directories, even if configuration is unchanged |

### zmake generate-readme

**Usage:** `zmake generate-readme [-h] [-o OUTPUT_FILE] [--diff]`

#### Optional Arguments

|   |   |
|---|---|
| `-h`, `--help` | show this help message and exit |
| `-o OUTPUT_FILE`, `--output-file OUTPUT_FILE` | File to write to.  It will only be written if changed. |
| `--diff` | If specified, diff the README with the expected contents instead of writing out. |