Skip to content

Commit 8252963

Browse files
authored
Rework deliverables (#146)
1 parent d859098 commit 8252963

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+403
-255
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
- Check_Build_Options
174174

175175
pool:
176-
vmImage: 'windows-2019'
176+
vmImage: 'windows-latest'
177177

178178
variables:
179179
DOTNET_NOLOGO: true
@@ -238,14 +238,6 @@ jobs:
238238
eq(variables['UPDATE_DEPENDENTS'], 'false')
239239
)
240240
241-
- script: dotnet pack --runtime win-x64 -c $(BuildConfiguration) -p:PublicRelease=true -p:PackGlobalTool=true --no-restore
242-
displayName: Build .NET Core Tool NuGet package
243-
condition: >-
244-
and(
245-
eq(variables['isTag'], 'false'),
246-
eq(variables['UPDATE_DEPENDENTS'], 'false')
247-
)
248-
249241
- task: PowerShell@2
250242
condition: >-
251243
and(
@@ -274,7 +266,7 @@ jobs:
274266
condition: >-
275267
and(
276268
succeeded(),
277-
ne(variables['system.pullrequest.isfork'], true),
269+
eq(variables['System.PullRequest.PullRequestId'], ''),
278270
eq(variables['isTag'], 'false'),
279271
eq(variables['UPDATE_DEPENDENTS'], 'false')
280272
)

nanoFirmwareFlasher/CC13x26x2Device.cs renamed to nanoFirmwareFlasher.Library/CC13x26x2Device.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ private static string RunUniflashCli(string arguments)
261261
var uniflashCli = new Process
262262
{
263263
StartInfo = new ProcessStartInfo(
264-
Path.Combine(Program.ExecutingPath, "uniflash\\DebugServer\\bin", "DSLite.exe"), arguments)
264+
Path.Combine(Utilities.ExecutingPath, "uniflash\\DebugServer\\bin", "DSLite.exe"), arguments)
265265
{
266-
WorkingDirectory = Path.Combine(Program.ExecutingPath, "uniflash"),
266+
WorkingDirectory = Path.Combine(Utilities.ExecutingPath, "uniflash"),
267267
UseShellExecute = false,
268268
RedirectStandardOutput = true,
269269
}

nanoFirmwareFlasher/CC13x26x2Operations.cs renamed to nanoFirmwareFlasher.Library/CC13x26x2Operations.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
namespace nanoFramework.Tools.FirmwareFlasher
1313
{
14-
internal class CC13x26x2Operations
14+
public class CC13x26x2Operations
1515
{
16-
internal static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
16+
public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
1717
string targetName,
1818
string fwVersion,
1919
bool preview,
@@ -87,11 +87,11 @@ internal static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync
8787

8888
if (targetName.Contains("CC1352R"))
8989
{
90-
configFile = Path.Combine(Program.ExecutingPath, "uniflash", "CC1352R1F3.ccxml");
90+
configFile = Path.Combine(Utilities.ExecutingPath, "uniflash", "CC1352R1F3.ccxml");
9191
}
9292
else if (targetName.Contains("CC1352P"))
9393
{
94-
configFile = Path.Combine(Program.ExecutingPath, "uniflash", "CC1352P1F3.ccxml");
94+
configFile = Path.Combine(Utilities.ExecutingPath, "uniflash", "CC1352P1F3.ccxml");
9595
}
9696
else
9797
{
@@ -125,19 +125,19 @@ internal static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync
125125
return programResult;
126126
}
127127

128-
internal static ExitCodes InstallXds110Drivers(VerbosityLevel verbosityLevel)
128+
public static ExitCodes InstallXds110Drivers(VerbosityLevel verbosityLevel)
129129
{
130130
try
131131
{
132-
string driversPath = Path.Combine(Program.ExecutingPath, "uniflash\\emulation\\windows\\xds110_drivers");
132+
string driversPath = Path.Combine(Utilities.ExecutingPath, "uniflash\\emulation\\windows\\xds110_drivers");
133133

134134
var uniflashCli = new Process
135135
{
136136
StartInfo = new ProcessStartInfo(
137-
Path.Combine(Program.ExecutingPath, "uniflash", "dpinst_64_eng.exe"),
137+
Path.Combine(Utilities.ExecutingPath, "uniflash", "dpinst_64_eng.exe"),
138138
$"/SE /SW /SA /PATH {driversPath}")
139139
{
140-
WorkingDirectory = Path.Combine(Program.ExecutingPath, "uniflash"),
140+
WorkingDirectory = Path.Combine(Utilities.ExecutingPath, "uniflash"),
141141
// need to use ShellExecute to show elevate prompt
142142
UseShellExecute = true,
143143
}

nanoFirmwareFlasher/Esp32DeviceInfo.cs renamed to nanoFirmwareFlasher.Library/Esp32DeviceInfo.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace nanoFramework.Tools.FirmwareFlasher
1111
/// <summary>
1212
/// Structure for holding the information about the connected ESP32 together
1313
/// </summary>
14-
internal class Esp32DeviceInfo
14+
public class Esp32DeviceInfo
1515
{
1616
/// <summary>
1717
/// Chip type.
@@ -21,12 +21,12 @@ internal class Esp32DeviceInfo
2121
/// <summary>
2222
/// Name of the ESP32 chip
2323
/// </summary>
24-
internal string ChipName { get; }
24+
public string ChipName { get; }
2525

2626
/// <summary>
2727
/// ESP32 chip features
2828
/// </summary>
29-
internal string Features { get; }
29+
public string Features { get; }
3030

3131
/// <summary>
3232
/// Crystal fitted in ESP32.
@@ -36,33 +36,33 @@ internal class Esp32DeviceInfo
3636
/// <summary>
3737
/// MAC address of the ESP32 chip
3838
/// </summary>
39-
internal string MacAddress { get; }
39+
public string MacAddress { get; }
4040

4141
/// <summary>
4242
/// Flash manufacturer ID.
4343
/// </summary>
4444
/// <remarks>
4545
/// See http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h for more details.
4646
/// </remarks>
47-
internal byte FlashManufacturerId { get; }
47+
public byte FlashManufacturerId { get; }
4848

4949
/// <summary>
5050
/// Flash device type ID.
5151
/// </summary>
5252
/// <remarks>
5353
/// See http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h for more details.
5454
/// </remarks>
55-
internal short FlashDeviceId { get; }
55+
public short FlashDeviceId { get; }
5656

5757
/// <summary>
5858
/// The size of the flash in bytes; 4 MB = 0x40000 bytes
5959
/// </summary>
60-
internal int FlashSize { get; }
60+
public int FlashSize { get; }
6161

6262
/// <summary>
6363
/// Availability of PSRAM on the device.
6464
/// </summary>
65-
internal PSRamAvailability PSRamAvailable { get; }
65+
public PSRamAvailability PSRamAvailable { get; }
6666

6767
/// <summary>
6868
/// Constructor
@@ -74,7 +74,7 @@ internal class Esp32DeviceInfo
7474
/// <param name="flashManufacturerId">Flash manufacturer ID</param>
7575
/// <param name="flashDeviceModelId">Flash device type ID</param>
7676
/// <param name="flashSize">The size of the flash in bytes</param>
77-
internal Esp32DeviceInfo(
77+
public Esp32DeviceInfo(
7878
string chipType,
7979
string chipName,
8080
string features,

nanoFirmwareFlasher/Esp32Operations.cs renamed to nanoFirmwareFlasher.Library/Esp32Operations.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
using System;
77
using System.Collections.Generic;
88
using System.IO;
9-
using System.Linq;
10-
using System.Threading;
119

1210
namespace nanoFramework.Tools.FirmwareFlasher
1311
{
14-
internal class Esp32Operations
12+
public class Esp32Operations
1513
{
1614
public static ExitCodes BackupFlash(
1715
EspTool tool,
@@ -80,7 +78,7 @@ public static ExitCodes BackupFlash(
8078
return ExitCodes.OK;
8179
}
8280

83-
internal static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
81+
public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
8482
EspTool espTool,
8583
Esp32DeviceInfo esp32Device,
8684
string targetName,

nanoFirmwareFlasher/EspTool.cs renamed to nanoFirmwareFlasher.Library/EspTool.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace nanoFramework.Tools.FirmwareFlasher
1919
/// <summary>
2020
/// Class the handles all the calls to the esptool.exe.
2121
/// </summary>
22-
internal partial class EspTool
22+
public partial class EspTool
2323
{
2424
private string _esptoolMessage;
2525

@@ -69,7 +69,7 @@ internal partial class EspTool
6969
/// <summary>
7070
/// This property is <see langword="true"/> if the specified COM port is valid.
7171
/// </summary>
72-
internal bool ComPortAvailable => !string.IsNullOrEmpty(_serialPort);
72+
public bool ComPortAvailable => !string.IsNullOrEmpty(_serialPort);
7373

7474
/// <summary>
7575
/// Option to output progress messages.
@@ -94,7 +94,7 @@ internal partial class EspTool
9494
/// <param name="flashMode">The flash mode for the esptool</param>
9595
/// <param name="flashFrequency">The flash frequency for the esptool</param>
9696
/// <param name="partitionTableSize">Partition table size to use</param>
97-
internal EspTool(
97+
public EspTool(
9898
string serialPort,
9999
int baudRate,
100100
string flashMode,
@@ -159,7 +159,7 @@ internal EspTool(
159159
/// Tries reading ESP32 device details.
160160
/// </summary>
161161
/// <returns>The filled info structure with all the information about the connected ESP32 device or null if an error occured</returns>
162-
internal Esp32DeviceInfo GetDeviceDetails(
162+
public Esp32DeviceInfo GetDeviceDetails(
163163
string targetName,
164164
bool requireFlashSize = true)
165165
{
@@ -297,13 +297,13 @@ private PSRamAvailability FindPSRamAvailable()
297297
var bootloaderPartition = new Dictionary<int, string>
298298
{
299299
// bootloader goes to 0x1000
300-
{ 0x1000, Path.Combine(Program.ExecutingPath, $"{_chipType}bootloader", "bootloader.bin") },
300+
{ 0x1000, Path.Combine(Utilities.ExecutingPath, $"{_chipType}bootloader", "bootloader.bin") },
301301

302302
// nanoCLR goes to 0x10000
303-
{ 0x10000, Path.Combine(Program.ExecutingPath, $"{_chipType}bootloader", "test_startup.bin") },
303+
{ 0x10000, Path.Combine(Utilities.ExecutingPath, $"{_chipType}bootloader", "test_startup.bin") },
304304

305305
// partition table goes to 0x8000; there are partition tables for 2MB, 4MB, 8MB and 16MB flash sizes
306-
{ 0x8000, Path.Combine(Program.ExecutingPath, $"{_chipType}bootloader", $"partitions_{Esp32DeviceInfo.GetFlashSizeAsString(_flashSize).ToLowerInvariant()}.bin") }
306+
{ 0x8000, Path.Combine(Utilities.ExecutingPath, $"{_chipType}bootloader", $"partitions_{Esp32DeviceInfo.GetFlashSizeAsString(_flashSize).ToLowerInvariant()}.bin") }
307307
};
308308

309309
// need to use standard baud rate here because of boards put in download mode
@@ -567,17 +567,17 @@ private bool RunEspTool(
567567
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
568568
{
569569
appName = "esptool.exe";
570-
appDir = Path.Combine(Program.ExecutingPath, "esptool", "esptoolWin");
570+
appDir = Path.Combine(Utilities.ExecutingPath, "esptool", "esptoolWin");
571571
}
572572
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
573573
{
574574
appName = "esptool";
575-
appDir = Path.Combine(Program.ExecutingPath, "esptool", "esptoolMac");
575+
appDir = Path.Combine(Utilities.ExecutingPath, "esptool", "esptoolMac");
576576
}
577577
else
578578
{
579579
appName = "esptool";
580-
appDir = Path.Combine(Program.ExecutingPath, "esptool", "esptoolLinux");
580+
appDir = Path.Combine(Utilities.ExecutingPath, "esptool", "esptoolLinux");
581581
Process espToolExex = new Process();
582582
// Making sure the esptool is executable
583583
espToolExex.StartInfo = new ProcessStartInfo("chmod", $"+x {Path.Combine(appDir, appName)}")

0 commit comments

Comments
 (0)