Skip to content

Commit 0b23a1e

Browse files
committed
utop: Print MicroPython memory info.
Signed-off-by: Daniël van de Giessen <[email protected]>
1 parent b779b97 commit 0b23a1e

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
import _thread
34

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

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

0 commit comments

Comments
 (0)