File tree Expand file tree Collapse file tree 8 files changed +10
-12
lines changed
nanoFirmwareFlasher.Library Expand file tree Collapse file tree 8 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
127127 if ( programResult == ExitCodes . OK && isApplicationBinFile )
128128 {
129129 // now program the application file
130- programResult = ccDevice . FlashBinFiles ( new [ ] { applicationPath } , new [ ] { deploymentAddress } ) ;
130+ programResult = ccDevice . FlashBinFiles ( new List < string > { applicationPath } , new List < string > { deploymentAddress } ) ;
131131 }
132132
133133 if ( updateFw )
Original file line number Diff line number Diff line change @@ -450,7 +450,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
450450 // check for empty flash partitions
451451 if ( firmware . FlashPartitions is null )
452452 {
453- firmware . FlashPartitions = [ ] ;
453+ firmware . FlashPartitions = new Dictionary < int , string > ( ) ;
454454 }
455455
456456 // add DEPLOYMENT partition with the address provided in the command OR the address from the partition table
@@ -665,7 +665,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> DeployApplicationAsyn
665665 // check for empty flash partitions
666666 if ( firmware . FlashPartitions is null )
667667 {
668- firmware . FlashPartitions = [ ] ;
668+ firmware . FlashPartitions = new Dictionary < int , string > ( ) ;
669669 }
670670
671671 // add DEPLOYMENT partition with the address provided in the command OR the address from the partition table
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ public ExitCodes ExecuteFlashBinFiles(
179179 }
180180 }
181181
182- List < string > shadowFiles = [ ] ;
182+ List < string > shadowFiles = new List < string > ( ) ;
183183
184184 ProcessFilePaths ( files , shadowFiles ) ;
185185
@@ -335,7 +335,7 @@ public ExitCodes ExecuteFlashHexFiles(
335335 return ExitCodes . E5004 ;
336336 }
337337
338- List < string > shadowFiles = [ ] ;
338+ List < string > shadowFiles = new List < string > ( ) ;
339339
340340 ProcessFilePaths ( files , shadowFiles ) ;
341341
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
161161 if ( operationResult == ExitCodes . OK && isApplicationBinFile )
162162 {
163163 // now program the application file
164- operationResult = jlinkDevice . FlashBinFiles ( new [ ] { applicationPath } , new [ ] { deploymentAddress } ) ;
164+ operationResult = jlinkDevice . FlashBinFiles ( new List < string > { applicationPath } , new List < string > { deploymentAddress } ) ;
165165 }
166166
167167 return operationResult ;
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
215215 if ( operationResult == ExitCodes . OK && isApplicationBinFile )
216216 {
217217 // now program the application file
218- operationResult = dfuDevice . FlashBinFiles ( new [ ] { applicationPath } , new [ ] { deploymentAddress } ) ;
218+ operationResult = dfuDevice . FlashBinFiles ( new List < string > { applicationPath } , new List < string > { deploymentAddress } ) ;
219219 }
220220
221221 if (
@@ -282,7 +282,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
282282 if ( operationResult == ExitCodes . OK && isApplicationBinFile )
283283 {
284284 // now program the application file
285- operationResult = jtagDevice . FlashBinFiles ( new [ ] { applicationPath } , new [ ] { deploymentAddress } ) ;
285+ operationResult = jtagDevice . FlashBinFiles ( new List < string > { applicationPath } , new List < string > { deploymentAddress } ) ;
286286 }
287287
288288 if (
Original file line number Diff line number Diff line change 2727 </PropertyGroup >
2828
2929 <PropertyGroup >
30- <LangVersion >latest</LangVersion >
3130 <GenerateDocumentationFile >True</GenerateDocumentationFile >
3231 <RestorePackagesWithLockFile >true</RestorePackagesWithLockFile >
3332 <RestoreLockedMode Condition =" '$(TF_BUILD)' == 'True' or '$(ContinuousIntegrationBuild)' == 'True'" >true</RestoreLockedMode >
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public static async Task<int> Main(string[] args)
6767 // because of short-comings in CommandLine parsing
6868 // need to customize the output to provide a consistent output
6969 var parser = new Parser ( config => config . HelpWriter = null ) ;
70- var result = parser . ParseArguments < Options > ( new [ ] { "" , "" } ) ;
70+ var result = parser . ParseArguments < Options > ( new string [ ] { "" , "" } ) ;
7171
7272 var helpText = new HelpText (
7373 new HeadingInfo ( _headerInfo ) ,
@@ -692,7 +692,7 @@ private static void DisplayNoOperationMessage()
692692 // because of short-comings in CommandLine parsing
693693 // need to customize the output to provide a consistent output
694694 var parser = new Parser ( config => config . HelpWriter = null ) ;
695- var result = parser . ParseArguments < Options > ( new [ ] { "" , "" } ) ;
695+ var result = parser . ParseArguments < Options > ( new string [ ] { "" , "" } ) ;
696696
697697 var helpText = new HelpText (
698698 new HeadingInfo ( _headerInfo ) ,
Original file line number Diff line number Diff line change 1818 <PackageIconUrl ></PackageIconUrl >
1919 <Description >.NET nanoFirmwareFlasher tool to flash firmware images to target devices.</Description >
2020 <!-- need this to allow async Main() -->
21- <LangVersion >latest</LangVersion >
2221 <PackAsTool >true</PackAsTool >
2322 <PlatformTarget >AnyCPU</PlatformTarget >
2423 <Platforms >AnyCPU;x64</Platforms >
You can’t perform that action at this time.
0 commit comments