@@ -589,6 +589,20 @@ impl ImagesBuilder {
589589 flash. insert ( dev_id, dev) ;
590590 ( flash, Rc :: new ( areadesc) , & [ ] )
591591 }
592+ DeviceName :: PSOCEdgeE8x => {
593+ let dev = SimFlash :: new ( vec ! [ 4096 ; 96 ] , align as usize , erased_val) ;
594+
595+ let dev_id = 0 ;
596+ let mut areadesc = AreaDesc :: new ( ) ;
597+ areadesc. add_flash_sectors ( dev_id, & dev) ;
598+ areadesc. add_image ( 0x020000 , 0x010000 , FlashId :: Image0 , dev_id) ;
599+ areadesc. add_image ( 0x030000 , 0x010000 , FlashId :: Image1 , dev_id) ;
600+ areadesc. add_image ( 0x040000 , 0x002000 , FlashId :: ImageScratch , dev_id) ;
601+
602+ let mut flash = SimMultiFlash :: new ( ) ;
603+ flash. insert ( dev_id, dev) ;
604+ ( flash, Rc :: new ( areadesc) , & [ Caps :: SwapUsingScratch , Caps :: OverwriteUpgrade , Caps :: SwapUsingMove , Caps :: RamLoad , Caps :: DirectXip ] )
605+ }
592606 }
593607 }
594608
@@ -2386,12 +2400,18 @@ pub struct SlotInfo {
23862400 pub dev_id : u8 ,
23872401}
23882402
2389- #[ cfg( not( feature = "max-align-32" ) ) ]
2403+ #[ cfg( all ( not( feature = "max-align-16" ) , not ( feature = "max-align- 32") ) ) ]
23902404const MAGIC : & [ u8 ] = & [ 0x77 , 0xc2 , 0x95 , 0xf3 ,
23912405 0x60 , 0xd2 , 0xef , 0x7f ,
23922406 0x35 , 0x52 , 0x50 , 0x0f ,
23932407 0x2c , 0xb6 , 0x79 , 0x80 ] ;
23942408
2409+ #[ cfg( feature = "max-align-16" ) ]
2410+ const MAGIC : & [ u8 ] = & [ 0x10 , 0x00 , 0x2d , 0xe1 ,
2411+ 0x5d , 0x29 , 0x41 , 0x0b ,
2412+ 0x8d , 0x77 , 0x67 , 0x9c ,
2413+ 0x11 , 0x0f , 0x1f , 0x8a ] ;
2414+
23952415#[ cfg( feature = "max-align-32" ) ]
23962416const MAGIC : & [ u8 ] = & [ 0x20 , 0x00 , 0x2d , 0xe1 ,
23972417 0x5d , 0x29 , 0x41 , 0x0b ,
@@ -2475,11 +2495,16 @@ pub fn show_sizes() {
24752495 }
24762496}
24772497
2478- #[ cfg( not( feature = "max-align-32" ) ) ]
2498+ #[ cfg( all ( not( feature = "max-align-16" ) , not ( feature = "max-align- 32") ) ) ]
24792499fn test_alignments ( ) -> & ' static [ usize ] {
24802500 & [ 1 , 2 , 4 , 8 ]
24812501}
24822502
2503+ #[ cfg( feature = "max-align-16" ) ]
2504+ fn test_alignments ( ) -> & ' static [ usize ] {
2505+ & [ 16 ]
2506+ }
2507+
24832508#[ cfg( feature = "max-align-32" ) ]
24842509fn test_alignments ( ) -> & ' static [ usize ] {
24852510 & [ 32 ]
0 commit comments