feat: Initialize ESP-IDF project with core build configuration, component dependencies, and web frontend deployment.
This commit is contained in:
@@ -1,2 +1,11 @@
|
||||
idf_component_register(SRCS "main.cpp"
|
||||
INCLUDE_DIRS ".")
|
||||
|
||||
if(CONFIG_CALENDINK_DEPLOY_WEB_PAGES)
|
||||
set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../frontend")
|
||||
if(EXISTS ${WEB_SRC_DIR}/dist)
|
||||
littlefs_create_partition_image(www ${WEB_SRC_DIR}/dist FLASH_IN_PROJECT)
|
||||
else()
|
||||
message(FATAL_ERROR "'${WEB_SRC_DIR}/dist' doesn't exist. Run 'npm run build' in frontend/ first.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -25,3 +25,21 @@ menu "CalendarInk Network Configuration"
|
||||
Number of times to retry the WiFi connection before failing completely.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Calendink Web Server"
|
||||
|
||||
config CALENDINK_DEPLOY_WEB_PAGES
|
||||
bool "Deploy web pages to device's LittleFS"
|
||||
default n
|
||||
help
|
||||
If enabled, the frontend dist/ folder will be flashed
|
||||
to the 'www' LittleFS partition during build.
|
||||
Disable for fast backend-only iteration.
|
||||
|
||||
config CALENDINK_WEB_MOUNT_POINT
|
||||
string "Website mount point in VFS"
|
||||
default "/www"
|
||||
help
|
||||
VFS path where the LittleFS partition is mounted.
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -16,3 +16,4 @@ dependencies:
|
||||
# public: true
|
||||
espressif/led_strip: ^3.0.3
|
||||
espressif/ethernet_init: ^1.3.0
|
||||
joltwallet/littlefs: "^1.20" # https://github.com/joltwallet/esp_littlefs
|
||||
|
||||
Reference in New Issue
Block a user