Skip to content

Fix platform names #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ To update the firmware of a Silabs target with a local firmware file (for exampl
This file has to be a binary file with a valid Booter and CLR from a build. No checks or validations are performed on the file(s) content.

```console
nanoff --update --platform gg11 --binfile "C:\nf-interpreter\build\nanobooter-nanoclr.bin" --address 0x0
nanoff --update --platform efm32 --binfile "C:\nf-interpreter\build\nanobooter-nanoclr.bin" --address 0x0
```

### Deploy a managed application to a SL_STK3701A target
Expand Down
10 changes: 8 additions & 2 deletions nanoFirmwareFlasher.Library/SupportedPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ public enum SupportedPlatform
/// TI Simplelink.
/// </summary>
ti_simplelink = 2,

/// <summary>
/// Silabs EFM32 Gecko.
/// </summary>
efm32,

/// <summary>
/// Silabs GG11.
/// NXP.
/// </summary>
gg11
nxp
}
}
2 changes: 1 addition & 1 deletion nanoFirmwareFlasher.Tool/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public class Options
"platform",
Required = false,
Default = null,
HelpText = "Target platform. Acceptable values are: esp32, stm32, cc13x2, gg11.")]
HelpText = "Target platform. Acceptable values are: esp32, stm32, cc13x2, efm32.")]
public SupportedPlatform? Platform { get; set; }

/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions nanoFirmwareFlasher.Tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
}
else if (o.TargetName.StartsWith("SL"))
{
// candidates for Silabs GG11
o.Platform = SupportedPlatform.gg11;
// candidates for Silabs EFM32 Gecko
o.Platform = SupportedPlatform.efm32;
}
else
{
Expand Down Expand Up @@ -522,10 +522,10 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
{
o.Platform = SupportedPlatform.stm32;
}
// GG11 related
// EFM32 related
else if (o.ListJLinkDevices)
{
o.Platform = SupportedPlatform.gg11;
o.Platform = SupportedPlatform.efm32;
}
// drivers install
else if (o.TIInstallXdsDrivers)
Expand Down Expand Up @@ -708,7 +708,7 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)

#region Silabs Giant Gecko S1 platform options

if (o.Platform == SupportedPlatform.gg11)
if (o.Platform == SupportedPlatform.efm32)
{
var manager = new SilabsManager(o, _verbosityLevel);

Expand Down
4 changes: 2 additions & 2 deletions nanoFirmwareFlasher.Tool/SilabsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public SilabsManager(Options options, VerbosityLevel verbosityLevel)
throw new ArgumentNullException(nameof(options));
}

if (options.Platform != SupportedPlatform.gg11)
if (options.Platform != SupportedPlatform.efm32)
{
throw new NotSupportedException($"{nameof(options)} - {options.Platform}");
}
Expand All @@ -38,7 +38,7 @@ public async Task<ExitCodes> ProcessAsync()
{
OutputWriter.ForegroundColor = ConsoleColor.Red;
OutputWriter.WriteLine();
OutputWriter.WriteLine($"Cannot determine the best matching target for a {SupportedPlatform.gg11} device.");
OutputWriter.WriteLine($"Cannot determine the best matching target for a {SupportedPlatform.efm32} device.");
OutputWriter.WriteLine();
OutputWriter.ForegroundColor = ConsoleColor.White;
return ExitCodes.OK;
Expand Down