Skip to content

Commit 1458d80

Browse files
author
Donatien Garnier
authored
Merge pull request #1452 from ARMmbed/add_migration_guide
Add CLI 2 migration guide to docs.json
2 parents 085c00e + 704ac0a commit 1458d80

File tree

2 files changed

+51
-47
lines changed

2 files changed

+51
-47
lines changed

docs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,9 @@
10561056
},
10571057
{
10581058
"path": "docs/tools/mbed_cli_2/use.md"
1059+
},
1060+
{
1061+
"path": "docs/tools/mbed_cli_2/migration_guide.md"
10591062
}
10601063
]
10611064
},

docs/tools/mbed_cli_2/migration_guide.md

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,57 +12,57 @@ The background color indicates:
1212
in Mbed CLI 2 (mbed-tools)</span>
1313

1414
## Installers
15-
<span style="background-color:#ffe6cc;">Windows, macOS and Linux
16-
installers may be made available at later point of time.</span><br>
15+
<span style="display:block;background-color:#ffe6cc;">Windows, macOS and Linux
16+
installers may be made available at later point of time.</span>
1717

1818
## Commands
1919

2020
### Device management
21-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli
21+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli
2222
device-management` (device management) is deprecated. Refer to your cloud
23-
provider's documentation on how to cloud-manage your devices.</span><br>
23+
provider's documentation on how to cloud-manage your devices.</span>
2424

2525
### Repository management
26-
<span style="background-color:#ffcccc;">Support for Mercurial and the
26+
<span style="display:block;background-color:#ffcccc;">Support for Mercurial and the
2727
subcommand `mbed-cli publish` (publish program or library) is deprecated.
2828
Hosted repositories on "mbed.org" are not supported from Mbed CLI 2. Version
2929
control with git can be used as an alternative. Hosting for git repositories is
30-
available on [GitHub](https://github.com/).</span><br>
30+
available on [GitHub](https://github.com/).</span>
3131

32-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli cache`
32+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli cache`
3333
(repository cache management) is deprecated. No replacement is
34-
supported.</span><br>
34+
supported.</span>
3535

36-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli releases`
36+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli releases`
3737
(show release tags) is deprecated. We recommend using standard `git` commands
38-
instead, for example `git tag -l` to list all tagged releases.</span><br>
38+
instead, for example `git tag -l` to list all tagged releases.</span>
3939

40-
<span style="background-color:#ffe6cc;">The subcommand `mbed-cli
40+
<span style="display:block;background-color:#ffe6cc;">The subcommand `mbed-cli
4141
update` (update to branch, tag, revision or latest) is not implemented. Use
4242
standard `git` commands instead. From your application directory: to check out
4343
a branch of Mbed OS, `git -C mbed-os checkout branchname`; to checkout the Mbed
4444
OS 6.8.0 release, `git -C mbed-os checkout mbed-os-6.8.0`; to check out Mbed OS
4545
revision `3e24a7ea9602`, `git -C mbed-os checkout 3e24a7ea9602`; to checkout
4646
the latest released version of Mbed OS `git -C mbed-os checkout
47-
latest`.</span><br>
47+
latest`.</span>
4848

49-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli export`
49+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli export`
5050
(generate an IDE project) is deprecated. Use [CMake
5151
generators](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
5252
instead. While CMake supports many generators, including many not supported by
5353
Mbed CLI 1, not all of Mbed CLI 1's exporters have replacements available yet.
54-
The available project generators are listed below.</span><br>
54+
The available project generators are listed below.</span>
5555

5656
- [CodeBlocks](https://cmake.org/cmake/help/latest/generator/CodeBlocks.html)
5757
- [Eclipse](https://cmake.org/cmake/help/latest/generator/Eclipse%20CDT4.html)
5858
- [Make](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#id10)
5959
- [Qt Creator](https://doc.qt.io/qtcreator/creator-project-cmake.html)
6060
- [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
6161

62-
<span style="background-color:#ffcccc;">If you'd like to help us prioritize
62+
If you'd like to help us prioritize
6363
which CMake project generators to work on first, please give your thumbs up to
6464
the following issues you care most about, or [raise a merge request to
65-
CMake](https://gitlab.kitware.com/cmake/cmake/-/merge_requests):</span><br>
65+
CMake](https://gitlab.kitware.com/cmake/cmake/-/merge_requests):
6666

6767
- [CrossCore® Embedded Studio](https://github.com/ARMmbed/mbed-tools/issues/249)
6868
- [e<sup>2</sup> studio](https://github.com/ARMmbed/mbed-tools/issues/250)
@@ -75,45 +75,45 @@ CMake](https://gitlab.kitware.com/cmake/cmake/-/merge_requests):</span><br>
7575

7676
### Library management
7777

78-
<span style="background-color:#ffcccc;">The subcommands `mbed-cli add` (add
78+
<span style="display:block;background-color:#ffcccc;">The subcommands `mbed-cli add` (add
7979
library from URL) and `mbed-cli remove` (remove library) are deprecated.
8080
Instead, use `git clone` or `mbed-tools import` to clone a library. Then,
8181
manually create a `reponame.lib` file that contains a single line in the form
8282
`https://github.com/ARMmbed/reponame#branch-or-tag` to fetch a specific branch
8383
or tag. If you want to fetch the default branch, you don't need to add
84-
`#branch-or-tag-name`.</span><br>
84+
`#branch-or-tag-name`.</span>
8585

86-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli new --library`
86+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli new --library`
8787
(force creation of an Mbed library) is deprecated. Create a new Mbed library by
8888
creating a new folder and adding it to git version control. Then, create a
8989
`reponame.lib` in the application you wish to use the new library from, as
90-
described above (in the `mbed-cli add` paragraph).</span><br>
90+
described above (in the `mbed-cli add` paragraph).</span>
9191

92-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli ls` (view
92+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli ls` (view
9393
dependency tree) is deprecated. The subcommand `mbed-tools deploy` will now
94-
display all dependencies.</span><br>
94+
display all dependencies.</span>
9595

9696
### Tool configuration
97-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli config` (tool
97+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli config` (tool
9898
configuration) is deprecated. There is no need to configure an Mbed-specific
9999
compiler path in Mbed CLI 2; the compiler path is determined in a standard way
100100
by CMake instead. Other configuration options, like `target`, `toolchain`,
101-
`protocol`, `depth` and `cache`, are not supported in Mbed CLI 2.</span><br>
101+
`protocol`, `depth` and `cache`, are not supported in Mbed CLI 2.</span>
102102

103-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli toolchain`
103+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli toolchain`
104104
(set or get default toolchain) is deprecated. Pass the desired toolchain on the
105105
command line when compiling with `mbed-tools compile --toolchain GCC_ARM`, to,
106-
for example, select `GCC_ARM` as the toolchain.</span><br>
106+
for example, select `GCC_ARM` as the toolchain.</span>
107107

108-
<span style="background-color:#ffcccc;">The subcommand `mbed-cli target` (set
108+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-cli target` (set
109109
or get default target) is deprecated. Pass the desired target on the command
110110
line when compiling with `mbed-tools compile --mbed-target
111111
DISCO_L475VG_IOT01A`, to, for example, select `DISCO_L475VG_IOT01A` as the
112-
Mbed target.</span><br>
112+
Mbed target.</span>
113113

114114

115115
### Creating an Mbed program
116-
<span style="background-color:#ffe6cc;">The subcommand `mbed-tools new` creates
116+
<span style="display:block;background-color:#ffe6cc;">The subcommand `mbed-tools new` creates
117117
a new Mbed program by default and supports only one command-line-option
118118
`--create-only` (create a program without fetching mbed-os). The following
119119
command-line options, previously supported in Mbed CLI 1, are deprecated:
@@ -134,12 +134,13 @@ command-line options, previously supported in Mbed CLI 1, are deprecated:
134134
* `--offline`: This is not needed, as there is no longer any Mbed-specific git
135135
cache.
136136
* `--no-requirements`: Mbed CLI 2 never automatically installs requirements.
137-
</span><br>
137+
</span>
138138

139139
### Importing an Mbed program
140-
<span style="background-color:#ffe6cc;">The subcommand `mbed-tools
140+
<div>
141+
<span style="display:block;background-color:#ffe6cc;">The subcommand `mbed-tools
141142
import` clones an Mbed project and library dependencies. The following
142-
command-line-options supported in Mbed CLI 1 are deprecated:
143+
command-line-options supported in Mbed CLI 1 are deprecated:</span>
143144

144145
* `--depth`: The new CLI opportunistically imports the most shallow repository
145146
possible. Running `git clone --depth <depth> <repo_url> | cd <repo_name> &&
@@ -163,50 +164,50 @@ command-line-options supported in Mbed CLI 1 are deprecated:
163164
* `--no-requirements`
164165
* `--insecure`
165166

166-
</span><br>
167+
</div>
167168

168169
### Configuring an Mbed program
169170

170-
<span style="background-color:#ccffcc;">The subcommand `mbed-tools configure`
171+
<span style="display:block;background-color:#ccffcc;">The subcommand `mbed-tools configure`
171172
generates an Mbed OS config CMake file named `mbed_config.cmake` in the path
172-
`cmake_build/<TARGET_NAME>/<PROFILE>/<TOOLCHAIN>/`.</span><br>
173+
`cmake_build/<TARGET_NAME>/<PROFILE>/<TOOLCHAIN>/`.</span>
173174

174175
### Compiling an Mbed program
175176

176-
<span style="background-color:#ffcccc;">The subcommand `mbed-tools
177+
<span style="display:block;background-color:#ffcccc;">The subcommand `mbed-tools
177178
compile` can be used to compile the program. The command-line-option `mbed
178179
compile --source` is deprecated. To control which libraries and directories you
179180
want to build either modify your application's `CMakeLists.txt` to add/exclude
180181
or use `cmake --build cmake_build --target <library_name> --target
181-
<other_library_name>` to add any number of targets to your build.</span><br>
182+
<other_library_name>` to add any number of targets to your build.</span>
182183

183-
<span style="background-color:#ffcccc;">The command-line-option `mbed
184+
<span style="display:block;background-color:#ffcccc;">The command-line-option `mbed
184185
compile --library` is deprecated. Use standard CMake `add_library()`
185-
instead.</span><br>
186+
instead.</span>
186187

187-
<span style="background-color:#ffcccc;">The command-line-option `mbed compile
188+
<span style="display:block;background-color:#ffcccc;">The command-line-option `mbed compile
188189
-DMACRO_NAME` is deprecated. Use `mbed-tools configure -m <TARGET_NAME> -t
189190
<TOOLCHAIN>` followed by `cmake -S . -B
190191
cmake_build/<TARGET_NAME>/<PROFILE>/<TOOLCHAIN> -GNinja -DMACRO_NAME` and
191192
`cmake --build cmake_build` or use
192193
[`target_compile_definitions()`](https://cmake.org/cmake/help/latest/command/target_compile_definitions.html)
193-
in your application's `CMakeLists.txt` the add the define.</span><br>
194+
in your application's `CMakeLists.txt` the add the define.</span>
194195

195-
<span style="background-color:#ffcccc;">The command-line-option `mbed compile
196+
<span style="display:block;background-color:#ffcccc;">The command-line-option `mbed compile
196197
-m detect` to automatically build for the single target connected to your
197198
computer is deprecated. Run `mbed-tools detect` to see which targets are
198199
connected to your computer and then run `mbed-tools compile -m <TARGET_NAME> -t
199-
<TOOLCHAIN>` to build for the target you which to build for.</span><br>
200+
<TOOLCHAIN>` to build for the target you which to build for.</span>
200201

201-
<span style="background-color:#ffe6cc;">The command-line-option `mbed
202+
<span style="display:block;background-color:#ffe6cc;">The command-line-option `mbed
202203
compile --build` will be supported at later point of time. Although we don't
203204
currently have the option to explicitly state the application's build path, we
204205
have a ticket open to track the issue
205-
[#184](https://github.com/ARMmbed/mbed-tools/issues/184).</span><br>
206+
[#184](https://github.com/ARMmbed/mbed-tools/issues/184).</span>
206207

207208
### Testing an Mbed program
208209

209-
<span style="background-color:#ffe6cc;">The subcommand `mbed test` will be
210+
<span style="display:block;background-color:#ffe6cc;">The subcommand `mbed test` will be
210211
supported at later point of time. Keep apprised of progress by following [the
211212
issue to support mbed test on
212-
GitHub](https://github.com/ARMmbed/mbed-tools/issues/151)</span><br>
213+
GitHub](https://github.com/ARMmbed/mbed-tools/issues/151)</span>

0 commit comments

Comments
 (0)