fix(examples): idf_as_lib move flash_ops.c to spi_flash stub library

Example linux build of the example demonstrates "esp32" and "spi_flash" stub
libraries (roughly analogous to "esp_system" and "spi_flash" components).

This commit moves the "flash_ops.c" file to the "spi_flash" stub library as it
is a flash related funciton.

Also renamed the header to "esp_flash.h" (in order to match current header name
in IDF). This is a prerequisite to fixing the linux build of this example.
This commit is contained in:
Darian Leung 2025-02-15 18:16:49 +08:00
parent 5301eaf0d8
commit 0b6922405d
No known key found for this signature in database
GPG Key ID: E0621F35D994A3AA
4 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
add_library(stub_esp32 STATIC system_api.c flash_ops.c cpu_start.c) add_library(stub_esp32 STATIC system_api.c cpu_start.c)
target_include_directories(stub_esp32 PUBLIC .) target_include_directories(stub_esp32 PUBLIC .)
add_library(stub::esp32 ALIAS stub_esp32) add_library(stub::esp32 ALIAS stub_esp32)

View File

@ -1,3 +1,3 @@
add_library(stub_spi_flash INTERFACE) add_library(stub_spi_flash STATIC flash_ops.c)
target_include_directories(stub_spi_flash INTERFACE .) target_include_directories(stub_spi_flash INTERFACE .)
add_library(stub::spi_flash ALIAS stub_spi_flash) add_library(stub::spi_flash ALIAS stub_spi_flash)