Skip to content

Commit f60a76a

Browse files
committed
utop: Print MicroPython memory info.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
1 parent a8e4c21 commit f60a76a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

micropython/utop/utop.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import micropython
12
import time
23

34
try:
@@ -70,6 +71,12 @@ def top(update_interval_ms=1000, timeout_ms=None, thread_names={}):
7071
print("INFO: Platform does not support listing active tasks.\x1b[K")
7172
line_count += 1
7273

74+
print("\x1b[K")
75+
line_count += 1
76+
print("MicroPython ", end="")
77+
micropython.mem_info()
78+
line_count += 3
79+
7380
if previous_line_count > line_count:
7481
for _ in range(previous_line_count - line_count):
7582
print("\x1b[K")

0 commit comments

Comments
 (0)