File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11
11
import time
12
12
import zlib
13
13
import itertools
14
+ import re
14
15
15
16
from intelhex import IntelHex
16
17
from serial import SerialException
@@ -950,7 +951,15 @@ def get_key_from_value(dict, val):
950
951
print (
951
952
f"Maximal eFuse block revision: { max_efuse_blk_rev_full // 100 } .{ max_efuse_blk_rev_full % 100 } "
952
953
)
953
- print (f"MMU page size: { 2 ** mmu_page_size // 1024 } KB" )
954
+
955
+ # MMU page size is only available in ESP-IDF v5.4 and later
956
+ # regex matches major and minor version numbers, idf_ver can look like "v5.4.1-dirty"
957
+ ver = re .match (r"v(\d+)\.(\d+)" , idf_ver .decode ("utf-8" ))
958
+ if ver :
959
+ major , minor = ver .groups ()
960
+ if int (major ) >= 5 and int (minor ) >= 4 :
961
+ print (f"MMU page size: { 2 ** mmu_page_size // 1024 } KB" )
962
+
954
963
print (f"Secure version: { secure_version } " )
955
964
956
965
elif bootloader_desc :
You can’t perform that action at this time.
0 commit comments