Skip to content

Commit 7fd9723

Browse files
authored
Improve help text (#115)
1 parent 051d0c5 commit 7fd9723

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

nanoFirmwareFlasher/Options.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,15 @@ public class Options
306306
public static IEnumerable<Example> Examples =>
307307
new List<Example>
308308
{
309-
new("Update ESP32 WROVER Kit device with latest available firmware (stable version)", new Options { TargetName = "ESP_WROVER_KIT", Update = true }),
310-
new("Update ESP32 device with latest available firmware (stable version), device is connected to COM31", new Options { TargetName = "ESP32_PSRAM_REV0", Update = true, SerialPort = "COM31" }),
311-
new("Update ESP32 device with custom firmware (local bin file)", new Options { TargetName = "ESP_WROVER_KIT" , DeploymentImage = "<location of file>.bin"}),
312-
new("Update specific STM32 device (ST_STM32F769I_DISCOVERY) with latest available firmware (preview version), using JTAG interface", new Options { TargetName = "ST_STM32F769I_DISCOVERY" , Update = true, Preview = true, JtagUpdate = true}),
313-
new("Update specific STM32 device (NETDUINO3_WIFI) with latest available firmware (preview version), device is connected through DFU with Id 3380386D3134", new Options { TargetName = "NETDUINO3_WIFI", Update = true, Preview = true, DfuDeviceId = "3380386D3134" }),
314-
new("List all STM32 devices connected through JTAG", new Options { Platform = SupportedPlatform.esp32, ListJtagDevices = true}),
315-
new("Install STM32 JTAG drivers", new Options { InstallJtagDrivers = true}),
316-
new("List all available targets", new Options { ListTargets = true, Preview = true, Platform = SupportedPlatform.stm32 }),
309+
new("- Update ESP32 WROVER Kit device with latest available firmware (stable version)", new Options { TargetName = "ESP_WROVER_KIT", Update = true }),
310+
new("- Update specific STM32 device (ST_STM32F769I_DISCOVERY) with latest available firmware (preview version), using JTAG interface", new Options { TargetName = "ST_STM32F769I_DISCOVERY" , Update = true, Preview = true, JtagUpdate = true}),
311+
new("- Update ESP32 device with latest available firmware (stable version), device is connected to COM31", new Options { TargetName = "ESP32_PSRAM_REV0", Update = true, SerialPort = "COM31" }),
312+
new("- Update ESP32 device with custom firmware (local bin file)", new Options { TargetName = "ESP_WROVER_KIT" , DeploymentImage = "<location of file>.bin"}),
313+
new("- Update specific STM32 device (NETDUINO3_WIFI) with latest available firmware (preview version), device is connected through DFU with Id 3380386D3134", new Options { TargetName = "NETDUINO3_WIFI", Update = true, Preview = true, DfuDeviceId = "3380386D3134" }),
314+
new("- List all STM32 devices connected through JTAG", new Options { Platform = SupportedPlatform.esp32, ListJtagDevices = true}),
315+
new("- Install STM32 JTAG drivers", new Options { InstallJtagDrivers = true}),
316+
new("- List all available STM32 targets", new Options { ListTargets = true, Preview = true, Platform = SupportedPlatform.stm32 }),
317+
new("- List all available COM ports", new Options { ListComPorts = true }),
317318
};
318319
}
319320

nanoFirmwareFlasher/Program.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public static async Task<int> Main(string[] args)
5151
// check for empty argument collection
5252
if (!args.Any())
5353
{
54+
// perform version check
55+
CheckVersion();
56+
Console.WriteLine();
57+
5458
// no argument provided, show help text and usage examples
5559

5660
// because of short-comings in CommandLine parsing
@@ -61,8 +65,12 @@ public static async Task<int> Main(string[] args)
6165
var helpText = new HelpText(
6266
new HeadingInfo(_headerInfo),
6367
_copyrightInfo)
68+
.AddPreOptionsLine("")
6469
.AddPreOptionsLine("No command was provided.")
6570
.AddPreOptionsLine("")
71+
.AddPreOptionsLine("Follow some examples on how to use nanoff. For more detailed explanations please check:")
72+
.AddPreOptionsLine("https://github.com/nanoframework/nanoFirmwareFlasher#usage")
73+
.AddPreOptionsLine("")
6674
.AddPreOptionsLine(HelpText.RenderUsageText(result))
6775
.AddPreOptionsLine("")
6876
.AddOptions(result);

0 commit comments

Comments
 (0)