Open luacerbb opened 2 years ago
Is there a reason you are using v4.1.3?
v4.4.2 is much newer! and it's usually pretty minimal changes to upgrade.
Is there a reason you are using v4.1.3?
v4.4.2 is much newer! and it's usually pretty minimal changes to upgrade. Our product is developed based on 4.1. If we want to change it to version 4.4, it will take a lot of time to modify the adaptation interface and test. Please help me to see what causes this situation, thank you
There was a similar issue I filed, that was fixed in v4.4.2
I try to run nimble task in v4.4.2,it work well.but I find the v4.4.2 will consume more ram than v4.1.3. I just test hello world example. V4.4.2 Total sizes: Used static DRAM: 11312 bytes ( 169424 remain, 6.3% used) .data size: 9024 bytes .bss size: 2288 bytes Used static IRAM: 45790 bytes ( 85282 remain, 34.9% used) .text size: 44763 bytes .vectors size: 1027 bytes Used Flash size : 115423 bytes .text : 84459 bytes .rodata : 30708 bytes Total image size: 170237 bytes (.bin may be padded larger)
V4.1.3 Total sizes: DRAM .data size: 8248 bytes DRAM .bss size: 2056 bytes Used static DRAM: 10304 bytes ( 170432 available, 5.7% used) Used static IRAM: 40459 bytes ( 90613 available, 30.9% used) Flash code: 80043 bytes Flash rodata: 23304 bytes Total image size:~ 152054 bytes (.bin may be padded larger)
we can see v4.4.2 will consume more than 7k bytes. Can optimize ram usage in v4.4.2?
I try to run nimble task in v4.4.2,it work well.but I find the v4.4.2 will consume more ram than v4.1.3.
https://github.com/espressif/esp-idf/issues/7906 The memory issue should be fixed by v4.4.4.
There was a similar issue I filed, that was fixed in v4.4.2
but in v4.4.3,it abort again when I stop ble and operate flash. 14:11:24:18 [dbg] _bd_ble_stop(1328): ble stop E (108017) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (108017) task_wdt: - IDLE (CPU 0) E (108017) task_wdt: Tasks currently running: E (108017) task_wdt: CPU 0: main_task E (108017) task_wdt: CPU 1: IDLE E (108017) task_wdt: Aborting.
abort() was called at PC 0x4013bac0 on core 0 0x4013bac0: task_wdt_isr at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/esp_system/task_wdt.c:176 (discriminator 3)
Backtrace: 0x40081c5a:0x3ffbe870 0x40091135:0x3ffbe890 0x400972ce:0x3ffbe8b0 0x4013bac0:0x3ffbe920 0x40082d75:0x3ffbe940 0x4008b5b3:0x3ffdce20 0x4008c5ad:0x3ffdce50 0x4008c5b7:0x3ffdce70 0x4008fd1d:0x3ffdce90 0x4008c189:0x3ffdceb0 0x4013856f:0x3ffdcef0 0x40139d32:0x3ffdcf20 0x401aeb65:0x3ffdcf40 0x4013a7ce:0x3ffdcf60 0x40138fa7:0x3ffdcfc0 0x40139729:0x3ffdd010 0x40139cc9:0x3ffdd070 0x4013897b:0x3ffdd090 0x4012b809:0x3ffdd0c0 0x400df2ca:0x3ffdd0e0 0x400e134f:0x3ffdd150 0x400d89fe:0x3ffdd1e0 0x400d94cf:0x3ffdd2d0 0x400dbc3c:0x3ffdd4f0 0x40081c5a: panic_abort at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/esp_system/panic.c:402
0x40091135: esp_system_abort at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/esp_system/esp_system.c:128
0x400972ce: abort at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/newlib/abort.c:46
0x4013bac0: task_wdt_isr at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/esp_system/task_wdt.c:176 (discriminator 3)
0x40082d75: _xt_lowint1 at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4008b5b3: spi_flash_disable_interrupts_caches_and_other_cpu at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/spi_flash/cache_utils.c:167 (discriminator 1)
0x4008c5ad: cache_disable at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/spi_flash/spi_flash_os_func_app.c:70
0x4008c5b7: spi1_start at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/spi_flash/spi_flash_os_func_app.c:99
0x4008fd1d: spiflash_start_default at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/spi_flash/esp_flash_api.c:128
0x4008c189: esp_flash_read at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/spi_flash/esp_flash_api.c:821
0x4013856f: esp_partition_read at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/spi_flash/partition.c:424
0x40139d32: nvs::NVSPartition::read(unsigned int, void, unsigned int) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_partition.cpp:45 (inlined by) nvs::NVSPartition::read(unsigned int, void, unsigned int) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_partition.cpp:39
0x401aeb65: nvs::Page::readEntry(unsigned int, nvs::Item&) const at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_page.cpp:879
0x4013a7ce: nvs::Page::findItem(unsigned char, nvs::ItemType, char const, unsigned int&, nvs::Item&, unsigned char, nvs::VerOffset) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_page.cpp:929 (inlined by) nvs::Page::findItem(unsigned char, nvs::ItemType, char const, unsigned int&, nvs::Item&, unsigned char, nvs::VerOffset) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_page.cpp:886
0x40138fa7: nvs::Storage::findItem(unsigned char, nvs::ItemType, char const, nvs::Page&, nvs::Item&, unsigned char, nvs::VerOffset) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_storage.cpp:161
0x40139729: nvs::Storage::eraseItem(unsigned char, nvs::ItemType, char const*) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_storage.cpp:619
0x40139cc9: nvs::Storage::eraseItem(unsigned char, char const) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_storage.hpp:98 (inlined by) nvs::NVSHandleSimple::erase_item(char const) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_handle_simple.cpp:81 (inlined by) nvs::NVSHandleSimple::erase_item(char const*) at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_handle_simple.cpp:76
0x4013897b: nvs_erase_key at /mnt/hgfs/SUB_PROJECT/esp-idf-v4.4.3/components/nvs_flash/src/nvs_api.cpp:322
0x4012b809: HAL_Kv_Del at /mnt/hgfs/HWG004WRF/build/../components/ali_sdk/wrappers/freertos/HAL_KV.c:274
0x400df2ca: _deal_subdev_info_store at /mnt/hgfs/HWG004WRF/build/../main/bd_common.c:573 (inlined by) bd_common_nvs_op at /mnt/hgfs/HWG004WRF/build/../main/bd_common.c:1144
0x400e134f: bd_comm_del_local_all_subdev_info at /mnt/hgfs/HWG004WRF/build/../main/bd_common.c:2955
0x400d89fe: _bd_app_dev_info_update at /mnt/hgfs/HWG004WRF/build/../main/main.c:425
0x400d94cf: _bd_app_parse_desired_reply at /mnt/hgfs/HWG004WRF/build/../main/main.c:1353
0x400dbc3c: _app_main_task at /mnt/hgfs/HWG004WRF/build/../main/main.c:3455
I try to run nimble task in v4.4.2,it work well.but I find the v4.4.2 will consume more ram than v4.1.3.
7906 The memory issue should be fixed by v4.4.4.
ok,I will try
Answers checklist.
IDF version.
4.1.3
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
ESP32-DevKitC-V4_
Power Supply used.
External 5V
What is the expected behavior?
system can run normal,when i use nimble task and nvs operation
What is the actual behavior?
when I run nimble task, task wdt will often abort at nvs operate,I think nvs operaton abnormal caused by stopping nimble task
Steps to reproduce.
//when I stop nimble task, the other task will write nvs data to flash, 1、 start nimble task to recv wifi ssid and password 2、when use wifi ssid and password connected ap success ,I will save datas to flash by nvs operation. 3 、stop nimble task
Debug Logs.
More Information.
No response