This is a game engine for embedded devices that can run MicroPython.
These instructions assume that you are cloning MicroPython from the TinyCircuits Fork that has been pre-modified
sudo apt install libsdl2-dev
sudo apt install build-essential
git clone https://github.com/TinyCircuits/micropython.git mp-thumby
cd
into MicroPython: cd mp-thumby
git checkout engine-1.23.0
lib
submodules: git clone --recurse-submodules https://github.com/TinyCircuits/TinyCircuits-Tiny-Game-Engine.git
cd ports/unix
make submodules
cd
to engine file system to build and run MicroPython and the engine
cd
: cd ../../TinyCircuits-Tiny-Game-Engine/filesystem
(cd ../../ports/unix && make -j8 USER_C_MODULES=../../TinyCircuits-Tiny-Game-Engine DEBUG=1)
../micropython_loop ../../ports/unix/build-standard/micropython -X heapsize=532480 main.py
Use (cd ../../ports/unix && make clean)
to make clean if needed
These instructions assume that you are cloning MicroPython from the official MicroPython repository and not the TinyCircuits Fork
sudo apt install libsdl2-dev
sudo apt install build-essential
git clone https://github.com/micropython/micropython.git
cd
into MicroPython: cd micropython
git reset --hard a61c446
lib
submodules: git clone --recurse-submodules https://github.com/TinyCircuits/TinyCircuits-Tiny-Game-Engine.git
cd ports/unix
make submodules
micropython/ports/unix/variants/mpconfigvariant_common.h
do:
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
-> #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
-> #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
#define MICROPY_TRACKED_ALLOC (1)
anywheremicropython/tools/mpy-tool.py
default="longlong"
(don't know where this tool is used and how to pass it a different value, will just set it for now)cd
to filesystem root: cd micropython/TinyCircuits-Tiny-Game-Engine/filesystem
(cd ../../ports/unix && make -j8 USER_C_MODULES=../../TinyCircuits-Tiny-Game-Engine DEBUG=1)
../micropython_loop ../../ports/unix/build-standard/micropython -X heapsize=532480 main.py
Use (cd ../../ports/unix && make clean)
to make clean if needed
Make sure to check that the copied structures in src/utility/engine_mp.h are still the same in the version of MicroPython you're updating to. Some structures are not exposed so they had to be copied to where the engine can use them.
-DPICO_SDK_PATH=
to cmake
)sudo ./picotool save -r 0x10000000 0x11000000 thumby_color_dev_kit_full_image_08_20_2024.bin
(saves from XIP_BASE
to 16MiB
s after to bin file)sudo ./picotool uf2 convert thumby_color_dev_kit_full_image_08_20_2024.bin thumby_color_dev_kit_full_image_08_20_2024.uf2