@@ -19,6 +19,7 @@ This software is licensed under the Sysprogs BSP Generator License.
19
19
using Microsoft . Win32 ;
20
20
using stm32_bsp_generator . Rulesets ;
21
21
using System . Reflection ;
22
+ using System . Net . Mime ;
22
23
23
24
namespace stm32_bsp_generator
24
25
{
@@ -338,7 +339,7 @@ public int Prioritize(string left, string right)
338
339
339
340
}
340
341
341
- //Usage: stm32.exe /rules:{Classic|STM32WB|STM32MP1} [/fetch] [/noperiph] [/nofixes]
342
+ //Usage: stm32.exe /rules:{Classic|STM32WB|STM32MP1|stm32h7rs } [/fetch] [/noperiph] [/nofixes]
342
343
static void Main ( string [ ] args )
343
344
{
344
345
var regKey = Registry . CurrentUser . CreateSubKey ( @"SOFTWARE\Sysprogs\BSPGenerators\STM32" ) ;
@@ -376,7 +377,7 @@ static void Main(string[] args)
376
377
else
377
378
{
378
379
devices = provider . LoadDeviceList ( bspBuilder ) ;
379
- var incompleteDevices = devices . Where ( d => d . FlashSize == 0 && ! d . Name . StartsWith ( "STM32MP" ) ) . ToArray ( ) ;
380
+ var incompleteDevices = devices . Where ( d => d . FlashSize == 0 && ! d . Name . StartsWith ( "STM32MP" ) && ! d . Name . StartsWith ( "STM32N6" ) ) . ToArray ( ) ;
380
381
if ( incompleteDevices . Length > 0 )
381
382
throw new Exception ( $ "{ incompleteDevices . Length } devices have FLASH Size = 0 ") ;
382
383
}
@@ -572,15 +573,21 @@ static void Main(string[] args)
572
573
{
573
574
if ( f . Contains ( "thread_secure_stack.c" ) )
574
575
{
575
- var condRec = bspBuilder . MatchedFileConditions [ f ] ;
576
- condRec . ConditionToInclude = new Condition . And
576
+ var cond = new Condition . Equals { Expression = $ "$${ fw . ConfigurableProperties . PropertyGroups [ 0 ] . UniqueID } { secureModeOptionID } $$", ExpectedValue = "1" } ;
577
+
578
+ if ( ! bspBuilder . MatchedFileConditions . TryGetValue ( f , out var condRec ) )
579
+ bspBuilder . AddFileCondition ( new FileCondition { FilePath = f , ConditionToInclude = cond } ) ;
580
+ else
577
581
{
578
- Arguments = new Condition [ ]
582
+ condRec . ConditionToInclude = new Condition . And
579
583
{
580
- condRec . ConditionToInclude ,
581
- new Condition . Equals { Expression = $ "$${ fw . ConfigurableProperties . PropertyGroups [ 0 ] . UniqueID } { secureModeOptionID } $$", ExpectedValue = "1" }
582
- }
583
- } ;
584
+ Arguments = new Condition [ ]
585
+ {
586
+ condRec . ConditionToInclude ,
587
+ cond ,
588
+ }
589
+ } ;
590
+ }
584
591
}
585
592
}
586
593
}
0 commit comments