espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
616 stars 143 forks source link

Unable to compile NG firmware for esp32s3 #232

Open sergey-suloev opened 1 year ago

sergey-suloev commented 1 year ago

I can't build firmware for ESP32S3.

/home/sergey/Projects2/esp/esp-hosted/esp_hosted_ng/esp/esp_driver/network_adapter/main/spi_slave_api.c: In function 'queue_next_transaction': /home/sergey/Projects2/esp/esp-hosted/esp_hosted_ng/esp/esp_driver/network_adapter/main/spi_slave_api.c:401:30: error: 'ESP_SPI_CONTROLLER' undeclared (first use in this function) ret = spi_slave_queue_trans(ESP_SPI_CONTROLLER, spi_trans, portMAX_DELAY);

Could you upgrade source code accordingly, please ?

sergey-suloev commented 1 year ago

OMG I just noticed that ESP32 S3 is not supported yet... May I ask you when I can expect this update ? As far as I can see there is only a small group of C-definitions is needed for ESP32 S3 to be able to compile the code. I am not sure if that should be enough to make it work.

mantriyogesh commented 1 year ago

Yes, That should be it. But other chipsets will be added in some time.

sergey-suloev commented 1 year ago

Yes, That should be it. But other chipsets will be added in some time.

So, in case if I add definitions for S3 the host driver itself should work ?

I am going to try this

#elif defined CONFIG_IDF_TARGET_ESP32S3

    #define ESP_SPI_CONTROLLER     2
    #define GPIO_MOSI              11
    #define GPIO_MISO              13
    #define GPIO_SCLK              12
    #define GPIO_CS                10
    #define DMA_CHAN               SPI_DMA_CH_AUTO
mantriyogesh commented 1 year ago

Untill ng code is not added, you can use FG is reference to add.

sergey-suloev commented 1 year ago

Untill ng code is not added, you can use FG is reference to add.

ok, thanks

I am not sure why you used

define ESP_SPI_CONTROLLER 1

According to datasheet SPI1 is used by some internal peripheral

sergey-suloev commented 1 year ago

Not working out of box


Received ESP bootup event [ 9.221501] EVENT: 3 [ 9.223731] EVENT: 2 [ 9.225953] EVENT: 0 [ 9.228153] EVENT: 4 [ 9.230373] EVENT: 1 [ 9.232568] esp32: process_fw_data ESP chipset's last reset cause: [ 9.232578] POWERON_RESET [ 9.241501] esp32: ESP Firmware version: 1.0.2 [ 9.245996] ESP chipset detected [esp32-s3] [ 10.622832] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 14.557969] esp32: Command[3] timed out [ 14.561847] esp32: wait_and_decode_cmd_resp(priv, cmd_node) failure, ret: -22 [ 14.569057] esp32: add_network_iface() failure, ret: -1 [ 14.569508] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 14.574355] network iterface init failed [ 14.584640] ESP peripheral capabilities: 0xe8 [ 14.626603] dwmac-sun8i 1c30000.ethernet eth0: Too many address, switching to promiscuous [ 14.793971] ESP Bluetooth init [ 14.797601] Capabilities: 0xe8. Features supported are: [ 14.802926] WLAN on SPI [ 14.805764] BT/BLE [ 14.808168] - HCI over SPI [ 14.811269] - BLE only [ 14.818185] process_rx_packet: empty priv [ 16.893987] Bluetooth: hci0: command 0x1001 tx timeout [ 16.893989] Bluetooth: hci0: Opcode 0x1001 failed: -110

mantriyogesh commented 1 year ago

I can see the first event is received. Can you send ESP and Host logs?

Can you perform raw throughput test to test transport? I am suspecting something wrong at transport level like timing etc mismatch in between host and ESP

kapilkedawat commented 8 months ago

ESP32S3 support will be available for hosted-ng in some days. We can close this issue then. @Shreyas0-7

mantriyogesh commented 6 months ago

Can close this now?