diff --git a/remote/code/.clangd b/remote/code/.clangd new file mode 100644 index 0000000..437f255 --- /dev/null +++ b/remote/code/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Remove: [-f*, -m*] diff --git a/remote/code/dependencies.lock b/remote/code/dependencies.lock index 196998d..5f6060f 100644 --- a/remote/code/dependencies.lock +++ b/remote/code/dependencies.lock @@ -1,6 +1,6 @@ dependencies: espressif/cmake_utilities: - component_hash: 351350613ceafba240b761b4ea991e0f231ac7a9f59a9ee901f751bddc0bb18f + component_hash: 05165f30922b422b4b90c08845e6d449329b97370fbd06309803d8cb539d79e3 dependencies: - name: idf require: private @@ -8,23 +8,23 @@ dependencies: source: registry_url: https://components.espressif.com type: service - version: 0.5.3 + version: 1.1.1 espressif/esp-now: - component_hash: 56f902e978ec0b70528ad30a45265b56bf2b91653d13e0badc78159f39f41ece + component_hash: 217f4e2c1672bcc71e5890fb3659528bbce5f1a8a995b1668fec9374acbd0f45 dependencies: - name: espressif/cmake_utilities registry_url: https://components.espressif.com require: private - version: 0.* + version: '>=0.5.3' - name: idf require: private version: '>=4.4' source: registry_url: https://components.espressif.com/ type: service - version: 2.5.2 + version: 2.5.3 espressif/i2c_bus: - component_hash: 4e990dc11734316186b489b362c61d41f23f79d58bc169795cec215e528cba14 + component_hash: 483112c1619c54c38d0b734fb25f1678733267858a77b7af2f48cc7db6dbbd84 dependencies: - name: espressif/cmake_utilities registry_url: https://components.espressif.com @@ -36,7 +36,7 @@ dependencies: source: registry_url: https://components.espressif.com/ type: service - version: 1.5.0 + version: 1.5.2 idf: source: type: idf @@ -49,29 +49,29 @@ dependencies: type: service version: 8.4.0 m5stack/m5gfx: - component_hash: 4c420c89ae7bfe33231dab80b784f4508591279b2a3a935ac849dddb1942d0d5 + component_hash: 96695547f4403f0864a637325b63b37276233999fcbdd5e485f4e71fd2210020 dependencies: [] source: registry_url: https://components.espressif.com type: service - version: 0.2.17 + version: 0.2.23 m5stack/m5unified: - component_hash: 1c75bb80654da6c7fcdd11ef7a1cb9b7d6db2e98f96612a4babf12b5e9bc7196 + component_hash: 363c05d034f103471dcbe76e5e0773ecc0fe263212930259867212341b1e48a4 dependencies: - name: m5stack/m5gfx registry_url: https://components.espressif.com require: private - version: ^0.2.17 + version: '>=0.2.22' source: registry_url: https://components.espressif.com/ type: service - version: 0.2.11 + version: 0.2.17 direct_dependencies: - espressif/esp-now - espressif/i2c_bus - idf - lvgl/lvgl - m5stack/m5unified -manifest_hash: 1a633f7edf3e64c57d1f921f15913b2bf6deda0e71113957a364b6552fa37e9b +manifest_hash: dcf5a8b9158ceba6656057f11794d186f6222be421c6b2023bdeee009adce7e8 target: esp32 version: 2.0.0 diff --git a/remote/code/StackChan-RemoteControl-ESPNow-jyy-20260325_0x0.bin b/remote/code/k151-R-StackChan-RemoteControl-ESPNow-v1.2-jyy-20260617_0x0.bin similarity index 50% rename from remote/code/StackChan-RemoteControl-ESPNow-jyy-20260325_0x0.bin rename to remote/code/k151-R-StackChan-RemoteControl-ESPNow-v1.2-jyy-20260617_0x0.bin index a2efeed..056e4f1 100644 Binary files a/remote/code/StackChan-RemoteControl-ESPNow-jyy-20260325_0x0.bin and b/remote/code/k151-R-StackChan-RemoteControl-ESPNow-v1.2-jyy-20260617_0x0.bin differ diff --git a/remote/code/main/StackChan-RemoteControl-ESPNow.cpp b/remote/code/main/StackChan-RemoteControl-ESPNow.cpp index 5248f49..dc23aaf 100644 --- a/remote/code/main/StackChan-RemoteControl-ESPNow.cpp +++ b/remote/code/main/StackChan-RemoteControl-ESPNow.cpp @@ -77,8 +77,8 @@ void app_main(void) M5.begin(); M5.Power.begin(); - M5.Power.Axp192.setLDO2(2800); // set LDO2 to 2.8V for external devices - M5.Imu.init(&M5.In_I2C); // init IMU with internal I2C port + M5.Lcd.setBrightness(100); // set brightness to 100 + M5.Imu.init(&M5.In_I2C); // init IMU with internal I2C port printf("IN_I2C port: %d\n", M5.In_I2C.getPort()); printf("M5 Display width: %ld, height: %ld\n", M5.Display.width(), M5.Display.height()); diff --git a/remote/code/main/idf_component.yml b/remote/code/main/idf_component.yml index e62ca39..7ca97b9 100644 --- a/remote/code/main/idf_component.yml +++ b/remote/code/main/idf_component.yml @@ -14,7 +14,7 @@ dependencies: # # `public` flag doesn't have an effect dependencies of the `main` component. # # All dependencies of `main` are public by default. # public: true - m5stack/m5unified: ^0.2.11 + m5stack/m5unified: ^0.2.17 espressif/esp-now: =* espressif/i2c_bus: ^1.5.0 lvgl/lvgl: ^8.4.0 diff --git a/remote/code/partitions.csv b/remote/code/partitions.csv new file mode 100644 index 0000000..4396009 --- /dev/null +++ b/remote/code/partitions.csv @@ -0,0 +1,4 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x6000, +phy_init, data, phy, 0xf000, 0x1000, +factory, app, factory, 0x10000, 0x1F0000, diff --git a/remote/code/sdkconfig b/remote/code/sdkconfig index 59d1b4f..575382a 100644 --- a/remote/code/sdkconfig +++ b/remote/code/sdkconfig @@ -374,14 +374,14 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set CONFIG_ESPTOOLPY_FLASHFREQ="40m" # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" # CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE is not set CONFIG_ESPTOOLPY_BEFORE_RESET=y # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set @@ -396,12 +396,12 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # Partition Table # # CONFIG_PARTITION_TABLE_SINGLE_APP is not set -CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set # CONFIG_PARTITION_TABLE_TWO_OTA_LARGE is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp_large.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table @@ -777,7 +777,7 @@ CONFIG_ESP_HTTP_CLIENT_EVENT_POST_TIMEOUT=2000 # # HTTP Server # -CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 CONFIG_HTTPD_MAX_URI_LEN=512 CONFIG_HTTPD_ERR_RESP_NO_DELAY=y CONFIG_HTTPD_PURGE_BUF_LEN=32 @@ -875,7 +875,7 @@ CONFIG_RTC_CLK_CAL_CYCLES=1024 # # Peripheral Control # -CONFIG_PERIPH_CTRL_FUNC_IN_IRAM=y +# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set # end of Peripheral Control # @@ -944,7 +944,7 @@ CONFIG_ESP_PHY_CALIBRATION_MODE=0 # Power Management # # CONFIG_PM_ENABLE is not set -CONFIG_PM_SLP_IRAM_OPT=y +# CONFIG_PM_SLP_IRAM_OPT is not set # end of Power Management # @@ -1380,7 +1380,7 @@ CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y # CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set -CONFIG_LWIP_DHCP_OPTIONS_LEN=69 +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 CONFIG_LWIP_NUM_NETIF_CLIENT_DATA=0 CONFIG_LWIP_DHCP_COARSE_TIMER_SECS=1 @@ -1959,6 +1959,17 @@ CONFIG_ESPNOW_OTA_WAIT_RESPONSE_TIMEOUT=10000 # CONFIG_ESPNOW_AUTO_RESTORE_CHANNEL is not set # CONFIG_ESPNOW_DATA_FAST_ACK is not set +# +# ESP-NOW Task Configuration +# + +# +# Avoid heavy processing in handlers; offload to app task via queues. +# +CONFIG_ESPNOW_TASK_STACK_SIZE=4096 +CONFIG_ESPNOW_TASK_PRIORITY=1 +# end of ESP-NOW Task Configuration + # # ESP-NOW Utils Configuration # @@ -2035,9 +2046,9 @@ CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 # Memory settings # # CONFIG_LV_MEM_CUSTOM is not set -CONFIG_LV_MEM_SIZE_KILOBYTES=128 +CONFIG_LV_MEM_SIZE_KILOBYTES=32 CONFIG_LV_MEM_ADDR=0x0 -CONFIG_LV_MEM_BUF_MAX_NUM=32 +CONFIG_LV_MEM_BUF_MAX_NUM=16 # CONFIG_LV_MEMCPY_MEMSET_STD is not set # end of Memory settings diff --git a/remote/code/sdkconfig.old b/remote/code/sdkconfig.old index 2cc0fcd..226a64c 100644 --- a/remote/code/sdkconfig.old +++ b/remote/code/sdkconfig.old @@ -247,7 +247,7 @@ CONFIG_IDF_TOOLCHAIN_GCC=y CONFIG_IDF_TARGET_ARCH_XTENSA=y CONFIG_IDF_TARGET_ARCH="xtensa" CONFIG_IDF_TARGET="esp32" -CONFIG_IDF_INIT_VERSION="5.4.2" +CONFIG_IDF_INIT_VERSION="$IDF_INIT_VERSION" CONFIG_IDF_TARGET_ESP32=y CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 @@ -374,14 +374,14 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set CONFIG_ESPTOOLPY_FLASHFREQ="40m" # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" # CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE is not set CONFIG_ESPTOOLPY_BEFORE_RESET=y # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set @@ -395,13 +395,13 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # # Partition Table # -# CONFIG_PARTITION_TABLE_SINGLE_APP is not set -CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y +CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set # CONFIG_PARTITION_TABLE_TWO_OTA_LARGE is not set # CONFIG_PARTITION_TABLE_CUSTOM is not set CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp_large.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table @@ -777,7 +777,7 @@ CONFIG_ESP_HTTP_CLIENT_EVENT_POST_TIMEOUT=2000 # # HTTP Server # -CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 CONFIG_HTTPD_MAX_URI_LEN=512 CONFIG_HTTPD_ERR_RESP_NO_DELAY=y CONFIG_HTTPD_PURGE_BUF_LEN=32 @@ -875,7 +875,7 @@ CONFIG_RTC_CLK_CAL_CYCLES=1024 # # Peripheral Control # -CONFIG_PERIPH_CTRL_FUNC_IN_IRAM=y +# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set # end of Peripheral Control # @@ -944,7 +944,7 @@ CONFIG_ESP_PHY_CALIBRATION_MODE=0 # Power Management # # CONFIG_PM_ENABLE is not set -CONFIG_PM_SLP_IRAM_OPT=y +# CONFIG_PM_SLP_IRAM_OPT is not set # end of Power Management # @@ -1380,7 +1380,7 @@ CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y # CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set -CONFIG_LWIP_DHCP_OPTIONS_LEN=69 +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 CONFIG_LWIP_NUM_NETIF_CLIENT_DATA=0 CONFIG_LWIP_DHCP_COARSE_TIMER_SECS=1 @@ -1959,6 +1959,17 @@ CONFIG_ESPNOW_OTA_WAIT_RESPONSE_TIMEOUT=10000 # CONFIG_ESPNOW_AUTO_RESTORE_CHANNEL is not set # CONFIG_ESPNOW_DATA_FAST_ACK is not set +# +# ESP-NOW Task Configuration +# + +# +# Avoid heavy processing in handlers; offload to app task via queues. +# +CONFIG_ESPNOW_TASK_STACK_SIZE=4096 +CONFIG_ESPNOW_TASK_PRIORITY=1 +# end of ESP-NOW Task Configuration + # # ESP-NOW Utils Configuration # @@ -2035,7 +2046,7 @@ CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 # Memory settings # # CONFIG_LV_MEM_CUSTOM is not set -CONFIG_LV_MEM_SIZE_KILOBYTES=64 +CONFIG_LV_MEM_SIZE_KILOBYTES=32 CONFIG_LV_MEM_ADDR=0x0 CONFIG_LV_MEM_BUF_MAX_NUM=16 # CONFIG_LV_MEMCPY_MEMSET_STD is not set