Memory consumption dram0_0_seg is very high for to buiild zephyr rtos wifi sample

softronica
Posts: 2
Joined: Wed Apr 26, 2023 3:11 am

Memory consumption dram0_0_seg is very high for to buiild zephyr rtos wifi sample

Postby softronica » Wed Apr 26, 2023 3:50 am

Zephyr i a great project, i want implement in our new products.

I am worried about the memory consumption dram0_0_seg for to buiild zephyr wifi sample
only building the wifi sample for esp32,i have tried for differents boards
at esp32s_saola wifi does not run.. <err> esp32_wifi: Failed to start Wi-Fi scanning[0m

Any guide fot to help to solve?

***

west build -b esp32s2_saola samples/net/wifi

[404/404] Linking C executable zephyr\zephyr.elf
Memory region Used Size Region Size %age Used
mcuboot_hdr: 32 B 32 B 100.00%
metadata: 28 B 32 B 87.50%
ROM: 480250 B 4194240 B 11.45%
iram0_0_seg: 80188 B 184 KB 42.56%
irom0_0_seg: 391946 B 4194272 B 9.34%
dram0_0_seg: 183980 B 184 KB 97.65%
drom0_0_seg: 101088 B 4194240 B 2.41%
rtc_iram_seg: 0 GB 8 KB 0.00%
rtc_slow_seg: 0 GB 8 KB 0.00%
IDT_LIST: 0 GB 8 KB 0.00%

***
west build -b esp32c3_devkitm samples/net/wifi --pristine

[401/401] Linking C executable zephyr\zephyr.elf
Memory region Used Size Region Size %age Used
mcuboot_hdr: 32 B 32 B 100.00%
metadata: 28 B 32 B 87.50%
ROM: 411332 B 4194240 B 9.81%
iram0_0_seg: 80960 B 320 KB 24.71%
irom0_0_seg: 331860 B 4194272 B 7.91%
drom0_0_seg: 57500 B 4194240 B 1.37%
dram0_0_seg: 247676 B 320 KB 75.58%
rtc_iram_seg: 0 GB 8 KB 0.00%
IDT_LIST: 0 GB 8 KB 0.00%
***

softronica
Posts: 2
Joined: Wed Apr 26, 2023 3:11 am

Re: Memory consumption dram0_0_seg is very high for to buiild zephyr rtos wifi sample

Postby softronica » Wed Apr 26, 2023 1:49 pm

At try to build C:\pyenv\zp\zephyr> west build -b esp32s2_saola samples/net/wifi

Obtain the rror:

C:/pyenv/zp/modules/hal/espressif/components/esp_phy/src/phy_init.c:300:27: error: 'SYSCON_WIFI_RST_EN_REG' undeclared (first use in this function)
300 | SET_PERI_REG_MASK(SYSCON_WIFI_RST_EN_REG, SYSTEM_BB_RST | SYSTEM_FE_RST);

i tried to solve doing :

At fle \components\esp_phy\src\phy_init.c add at line 45 :
#include "soc/syscon_reg.h"

At file components\soc\esp32s2\include\soc\syscon_reg.h add line :
#define SYSTEM_FE_RST (BIT(1))

Now i can build, the wifi sample, but im worried about the dram0_0_seg filled, 97.65%

[404/404] Linking C executable zephyr\zephyr.elf
Memory region Used Size Region Size %age Used
mcuboot_hdr: 32 B 32 B 100.00%
metadata: 28 B 32 B 87.50%
ROM: 480250 B 4194240 B 11.45%
iram0_0_seg: 80188 B 184 KB 42.56%
irom0_0_seg: 391946 B 4194272 B 9.34%
dram0_0_seg: 183980 B 184 KB 97.65%
drom0_0_seg: 101088 B 4194240 B 2.41%
rtc_iram_seg: 0 GB 8 KB 0.00%
rtc_slow_seg: 0 GB 8 KB 0.00%
IDT_LIST: 0 GB 8 KB 0.00%

At monitor receive [1;32muart:~$ [m[8D[J[00:00:00.331,000] [1;31m esp32_wifi: Failed to start Wi-Fi driver[0m too .

Any guide to solve, the filled memory is a big issue, this can be lower? , i like so much Zephyr, if i can collaborate i will do.

I want to obtain guldelines to show that it's possible to decrease the memory consumption using wifi and http ...

Who is online

Users browsing this forum: No registered users and 92 guests