feat(p4): integrate esp_lvgl_adapter for unified LVGL management#36
feat(p4): integrate esp_lvgl_adapter for unified LVGL management#36Ghost64847 wants to merge 2 commits intoHighCodeh:devfrom
Conversation
Relocate esp_lvgl_adapter, esp_lv_fs, esp_lv_decoder to components/Service/; button, knob, esp_lcd_touch to components/Drivers/; freetype to components/Core/. Update EXTRA_COMPONENT_DIRS to list each component path individually since ESP-IDF registers a directory as a component when it contains CMakeLists.txt instead of scanning its subdirectories.
- Add esp_lvgl_adapter (v0.4.1) as a local component under components/Service/ - Add companion components: esp_lv_fs, esp_lv_decoder (Service/), button, knob, esp_lcd_touch (Drivers/), freetype (Core/) - Replace manual lv_init/tick/mutex boilerplate in kernel.c with esp_lv_adapter_init() and esp_lv_adapter_start() - Delegate ui_acquire()/ui_release() to esp_lv_adapter_lock/unlock() for unified thread-safe LVGL access across all tasks - Retain lv_port_disp_init (BLE screen mirror hook) and lv_port_indev_init (physical keypad) as they don't conflict with the adapter - Enable PPA hardware acceleration on ESP32-P4 (auto-detected in CMakeLists) - Update sdkconfig and partitions for ESP32-P4 build requirements
5e339bf to
a1cf2d2
Compare
|
thanks for the contribution and for taking the time to put this together! I appreciate the effort. Why we're hesitant about
|
|
Hi @anarchyysm, |
|
I also plan to add arduino-esp32 in firmware_c5 to port Marauder, what do you think? |
depends on how are you planning to make this, you want to add libs for compatibility with arduino libs? Tell me your plan |
|
I plan to add the arduino-esp32 component to port Marauder and modify Marauder's code for the display parts and SPI communication of the esp32p4 and esp32c5 to adapt it to TentacleOS. I have also reverse-engineered libnet80211.a.zip to send deauth frames. I noticed that Espressif has released the esp32e22. Will TentacleOS run on esp32e22 in the future? What do you think of these ideas of mine? |
|
Maybe its an option for a custom firmware later, made by community. If we put Marauder on our firmware, the device won't pass through the regulations tests, we need to even remove our aggressive functions. Plus we not want arduino libs on our firnware, because of ecessive abstraction. Our original firmware, can do everything that marauder, and better. Doesnt need rev Eng the wifi libs too, the comunity already done this, on esp-idf, you just need to put: int ieee80211_raw_frame_sanity_check(int32_t arg, int32_t arg2, int32_t arg3) {
return 0;
}
and put this on CMakeLists.txt: target_link_libraries(${COMPONENT_LIB} -Wl,-zmuldefs)
|
|
Thank you for your response, but I am currently a bit confused and unsure about what contributions I should make or what features I should add to this project, as it seems that everything has already been developed. |
|
maybe its better to wait selection of developer program finish, so you are gon to have all the schematics, pins and access to complete architecture. So at these point, we're going to start open issues/task without assign to specifc person in High Boy GitHub Projects so any open task, you can pick, asign to yourself and start to develop. For now we're using this link just for official developers, but in a few weeks we're going open tasks for the community |
|
I have an idea to use wasm (https://components.espressif.com/components/espressif/wasm-micro-runtime/versions/2.4.0~1/readme) instead of Flipper Zero's FAP. What do you think? |
|
this is a idea for apps right? actually thats a really good ideia, but i never used wasm-micro-runtime, so i need to share our actual planned architecture, and ask some questions. We didn't start to develop this yet, so its a good moment to change and decides if we're going to use ELF or WASM. We already have a fully designed app architecture based on native ELF binaries running on the ESP32-P4. Here's an overview: App Container Format (
|
|
First of all, thank you for your response. I apologise for not having tested WASM on the ESP32, and I am also more inclined to use raw pointers. Encapsulating various APIs is indeed a massive undertaking. After reading your description, I believe the ELF Loader is indeed better than WASM, since WASM essentially acts as a sandbox. Moreover, you already have a complete application architecture based on running native ELF binaries on the ESP32-P4. I look forward to the release of your ELF Loader. I have a suggestion to update the ESP-IDF version from 5.5.1 to 5.5.3, and to update driver/i2c.h to the new driver/i2c_master.h. Additionally, I have a question regarding Espressif's release of the ESP32-E22, with specifications as follows: (Chip Series: ESP32-E22 CPU: RISC-V 32-bit dual-core HP Core @ 500 MHz RAM (Expandable PSRAM): 1 MB Wireless: 2.4 / 5 / 6 GHz tri-band Wi-Fi 6E + BLE 6.0 + Classic BT Key Peripherals: PCIe, SDIO, USB 2.0 Typical Use Cases: PC wireless adapters, AI computing & robotics, XR wearables, consumer electronics, industrial gateways Longevity Commitment: None). Will TentacleOS eventually be run on the ESP32-E22? |
|
Currently, TentacleOS is exclusively for the current High Boy dual-mcu architecture, with ESP32-P4 and ESP32-C5. The main idea is not to create a multi-device firmware like Bruce Firmware and others. But you know, our code is open source, the community can create forks that run on other chips. If you really want to contribute, how about implementing a JS and Lua interpreter? This is in our plan so that the community can create quick scripts without having to compile an entire ELF file, but we haven't worked out the entire workflow for how this will work. We know JavaScript works, but we haven't looked into whether the Lua language can run smoothly on the ESP. |
Summary
Integrates
esp_lvgl_adapter(v0.4.1) as a local component into the ESP32-P4 firmware, replacing the manual LVGL initialization boilerplate with a unified, thread-safe adapter layer.Changes
Build System
EXTRA_COMPONENT_DIRSto list each component path individually (required due to ESP-IDF CMake behavior: directories withCMakeLists.txtare registered as a single component, not scanned for sub-components)New Components Added
esp_lvgl_adapterService/esp_lv_fsService/esp_lv_decoderService/buttonDrivers/knobDrivers/esp_lcd_touchDrivers/freetypeCore/Kernel & UI Changes (
kernel.c,ui_manager.c)lv_init()/ tick timer / mutex creation withesp_lv_adapter_init()esp_lv_adapter_start()now creates and manages the LVGL worker taskui_acquire()/ui_release()delegate toesp_lv_adapter_lock()/esp_lv_adapter_unlock()for unified thread safetylv_port_disp_init()(BLE screen mirror hook) andlv_port_indev_init()(physical keypad) are retained and remain fully functionalNew Capabilities Available (opt-in via menuconfig)
esp_lv_adapter_refresh_now()- force immediate display refreshesp_lv_adapter_pause()/resume()- pause LVGL worker for exclusive accessesp_lv_adapter_set_dummy_draw()- bypass LVGL for direct framebuffer writes (camera/video)CONFIG_ESP_LV_ADAPTER_ENABLE_FPS_STATS)CONFIG_ESP_LV_ADAPTER_ENABLE_FREETYPE)Testing
lv_display_create()callsui_acquire()/ui_release()lv_port_disp.cflush callback