You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
a6b010b3e0
Support for Hardkernel ESP32 device: ODROID-Go (The old one from 2018) * https://github.com/hardkernel/ODROID-GO/ * https://wiki.odroid.com/odroid_go/odroid_go What worked: * Display * Buttons * Crossbar * Wifi * Battery * blue LED TODO: * Speaker The blue LED is "coupled" with the button/crossbar press.
30 lines
910 B
Python
30 lines
910 B
Python
# This file is the only one that can't be overridden for development (without rebuilding) because it's not in lib/, so keep it minimal.
|
|
|
|
# Make sure the storage partition's lib/ is first in the path, so whatever is placed there overrides frozen libraries.
|
|
# This allows any build to be used for development as well, just by overriding the libraries in lib/
|
|
import gc
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, "lib")
|
|
|
|
print(f"{sys.version=}")
|
|
print(f"{sys.implementation=}")
|
|
|
|
|
|
print("Check free space on root filesystem:")
|
|
stat = os.statvfs("/")
|
|
total_space = stat[0] * stat[2]
|
|
free_space = stat[0] * stat[3]
|
|
used_space = total_space - free_space
|
|
print(f"{total_space=} / {used_space=} / {free_space=} bytes")
|
|
|
|
|
|
gc.collect()
|
|
print(
|
|
f"RAM: {gc.mem_free()} free, {gc.mem_alloc()} allocated, {gc.mem_alloc() + gc.mem_free()} total"
|
|
)
|
|
|
|
print("Passing execution over to mpos.main")
|
|
import mpos.main # noqa: F401
|