Move FreeRTOSConfig.h to app-sim (#17)

* Move FreeRTOSConfig.h to app-sim

* improved docs

* updated ideas.md and removed finished todos
This commit is contained in:
Ken Van Hoeylandt 2024-01-22 00:27:17 +01:00 committed by GitHub
parent d6baf40d0b
commit ed2d0cc78a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 37 additions and 16 deletions

View File

@ -37,12 +37,23 @@ add_subdirectory(tactility-core)
if (NOT ESP_PLATFORM)
add_subdirectory(libs/freertos-kernel)
target_include_directories(freertos-kernel
PUBLIC app-sim/src # for FreeRTOSConfig.h
)
add_subdirectory(libs/mbedtls)
add_subdirectory(app-sim)
# region LVGL
# region SDL & LVGL
find_package(SDL2 REQUIRED CONFIG)
add_subdirectory(libs/lvgl) # Added as idf component for ESP and as library for other targets
target_include_directories(lvgl
PUBLIC ${SDL2_INCLUDE_DIRS}
PUBLIC app-sim/src # for lv_conf.h and lv_drv_conf.h
)
add_subdirectory(libs/lv_drivers)
option(LV_USE_DRAW_SDL "Use SDL draw unit" OFF)
@ -57,18 +68,11 @@ if (NOT ESP_PLATFORM)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
find_package(SDL2 REQUIRED CONFIG)
add_compile_definitions($<$<BOOL:${LV_USE_DRAW_SDL}>:LV_USE_DRAW_SDL=1>)
add_compile_definitions($<$<BOOL:${LV_USE_LIBPNG}>:LV_USE_LIBPNG=1>)
add_compile_definitions($<$<BOOL:${LV_USE_LIBJPEG_TURBO}>:LV_USE_LIBJPEG_TURBO=1>)
add_compile_definitions($<$<BOOL:${LV_USE_FFMPEG}>:LV_USE_FFMPEG=1>)
target_include_directories(lvgl
PUBLIC ${SDL2_INCLUDE_DIRS}
PUBLIC app-sim/src # for lv_conf.h and lv_drv_conf.h
)
if (LV_USE_DRAW_SDL)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
# Need to install libsdl2-image-dev
@ -104,5 +108,5 @@ if (NOT ESP_PLATFORM)
target_include_directories(lvgl PUBLIC ${FREETYPE_INCLUDE_DIRS})
endif(LV_USE_FREETYPE)
#endregion
# endregion SDL & LVGL
endif()

View File

@ -3,6 +3,8 @@
Tactility is a front-end application platform for ESP32. It is mainly intended for touchscreen devices.
It provides an application framework that is based on code from the [Flipper Zero](https://github.com/flipperdevices/flipperzero-firmware/) project.
**Status: Alpha**
![Tactility shown on a Lilygo T-Deck device and on PC](docs/pics/tactility-showcase.jpg)
Tactility features:
@ -15,8 +17,6 @@ Requirements:
- ESP32 (any?) with a display (connected via SPI or I2C)
- [esp-idf 5.1.2](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/index.html) or a newer v5.1.x
**Status: Alpha**
## Technologies
UI is created with [lvgl](https://github.com/lvgl/lvgl) via [esp_lvgl_port](https://github.com/espressif/esp-bsp/tree/master/components/esp_lvgl_port).

View File

@ -1,3 +1,10 @@
/**
* This configuration follows the ESP32 config closely.
* Some parameters are explicitly marked as important,
* but most parameters should match.
*
* See $IDF_PATH/components/freertos/esp_additions/include/freertos/FreeRTOSConfig.h
*/
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
@ -6,7 +13,7 @@
#define configUSE_TICKLESS_IDLE 0
#define configCPU_CLOCK_HZ 60000000
#define configSYSTICK_CLOCK_HZ 1000000
#define configTICK_RATE_HZ 1000
#define configTICK_RATE_HZ 1000 // Must be the same as ESP32!
#define configMAX_PRIORITIES 10
#define configMINIMAL_STACK_SIZE 128
#define configMAX_TASK_NAME_LEN 16
@ -14,7 +21,7 @@
#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_16_BITS
#define configIDLE_SHOULD_YIELD 1
#define configUSE_TASK_NOTIFICATIONS 1
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 2
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 2 // Must be the same as ESP32!
#define configUSE_MUTEXES 1
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_COUNTING_SEMAPHORES 1
@ -89,6 +96,7 @@
#define secureconfigMAX_SECURE_CONTEXTS 5
/* Optional functions - most linkers will remove unused functions anyway. */
/* Ensure these are closely match ESP32: you can activate more features, but not less. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1

View File

@ -1,6 +1,16 @@
# TODOs
- Make `desktop` app listen to changes in `app_manifest_registry`
- Update `view_port` to use `ViewPort` as handle externally and `ViewPortData` internally
- Replace FreeRTOS semaphore from `Loader` with internal `Mutex`
- Create unit tests for `tactility-core` and `tactility` (PC-only for now)
# Core Ideas
- Support for displays with different DPI. Consider the layer-based system like on Android.
# App Ideas
- Chip 8 emulator
- Discord bot
- BadUSB
- IR transceiver app
- GPIO status viewer
- BlueTooth keyboard app

View File

@ -4,7 +4,7 @@
#include "esp_lvgl_port.h"
#include "esp_netif.h"
#include "graphics_i.h"
#include "hardware_i.h" // TODO: Rename to hardware*.*
#include "hardware_i.h"
#include "nvs_flash.h"
#include "partitions.h"
#include "services/loader/loader.h"

View File

@ -272,7 +272,6 @@ static int32_t loader_main(TT_UNUSED void* parameter) {
TT_LOG_I(TAG, "Processing message of type %d", message.type);
switch (message.type) {
case LoaderMessageTypeAppStart:
// TODO: add bundle
message.status_value->value = loader_do_start_by_id(
message.start.id,
message.start.bundle