Can't do import sys
with ports/minimal
#17705
-
Dear experts, it seems that I couldn't do $ make run
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
MicroPython v1.26.0-preview.232.ged38fd2f7 on 2025-07-18; minimal with unknown-cpu
>>> import sys
Traceback (most recent call last):
File "<stdin>", in <module>
ImportError: module not found
>>>
Exit status: 0
make: Leaving directory '/home/yf/Projects/micropython/ports/minimal'
$ file /tmp/aaa/firmware.elf
/tmp/aaa/firmware.elf: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2d348a3a09a1ffe3f3ca6320b0443697c0a68b1f, for GNU/Linux 3.2.0, with debug_info, not stripped
size /tmp/aaa/firmware.elf
text data bss dec hex filename
149841 11352 26584 187777 2dd81 /tmp/aaa/firmware.elf Is this intentional? |
Beta Was this translation helpful? Give feedback.
Answered by
shariltumin
Jul 18, 2025
Replies: 1 comment 4 replies
-
For minimal port the mp_import_stat_t mp_import_stat(const char *path) {
return MP_IMPORT_STAT_NO_EXIST;
} The main purpose of the ports/minimal build is to test the Python interpreter. For example, you can do this:
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
yf13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For minimal port the
import
will not import anything. The "main.c" file contains this:The main purpose of the ports/minimal build is to test the Python interpreter. For example, you can do this: