Initial commit

This commit is contained in:
Tony
2026-04-29 18:53:26 +08:00
commit f4756ce816
45 changed files with 14318 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)
if(NOT IDF_TARGET)
set(IDF_TARGET "esp32s3" CACHE STRING "ESP-IDF target")
endif()
set(EXTRA_COMPONENT_DIRS
"${CMAKE_CURRENT_LIST_DIR}/../../components"
"${CMAKE_CURRENT_LIST_DIR}/../../../dali_cpp"
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(receiver_app)
+34
View File
@@ -0,0 +1,34 @@
dependencies:
espressif/cjson:
component_hash:
e788323270d90738662d66fffa910bfe1fba019bba087f01557e70c40485b469
dependencies:
- name: idf
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com/
type: service
version: 1.7.19~2
espressif/mqtt:
component_hash:
ffdad5659706b4dc14bc63f8eb73ef765efa015bf7e9adf71c813d52a2dc9342
dependencies:
- name: idf
require: private
version: '>=5.3'
source:
registry_url: https://components.espressif.com/
type: service
version: 1.0.0
idf:
source:
type: idf
version: 5.5.4
direct_dependencies:
- espressif/cjson
- espressif/mqtt
- idf
manifest_hash: c84936cd9495d1229bcfb1c42ee403b1c8858c73866e5ccacb7bf36de2b929c2
target: esp32s3
version: 2.0.0
+6
View File
@@ -0,0 +1,6 @@
idf_component_register(
SRCS "app_main.cpp"
REQUIRES gateway_core gateway_runtime
)
set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17)
+38
View File
@@ -0,0 +1,38 @@
#include "gateway_core.hpp"
#include "gateway_runtime.hpp"
namespace {
constexpr const char* kProjectName = "UartRelayer";
constexpr const char* kProjectVersion = "0.1.0";
gateway::BootProfile ReceiverProfile() {
return gateway::BootProfile{
gateway::AppRole::kReceiver,
"receiver",
false,
false,
false,
true,
true,
};
}
} // namespace
extern "C" void app_main(void) {
ESP_ERROR_CHECK(gateway::InitializeRuntimeNvs());
gateway::GatewayCore core(ReceiverProfile());
core.start();
gateway::GatewayRuntime runtime(
core.profile(),
gateway::GatewayRuntimeConfig{
kProjectName,
kProjectVersion,
gateway::ReadRuntimeSerialId(),
},
nullptr);
ESP_ERROR_CHECK(runtime.start());
}
+8
View File
@@ -0,0 +1,8 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
otadata, data, ota, 0xf000, 0x2000,
phy_init, data, phy, 0x11000, 0x1000,
factory, app, factory, 0x20000, 0x180000,
ota_0, app, ota_0, 0x1a0000, 0x180000,
ota_1, app, ota_1, 0x320000, 0x180000,
storage, data, spiffs, 0x4a0000, 0xb60000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x6000
3 otadata data ota 0xf000 0x2000
4 phy_init data phy 0x11000 0x1000
5 factory app factory 0x20000 0x180000
6 ota_0 app ota_0 0x1a0000 0x180000
7 ota_1 app ota_1 0x320000 0x180000
8 storage data spiffs 0x4a0000 0xb60000
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y