Ken Van Hoeylandt 79d3dd4fdb
Improvements for apps, filesystems, terminal and shell (#659)
app-module

- Apps now have support for:
  - environment variables (inherit from parent app)
  - current workdir
  - window size (when running in terminal)
- Add type aliases like `AppId` and `PackageId`
- Remove data duplication between ledger and app instance records: create `AppManifestSet`
- `AppManifest` usage safety improved: pass by value where needed, or use `AppId` instead of a manifest.

Terminal and shell

- Moved shell commands into coreutils-module as proper apps.
- Refine stack size for terminal and shell because apps now run with their own task and stack (including in-memory apps)

Platform

- Fix for listing root dir on ESP32: wrap posix directory functions and wire in file systems.
- Moved all platform-specific file system init code to platform subprojects

Other

- Fix for screenshot capture (issue with paths)
- Fixes for coreutils app correctness
- Memory optimizations (use more PSRAM where possible) in various locations such as app-module, shell and terminal.
- `ls` and `help` commands now use terminal width and show columns of data by default
- Created fs helpers at `TactilityKernel/include/tactility/filesystem/fs.h` (partially ported from `ShellFs`)
2026-09-25 08:29:27 +02:00

42 lines
1.6 KiB
CMake

cmake_minimum_required(VERSION 3.20)
file(GLOB_RECURSE SOURCES "source/*.c**")
set(PRIV_REQUIRES_LIST "")
if ("${IDF_TARGET}" STREQUAL "esp32s3" OR "${IDF_TARGET}" STREQUAL "esp32p4")
list(APPEND PRIV_REQUIRES_LIST esp_tinyusb)
endif ()
if ("${IDF_TARGET}" STREQUAL "esp32p4")
list(APPEND PRIV_REQUIRES_LIST esp_driver_ppa)
list(APPEND PRIV_REQUIRES_LIST esp_mm)
endif ()
idf_component_register(
SRCS ${SOURCES}
INCLUDE_DIRS "include/"
PRIV_INCLUDE_DIRS "private/"
REQUIRES TactilityKernel TactilityKernelCpp driver esp_adc esp_driver_i2c esp_driver_i2s esp_driver_ledc esp_driver_uart esp_lcd vfs fatfs nvs_flash esp_wifi esp_netif esp_event
PRIV_REQUIRES ${PRIV_REQUIRES_LIST}
)
if (DEFINED ENV{ESP_IDF_VERSION})
GET_PROPERTY_FILE_CONTENT("${CMAKE_CURRENT_LIST_DIR}/../../sdkconfig" sdkconfig_text)
GET_PROPERTY_VALUE(sdkconfig_text "CONFIG_ESP_HOSTED_ENABLED" esp_host_enabled "n")
if (esp_host_enabled STREQUAL "y")
idf_component_optional_requires(PRIVATE espressif__esp_hosted)
endif ()
endif ()
idf_component_optional_requires(PRIVATE bt usb espressif__usb_host_hid espressif__usb_host_msc espressif__esp_audio_codec)
if ("${IDF_TARGET}" STREQUAL "esp32s3" OR "${IDF_TARGET}" STREQUAL "esp32p4")
idf_component_optional_requires(PRIVATE espressif__usb_host_uac)
endif ()
if ("${IDF_TARGET}" STREQUAL "esp32p4")
# Force-links esp32p4_libc_compat.c's __issignalingf() shim - nothing references it until
# espressif__esp_ipa is scanned much later in link order, by which point this archive is
# already passed over.
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,-u,__issignalingf")
endif ()