Skip to content

Commit

Permalink
fix: Hide missing app info based on IDF version
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzarda7 committed Dec 19, 2024
1 parent 188c162 commit d2bca1e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion esptool/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import time
import zlib
import itertools
import re

from intelhex import IntelHex
from serial import SerialException
Expand Down Expand Up @@ -950,7 +951,15 @@ def get_key_from_value(dict, val):
print(
f"Maximal eFuse block revision: {max_efuse_blk_rev_full // 100}.{max_efuse_blk_rev_full % 100}"
)
print(f"MMU page size: {2 ** mmu_page_size // 1024} KB")

# MMU page size is only available in ESP-IDF v5.4 and later
# regex matches major and minor version numbers, idf_ver can look like "v5.4.1-dirty"
ver = re.match(r"v(\d+)\.(\d+)", idf_ver.decode("utf-8"))
if ver:
major, minor = ver.groups()
if int(major) >= 5 and int(minor) >= 4:
print(f"MMU page size: {2 ** mmu_page_size // 1024} KB")

print(f"Secure version: {secure_version}")

elif bootloader_desc:
Expand Down

0 comments on commit d2bca1e

Please sign in to comment.