Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ if (DEFINED ENV{ESP_IDF_VERSION})

# opendir()/readdir()/closedir() also define the plain names directly (vfs_calls.c).
# Wrapped so opendir("/") synthesizes a listing of own registered filesystems instead of ENOENT.
# See Platforms/platform-esp32/source/root_dir.cpp.
# See Modules/app-esp32-module/source/root_dir.cpp.
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=opendir" APPEND)
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=readdir" APPEND)
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=closedir" APPEND)

# mkdir() is an alias in vfs_calls.c. Wrapped so an existing mount root reports EEXIST.
# See Platforms/platform-esp32/source/mkdir.cpp.
# See Modules/app-esp32-module/source/path_wrap.cpp.
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=mkdir" APPEND)

# Path-based VFS calls are aliases in vfs_calls.c. Wrapped so a NULL path fails with EFAULT instead of crashing.
# See Platforms/platform-esp32/source/vfs_null_path.cpp.
# Path-based VFS calls are aliases in vfs_calls.c. Wrapped so an app's relative path is resolved against its cwd,
# and a NULL path fails with EFAULT instead of crashing. See Modules/app-esp32-module/source/path_wrap.cpp.
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=_open_r" APPEND)
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=_stat_r" APPEND)
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=_link_r" APPEND)
Expand Down Expand Up @@ -200,6 +200,13 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION})
set(FREERTOS_PORT GCC_POSIX CACHE STRING "")
add_subdirectory(Libraries/FreeRTOS-Kernel)
target_compile_definitions(freertos_kernel PUBLIC "projCOVERAGE_TEST=0")
# xTaskCreate() and vTaskDelete() are defined by freertos_task_hooks.c instead, see its header
set_source_files_properties(Libraries/FreeRTOS-Kernel/tasks.c
TARGET_DIRECTORY freertos_kernel
PROPERTIES COMPILE_DEFINITIONS "xTaskCreate=freertos_real_xTaskCreate;vTaskDelete=freertos_real_vTaskDelete"
)
target_sources(freertos_kernel PRIVATE Platforms/platform-posix/freertos/freertos_task_hooks.c)
target_include_directories(freertos_kernel PUBLIC Platforms/platform-posix/freertos)

# EmbedTLS
set(ENABLE_TESTING OFF)
Expand Down
2 changes: 2 additions & 0 deletions Documentation/ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

## Higher Priority

- Terminal app should always run in non-LVGL mode if no PSRAM is present.
- Crash app should work without LVGL, like Boot app. It should wait for any input (keyboard or pointer) to continue.
- NimBLE looses pairing key after reboot
- CrashDiagnostics shouldn't show a QR when there's no callstack
- Move USB host task stacks to SPIRAM when available: esp32_usbhost*.cpp
Expand Down
9 changes: 7 additions & 2 deletions Modules/app-esp32-module/source/app_esp32_loader_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ std::string resolve_elf_path(const std::string& path) {
constexpr ElfRequirements EXECUTABLE_REQUIREMENTS = {
.elf_class = ELF_CLASS_32,
.data = ELF_DATA_2LSB,
.type = ELF_TYPE_DYN,
#if CONFIG_ELF_LOADER_BUS_ADDRESS_MIRROR
// Loaded by section rather than by program header, so a relocatable object without any (e.g. xcc700's output) loads too
.types = ELF_TYPE_MASK(ELF_TYPE_DYN) | ELF_TYPE_MASK(ELF_TYPE_REL),
#else
.types = ELF_TYPE_MASK(ELF_TYPE_DYN),
#endif
#if defined(__XTENSA__)
.machine = ELF_MACHINE_XTENSA,
#elif defined(__riscv)
Expand All @@ -107,7 +112,7 @@ bool is_executable_file(const std::string& resolved_path) {

error_t api_load(AppLocation location, AppRuntime* out_runtime) {
if (location.type != APP_LOCATION_PATH) {
LOG_E(TAG, "Out of memory");
LOG_E(TAG, "Unsupported location type");
return ERROR_NOT_SUPPORTED;
}

Expand Down
Loading
Loading