feat: Initialize ESP-IDF project with core build configuration, component dependencies, and web frontend deployment.
This commit is contained in:
@@ -125,10 +125,21 @@ dependencies:
|
||||
source:
|
||||
type: idf
|
||||
version: 5.5.3
|
||||
joltwallet/littlefs:
|
||||
component_hash: dcea25bcef2de023f089f5f01e8d8c46ad1b8ffef75861ad5ffb4098555839df
|
||||
dependencies:
|
||||
- name: idf
|
||||
require: private
|
||||
version: '>=5.0'
|
||||
source:
|
||||
registry_url: https://components.espressif.com/
|
||||
type: service
|
||||
version: 1.20.4
|
||||
direct_dependencies:
|
||||
- espressif/ethernet_init
|
||||
- espressif/led_strip
|
||||
- idf
|
||||
manifest_hash: ca3e63d48140ce7f8993b19863499b13d6162b34a6fa4d0557513b244fc7a7e3
|
||||
- joltwallet/littlefs
|
||||
manifest_hash: 21816aafdbbde14bfaaaabda34966eec49ae1e6f551bc16fe3ff74370b0fb54c
|
||||
target: esp32s3
|
||||
version: 2.0.0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Set this to your ESP32's IP address for local development
|
||||
# Example: VITE_API_BASE=http://192.168.1.100
|
||||
VITE_API_BASE=http://ESP32_IP_HERE
|
||||
VITE_API_BASE=http://192.168.50.216
|
||||
|
||||
@@ -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
|
||||
|
||||
5
Provider/partitions.csv
Normal file
5
Provider/partitions.csv
Normal file
@@ -0,0 +1,5 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
nvs, data, nvs, 0x9000, 0x6000,
|
||||
phy_init, data, phy, 0xf000, 0x1000,
|
||||
factory, app, factory, 0x10000, 1M,
|
||||
www, data, littlefs, , 64K,
|
||||
|
@@ -0,0 +1,3 @@
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
|
||||
|
||||
Reference in New Issue
Block a user