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 1111import time
1212import zlib
1313import itertools
14+ import re
1415
1516from intelhex import IntelHex
1617from serial import SerialException
@@ -950,7 +951,15 @@ def get_key_from_value(dict, val):
950951 print (
951952 f"Maximal eFuse block revision: { max_efuse_blk_rev_full // 100 } .{ max_efuse_blk_rev_full % 100 } "
952953 )
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+
954963 print (f"Secure version: { secure_version } " )
955964
956965 elif bootloader_desc :
You can’t perform that action at this time.
0 commit comments