Open claydonkey opened 11 months ago
Hello @claydonkey, the 91650704ae589585778bd07c4ab1b55161062d94 is just pushed with the changes..
https://github.com/espressif/esp-hosted/commit/91650704ae589585778bd07c4ab1b55161062d94#diff-bb7ce95059c113766ecf6c2fbb0c430a7940650b7cba263ba24ebc903a034fefR559-R561 is something you need to see.
Apart from that, in your example, new directory components/esp_wifi_remote
with:
esp_wifi_remote.tgz
would be needed for ESP as host.
You can add this code in your compilation for now anywhere you feel correct for your MCU.
Also, please take a note of #if 0
part in here:
https://github.com/espressif/esp-hosted/blob/feature/esp_as_mcu_host/host/drivers/transport/spi/spi_drv.c#L506-L523
esp_wifi_remote is just concept/wrapper, where you have understanding that you are going to use the Wi-Fi from slave (and not native, as in case of ESP, it is available)
Little stuff to digest, but just let me know, I can further explain or do code changes for you.
The SDIO change is tested fine. please check the port layer changes in above commit.. the test results (SDIO throughput) are also mentioned as part of commit info..
any update?
Thanks @mantriyogesh.
I tried editing the new features branch for the stm32 but I'm finding it a bit overwhelming. I think the bulk of my confusion lies in the wifi area - specifically esp_wifi.h (esp_wifi_types.h + wifi_drv.c). I was working with your patches on the master b4...
Is this patch for the patched version or the features branch? I assume the features branch...
So I came to a grinding halt at wifi_drv.c.
There seemed to be no #include "rpc_api.h"
So are you saying - replace the call to esp_wifi_init with remote_esp_wifi_init_slave in wifi_remote_init.c ?
I see that esp_wifi_init has been replaced with in tgz archive - phew
So I've ditched esp_wifi.h esp_wifi.c wifidrv.c for the remote... files. I'm on Terra Firma now.
Alas, esp_wifi.h still leads to a missing #include "rpc_api.h"
Actually, you seem to mix the two branches together.
Can you do a simple test first, with ESP - ESP on new branch? If no, then I think you can selectively take a change from the new branch. Anyway, this is lesson for us that much work would be needed to streamline portable layer in new branch.
Actually, the required headers and dependency files / modules are directly taken from esp-idf in case of ESP as host. for example esp_wifi.h was a replica in local branch and ESP-IDF. As local copy would be very bad idea, we removed such code, same is for esp_event, esp_netif etc modules/drivers.
Anyway, we would try to get you onboard with older branch if you could reliably go to older commit.
Your advice is heeded. I am confusing myself. I see that all components are now pointing to esp-idf and that makes sense but will need closer examination to implement a new host.... I think I will start from scratch getting the esp as host compiled from the features branch and see where changes will be necessary for the stm32. The problem is that I am not fully versant with the features branch since the (master + patches). If I could patch the 4840528 patched version then I would be good to go but I realise that the differences between this and the features branch have become unmanagable Another problem is that I have no idea how to prepare any IDE/toolchains for esp - my experience with the esp32 only goes back a month or two.
you can actually work on the branch directly (new branch), if you decide to work on feature/esp_as_mcu_host. You would get confused with multiple commits manually maintaining, would not recommend..
If you work on the commits from older transient branch, that is okay. We will try to get you sorted with those commits itself. we anyway have internal repo for that, so should not be problem for us. It's just that we thought of discarding that branch considering feature/esp_as_mcu_host would advance.
I think priority is not choosing which commit/branch to work upon. I think important for you is to get reliable netif working. Let us know which one you stick to.
Another problem is that I have no idea how to prepare any IDE/toolchains for esp - my experience with the esp32 only goes back a month or two.
This should be fairly simple, just follow https://github.com/espressif/esp-idf/tree/release/v5.1 Please note the branch to be used: release/v5.1 Once you have idf.py in your development machine, you can use esp <-- spi or sdio --> esp
It looks like I'll proceed with the features branch. I've managed to get it compile with the stm32 compiler - I hope it's a case of shoeing in the stm32 SDIO HAL which is working nicely for esp-hosted master...
The PC gets an IP in the range of 192.168.2.2-254.
That side of things seems taken card of.
The code seems pretty trivial: