File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ let PartialFlashingUtils = {
54
54
PC : 15
55
55
} ,
56
56
57
+ // FICR Registers
58
+ FICR : {
59
+ CODEPAGESIZE : 0x10000000 | 0x10 ,
60
+ CODESIZE : 0x10000000 | 0x14 ,
61
+ } ,
62
+
57
63
read32FromUInt8Array : function ( data , i ) {
58
64
return ( data [ i ] | ( data [ i + 1 ] << 8 ) | ( data [ i + 2 ] << 16 ) | ( data [ i + 3 ] << 24 ) ) >>> 0 ;
59
65
} ,
@@ -643,6 +649,17 @@ let PartialFlashing = {
643
649
. then ( w => {
644
650
window . dapwrapper = w ;
645
651
PartialFlashingUtils . log ( "Connection Complete" ) ;
652
+ } )
653
+ . then ( ( ) => {
654
+ return dapwrapper . cortexM . readMem32 ( PartialFlashingUtils . FICR . CODEPAGESIZE ) ;
655
+ } )
656
+ . then ( ( pageSize ) => {
657
+ PartialFlashingUtils . pageSize = pageSize ;
658
+
659
+ return dapwrapper . cortexM . readMem32 ( PartialFlashingUtils . FICR . CODESIZE ) ;
660
+ } )
661
+ . then ( ( numPages ) => {
662
+ PartialFlashingUtils . numPages = numPages ;
646
663
} ) ;
647
664
} ,
648
665
You can’t perform that action at this time.
0 commit comments