You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Merge branch 'add-submodules'
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
name: Build LVGL MicroPython on Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- add-submodules
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest # Ubuntu is Debian-based and commonly used in GitHub Actions
|
||||
|
||||
steps:
|
||||
- name: Checkout repository with submodules
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install lvgl_micropython dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
pkg-config \
|
||||
cmake \
|
||||
ninja-build \
|
||||
gnome-desktop-testing \
|
||||
libasound2-dev \
|
||||
libpulse-dev \
|
||||
libaudio-dev \
|
||||
libjack-dev \
|
||||
libsndio-dev \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
libxrandr-dev \
|
||||
libxcursor-dev \
|
||||
libxfixes-dev \
|
||||
libxi-dev \
|
||||
libxss-dev \
|
||||
libxkbcommon-dev \
|
||||
libdrm-dev \
|
||||
libgbm-dev \
|
||||
libgl1-mesa-dev \
|
||||
libgles2-mesa-dev \
|
||||
libegl1-mesa-dev \
|
||||
libdbus-1-dev \
|
||||
libibus-1.0-dev \
|
||||
libudev-dev \
|
||||
fcitx-libs-dev \
|
||||
libpipewire-0.3-dev \
|
||||
libwayland-dev \
|
||||
libdecor-0-dev
|
||||
|
||||
- name: Install additional MicroPythonOS dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libv4l-dev
|
||||
|
||||
- name: Build LVGL MicroPython for unix dev
|
||||
run: |
|
||||
./scripts/build_mpos.sh unix dev
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lvgl_micropy_unix
|
||||
path: lvgl_micropython/build/lvgl_micropy_unix
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Build LVGL MicroPython esp32 prod fri3d-2024
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 prod fri3d-2024
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_fri3d-2024_prod
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_fri3d-2024_prod.ota
|
||||
path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
|
||||
- name: Build LVGL MicroPython esp32 dev fri3d-2024
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 dev fri3d-2024
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_fri3d-2024_dev
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
|
||||
- name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 prod waveshare-esp32-s3-touch-lcd-2
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod.ota
|
||||
path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
|
||||
- name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # dont zip it
|
||||
retention-days: 7
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
name: Build LVGL MicroPython for MacOS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- add-submodules
|
||||
pull_request:
|
||||
branches: [add-submodules]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- name: Checkout repository with submodules
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies via Homebrew
|
||||
run: |
|
||||
xcode-select --install || true # already installed on github
|
||||
brew install pkg-config libffi ninja make SDL2
|
||||
|
||||
- name: Build LVGL MicroPython for unix dev
|
||||
run: |
|
||||
./scripts/build_mpos.sh macOS dev
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lvgl_micropy_macOS
|
||||
path: lvgl_micropython/build/lvgl_micropy_macOS
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
|
||||
|
||||
- name: Build LVGL MicroPython esp32 prod fri3d-2024
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 prod fri3d-2024
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_fri3d-2024_prod
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_fri3d-2024_prod.ota
|
||||
path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
|
||||
- name: Build LVGL MicroPython esp32 dev fri3d-2024
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 dev fri3d-2024
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_fri3d-2024_dev
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
|
||||
|
||||
- name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 prod waveshare-esp32-s3-touch-lcd-2
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod.ota
|
||||
path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin
|
||||
|
||||
- name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2
|
||||
run: |
|
||||
./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2
|
||||
|
||||
- name: Upload built binary as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev
|
||||
path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin
|
||||
compression-level: 0 # don't zip it
|
||||
retention-days: 7
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
[submodule "freezeFS"]
|
||||
path = freezeFS
|
||||
url = https://github.com/MicroPythonOS/freezeFS
|
||||
[submodule "secp256k1-embedded-ecdh"]
|
||||
path = secp256k1-embedded-ecdh
|
||||
url = https://github.com/MicroPythonOS/secp256k1-embedded-ecdh
|
||||
branch = micropython_1.25.0
|
||||
[submodule "lvgl_micropython"]
|
||||
path = lvgl_micropython
|
||||
url = https://github.com/MicroPythonOS/lvgl_micropython
|
||||
[submodule "micropython-camera-API"]
|
||||
path = micropython-camera-API
|
||||
url = https://github.com/cnadler86/micropython-camera-API
|
||||
@@ -1,3 +1,8 @@
|
||||
0.3.0
|
||||
=====
|
||||
- Overhaul build system: much simplier (single clone and script run), add MacOS support, build with GitHub Workflow, etc.
|
||||
- Remove "long press pin 0" for bootloader mode; either use the Settings app or keep it pressed while pressing and releasing the "RESET" button
|
||||
|
||||
0.2.1
|
||||
=====
|
||||
- Settings app: fix stray /cat in Europe/Brussels timezone
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Main repository for MicroPythonOS.
|
||||
|
||||
See https://MicroPythonOS.com/ and https://docs.MicroPythonOS.com/
|
||||
See https://MicroPythonOS.com/ and https://docs.MicroPythonOS.com/ for more info.
|
||||
|
||||
@@ -7,7 +7,6 @@ add_library(usermod_c_mpos INTERFACE)
|
||||
set(MPOS_C_INCLUDES)
|
||||
|
||||
set(MPOS_C_SOURCES
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/hello_world.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/quirc_decode.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/quirc/lib/identify.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/quirc/lib/version_db.c
|
||||
|
||||
@@ -4,9 +4,15 @@ ifneq (,$(findstring -Wno-missing-field-initializers, $(CFLAGS_USERMOD)))
|
||||
CFLAGS_USERMOD += -Wno-missing-field-initializers
|
||||
endif
|
||||
|
||||
SRC_USERMOD_C += $(MOD_DIR)/src/hello_world.c
|
||||
# Check which system this build is being performed on
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifneq ($(UNAME_S),Darwin)
|
||||
# Non-macOS settings (e.g., Linux)
|
||||
LDFLAGS += -lv4l2
|
||||
SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c
|
||||
endif
|
||||
|
||||
SRC_USERMOD_C += $(MOD_DIR)/src/quirc_decode.c
|
||||
SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c
|
||||
|
||||
SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/identify.c
|
||||
SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/version_db.c
|
||||
@@ -15,4 +21,3 @@ SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/quirc.c
|
||||
|
||||
CFLAGS+= -I/usr/include
|
||||
|
||||
LDFLAGS+= -lv4l2
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
|
||||
//#error "building hello world from lcd_utils"
|
||||
|
||||
// C function to print "Hello World"
|
||||
static mp_obj_t hello_world(void) {
|
||||
printf("Hello World from C compiled!\n");
|
||||
return mp_const_none; // MicroPython functions typically return None
|
||||
}
|
||||
|
||||
// Define the function entry in the module
|
||||
static MP_DEFINE_CONST_FUN_OBJ_0(hello_world_obj, hello_world);
|
||||
|
||||
// Module function table
|
||||
static const mp_rom_map_elem_t hello_world_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hello_world) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_hello), MP_ROM_PTR(&hello_world_obj) },
|
||||
};
|
||||
|
||||
// Module globals dictionary
|
||||
static MP_DEFINE_CONST_DICT(hello_world_module_globals, hello_world_module_globals_table);
|
||||
|
||||
// Module definition
|
||||
const mp_obj_module_t hello_world_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&hello_world_module_globals,
|
||||
};
|
||||
|
||||
// Register the module with MicroPython
|
||||
MP_REGISTER_MODULE(MP_QSTR_hello_world, hello_world_module);
|
||||
Submodule
+1
Submodule freezeFS added at 92f12eb1ae
@@ -1 +1 @@
|
||||
../../../MPOS-Kilculator/
|
||||
../../../MPOS-QuasiCalculator/
|
||||
@@ -0,0 +1 @@
|
||||
../../../MPOS-QuasiNametag/
|
||||
@@ -1,54 +0,0 @@
|
||||
print("button.py running")
|
||||
|
||||
import lvgl as lv
|
||||
|
||||
from machine import Pin, Timer
|
||||
import time
|
||||
import _thread
|
||||
|
||||
from mpos.apps import Activity, ActivityNavigator, Intent
|
||||
from mpos.bootloader import ResetIntoBootloader
|
||||
|
||||
# Configure IO0 as input with pull-up resistor
|
||||
button = Pin(0, Pin.IN, Pin.PULL_UP)
|
||||
|
||||
# Variables for long press detection
|
||||
long_press_duration = 3000
|
||||
press_start_time = 0
|
||||
is_pressed = False
|
||||
|
||||
# Timer for checking long press
|
||||
timer = Timer(-1)
|
||||
|
||||
def on_long_press(t): # Callback for when long press duration is reached.
|
||||
print("button.py: long press detected")
|
||||
global timer
|
||||
timer.deinit() # Stop the timer
|
||||
global is_pressed
|
||||
if is_pressed and button.value() == 0: # Ensure button is still pressed
|
||||
#_thread.stack_size(mpos.apps.good_stack_size())
|
||||
#_thread.start_new_thread(handle_long_press, ())
|
||||
#lv.async_call(lambda l: handle_long_press(), None)
|
||||
intent = Intent(activity_class=ResetIntoBootloader)
|
||||
ActivityNavigator.startActivity(intent)
|
||||
else:
|
||||
is_pressed = False
|
||||
|
||||
def button_handler(pin):
|
||||
"""Interrupt handler for button press and release."""
|
||||
global press_start_time, is_pressed, timer
|
||||
if button.value() == 0: # Button pressed (LOW due to pull-up)
|
||||
print("Button IO0 pressed")
|
||||
press_start_time = time.ticks_ms()
|
||||
is_pressed = True
|
||||
# Start timer to check for long press after long_press_duration
|
||||
timer.init(mode=Timer.ONE_SHOT, period=long_press_duration, callback=on_long_press)
|
||||
else: # Button released (HIGH)
|
||||
print("Button IO0 released")
|
||||
timer.deinit() # Cancel timer if button is released early
|
||||
is_pressed = False
|
||||
|
||||
# Set up interrupt for both falling (press) and rising (release) edges
|
||||
button.irq(trigger=Pin.IRQ_FALLING | Pin.IRQ_RISING, handler=button_handler)
|
||||
|
||||
print("button.py finished")
|
||||
@@ -1,4 +1,4 @@
|
||||
CURRENT_OS_VERSION = "0.2.1"
|
||||
CURRENT_OS_VERSION = "0.3.0"
|
||||
|
||||
# Unique string that defines the hardware, used by OSUpdate and the About app
|
||||
_hardware_id = "missing-hardware-info"
|
||||
|
||||
@@ -49,8 +49,6 @@ except Exception as e:
|
||||
# This will throw an exception if there is already a "/builtin" folder present
|
||||
print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e)
|
||||
|
||||
mpos.apps.execute_script("builtin/system/button.py", True) # Install button handler through IRQ
|
||||
|
||||
try:
|
||||
import mpos.wifi
|
||||
_thread.stack_size(mpos.apps.good_stack_size())
|
||||
|
||||
Submodule
+1
Submodule lvgl_micropython added at 24a1c2de2e
@@ -1,4 +0,0 @@
|
||||
freeze('internal_filesystem/', 'boot.py') # Hardware initialization
|
||||
freeze('internal_filesystem/', 'main.py') # User Interface initialization
|
||||
freeze('internal_filesystem/lib', '') # Additional libraries
|
||||
freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps
|
||||
@@ -1,4 +0,0 @@
|
||||
freeze('internal_filesystem/', 'boot_unix.py') # Hardware initialization
|
||||
freeze('internal_filesystem/', 'main.py') # User Interface initialization
|
||||
freeze('internal_filesystem/lib', '') # Additional libraries
|
||||
freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps
|
||||
@@ -0,0 +1,4 @@
|
||||
freeze('../internal_filesystem/', 'boot.py') # Hardware initialization
|
||||
freeze('../internal_filesystem/', 'main.py') # User Interface initialization
|
||||
freeze('../internal_filesystem/lib', '') # Additional libraries
|
||||
freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps
|
||||
@@ -1,4 +1,4 @@
|
||||
freeze('/tmp/', 'boot.py') # Hardware initialization - this file is copied from boot_fri3d-2024.py to /tmp by the build script to have it named boot.py
|
||||
freeze('internal_filesystem/', 'main.py') # User Interface initialization
|
||||
freeze('internal_filesystem/lib', '') # Additional libraries
|
||||
freeze('../internal_filesystem/', 'main.py') # User Interface initialization
|
||||
freeze('../internal_filesystem/lib', '') # Additional libraries
|
||||
freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps
|
||||
@@ -0,0 +1,4 @@
|
||||
freeze('../internal_filesystem/', 'boot_unix.py') # Hardware initialization
|
||||
freeze('../internal_filesystem/', 'main.py') # User Interface initialization
|
||||
freeze('../internal_filesystem/lib', '') # Additional libraries
|
||||
freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user