zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.49k stars 6.42k forks source link

wifi support for board "arduino_uno_r4_wifi" #77064

Open eltiempopaso opened 1 month ago

eltiempopaso commented 1 month ago

Is your feature request related to a problem? Please describe.

I'd like to know when the wifi functionality is comming for Arduino uno R4.

I have tried to use the ESP_AT modem driver but as soon as I include the CONFIG_NETWORING=y, the firmware does not fit in RAM. Is that the right way to do it?

Is there any alternative where I do not need to set the CONFIG_NETWORKING?

Describe the solution you'd like

I´d like the wifi_esp worked as a ¨proxy¨driver in the R7FA4 to avoid so much memory allocation.

Describe alternatives you've considered

A great alternative would be having another ¨UART¨ based RPC system which allows to communicate using any interface, it would allow having all wifi+server management in the ESP32 and then using the uart from a higher level communication. It would be great as well since the R7FA4 is provided with less RAM memory than the ESP32

Im new in zephyr and perhaps there is a way to do that? I did not find any

Additional context

Here is my stand-alone application. Just in case anyone ones to check my overlay/config files. I could be doing mistakes since I am not familiarized with devicetree. https://github.com/urichess/chessboard

github-actions[bot] commented 1 month ago

Hi @eltiempopaso! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

jukkar commented 1 month ago

This is not really a wifi feature request but a board feature request. According to the maintainer file, the boards/arduino/uno_r4/ is maintained by @soburi / @KhiemNguyenT so reassigning the issue.

About the networking config option, it is needed in order to get any wifi working. You can certainly turn off various networking features to save memory.

eltiempopaso commented 3 weeks ago

The problem is mainly which enabling the wifi in arduino uno r4 means using the whole ram memory and it does not fit in there in fact, it's so small (only 32kb). I have been reviewing how to save memory using the menuconfig but I think there is not much to do there. Perhaps @jukkar you can point me what could I disable there.

jukkar commented 3 weeks ago

32kb is quite small, but it should be possible to tweak networking to fit that, not sure how usable the device is after that. It very much depends on what services you want to use. You should run ram_report to get some ideas what to tweak. See https://docs.zephyrproject.org/latest/develop/optimizations/tools.html for details.

eltiempopaso commented 3 weeks ago

Ok, i'll play with that ram_report tool. Thanks @jukkar. I will probably consider changing board.

However, if I compile a web client example of Arduino IDE it uses 7140bytes of RAM (only 21%) whilst only enabling the zephyr CONFIG_NETWORKING=y uses the whole memory. I feel it should be less consumming since there is the ESP32 which manages the wifi connections.

Well I will play a bit with that tool and see if I get any conclusion.