Skip to content

Commit

Permalink
zephyr: improve the download instructions
Browse files Browse the repository at this point in the history
Use a code block for the `west download` command instead of inline code. Add
bullet points and better indentation for the VScode download step.

Signed-off-by: Mike Szczys <[email protected]>
  • Loading branch information
szczys committed Dec 4, 2024
1 parent 23d853a commit f355d2f
Showing 1 changed file with 30 additions and 22 deletions.
52 changes: 30 additions & 22 deletions website/docs/_partials/download-from-codespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,41 @@ because the Codespaces container doesn't have access to your local USB port.

:::

* In the VS Code terminal, run `west download` to package the compiled code and
make it available for download
1. In the VS Code terminal, use the following command to package the compiled
code and make it available for download:

* Unfold the Download folder in VS Codes file explorer. Right-click on the
`<devicename>_<appfolder>_<hhmmss>.hex` firmware file you just build and
select "Download..." to download it to your local machine.
```
west download
```
<details>
<summary>Show me how to download from Codespaces</summary>
2. Download the binary from Codespaces
![How to download binaries from Codespaces](./assets/codespaces_download_binary.png)
- Unfold the Download folder in VS Codes file explorer.
- Right-click on the `<devicename>_<appfolder>_<hhmmss>.hex` firmware file
you just built.
- select "Download..." to download it to your local machine.
Because Codespaces is a virtual machine running in the cloud, we cannot directly
program the device connected to your local machine. Instead, we will download
the binary so that your local machine can program that file to the device in the
next step.
<br />
<details>
<summary>Show me how to download from Codespaces</summary>
When we ran the `west download` command it renamed the binary using the
filename, device name, folder name of the app you built, and a timestamp. It
moved the file to the `/zephyr-training/Downloads` folder. You can view your
files in the VS Code file explorer, filenames should be similar to:
`nrf9160dk_04_blinkRTOS_223209.hex`.
![How to download binaries from Codespaces](./assets/codespaces_download_binary.png)
The image above shows the file explorer in the left sidebar menu of VS Code.
(The file explorer may be opened by clicking ```View``Explorer`).
Because Codespaces is a virtual machine running in the cloud, we cannot directly
program the device connected to your local machine. Instead, we will download
the binary so that your local machine can program that file to the device in the
next step.
Right-click on the filename you want to download and select "Download..." from
the resulting menu.
When we ran the `west download` command it renamed the binary using the
filename, device name, folder name of the app you built, and a timestamp. It
moved the file to the `/zephyr-training/Downloads` folder. You can view your
files in the VS Code file explorer, filenames should be similar to:
`nrf9160dk_04_blinkRTOS_223209.hex`.
</details>
The image above shows the file explorer in the left sidebar menu of VS Code.
(The file explorer may be opened by clicking `≡`→`View`→`Explorer`).
Right-click on the filename you want to download and select "Download..." from
the resulting menu.
</details>

0 comments on commit f355d2f

Please sign in to comment.