Skip to content

Commit eb99828

Browse files
dido18XaytonMatteoPologruto
authored
feat(arduino-flasher-cli): enhance flash command documentation with detailed usage instruction
Co-authored-by: Alby <30591904+Xayton@users.noreply.github.com> Co-authored-by: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
1 parent 532fccc commit eb99828

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

flash.go

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,35 @@ func newFlashCmd() *cobra.Command {
1818
appCmd := &cobra.Command{
1919
Use: "flash",
2020
Short: "Flash a Debian image on the board",
21-
Long: "Dowload the specified Debian image version and flash it on the board",
21+
Long: `Flash a Debian image on the board.
22+
23+
WARNING: This operation will completely replace the current system on the board.
24+
Make sure to backup any important data before proceeding.
25+
26+
This command accepts either:
27+
- A local file path to a compressed Debian image file (e.g., .tar.zst, .tar.xz) or a decompressed Debian image folder
28+
- A version tag to download from the remote repository
29+
30+
When providing a local file path:
31+
- The path can be relative or absolute
32+
- The file is extracted in a temp folder (if needed)
33+
- The image is flashed into the board
34+
35+
When providing a version tag:
36+
- Use 'latest' to download the most recent stable image
37+
- Use a specific version tag (e.g., '20250915-173') to download that exact version
38+
- The image will be automatically downloaded (in a temp folder), the sha is verified, and flashed
39+
40+
41+
NOTE: On Windows, required drivers are automatically installed with elevated privileges.
42+
`,
2243
Example: " " + os.Args[0] + " flash latest\n" +
23-
" " + os.Args[0] + " flash 20250915-173\n",
44+
" " + os.Args[0] + " flash 20250915-173\n" +
45+
" " + os.Args[0] + " flash ./my-image.tar.zst\n" +
46+
" " + os.Args[0] + " flash /path/to/debian-image.tar.zst\n" +
47+
" " + os.Args[0] + " flash /path/to/debian-image.tar.xz \n" +
48+
" " + os.Args[0] + " flash /path/to/arduino-unoq-debian-image-20250915-173 \n",
49+
2450
Args: cobra.ExactArgs(1),
2551
Run: func(cmd *cobra.Command, args []string) {
2652
checkDriversInstalled()

0 commit comments

Comments
 (0)