Skip to content

Implement the utop module #822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DvdGiessen
Copy link

@DvdGiessen DvdGiessen commented Mar 7, 2024

Implements a new module, utop, as suggested in micropython/micropython#12732 (comment).

Currently only works on the esp32 port, and requires micropython/micropython#12732.

An animated GIF to demonstrate what the output looks like:

utop

Opted to give it a generic name instead of ESP32-specific, as there was mention of other platforms also having options to retrieve runtime performance data, which might be nice to support at a later time.

Compared to the version posted in that esp32 MR (here) this version is a few lines longer to make it a bit easier to read and expand later. For example it includes an optional argument for renaming threads, useful to distinguish multiple mp_thread instances.

First commit implements the functionality as demo'd in the other MR. The second commit adds two lines of information about the current state of the ESP-IDF heap, as an example of how we could expand this later to be a more useful development utility.

Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this took ages to get to. It looks good! I like how you've made it generic, for any target. That's a good idea, so it can be expanded in the future.

@DvdGiessen DvdGiessen force-pushed the utop_esp32 branch 2 times, most recently from 205145c to 5a1122f Compare May 14, 2025 09:09
Signed-off-by: Daniël van de Giessen <[email protected]>
Signed-off-by: Daniël van de Giessen <[email protected]>
Signed-off-by: Daniël van de Giessen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants