From 7e047e7740fb7efe8eb11e911c34a3a86469e049 Mon Sep 17 00:00:00 2001 From: "ajita.chavan" Date: Mon, 14 Sep 2020 19:04:56 +0530 Subject: [PATCH] release binaries added Signed-off-by: ajita.chavan --- docs/Linux_based_host/SDIO_setup.md | 9 ++++++++- docs/Linux_based_host/SPI_setup.md | 8 +++++++- docs/Linux_based_host/UART_setup.md | 8 +++++++- docs/MCU_based_host/Setup.md | 8 ++++++++ esp/esp_driver/network_adapter/CMakeLists.txt | 5 +++++ esp/esp_driver/network_adapter/Makefile | 10 ++++++++-- esp/esp_driver/network_adapter/main/CMakeLists.txt | 3 +++ esp/esp_driver/network_adapter/main/app_main.c | 13 +++++++++++++ 8 files changed, 59 insertions(+), 5 deletions(-) diff --git a/docs/Linux_based_host/SDIO_setup.md b/docs/Linux_based_host/SDIO_setup.md index 3e76412bec..6c6dd57051 100644 --- a/docs/Linux_based_host/SDIO_setup.md +++ b/docs/Linux_based_host/SDIO_setup.md @@ -31,7 +31,14 @@ Please reboot Raspberry-Pi after changing this file. ### ESP32 Setup -On ESP32 either use pre-provided hosted mode firmware binary or if you have source, compile the app against ESP-IDF 4.0 release. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory and navigate to `Example Configuration -> Transport layer -> SDIO interface -> select` and exit from menuconfig. +For pre built hosted mode firmware is present in `release` tab. To flash it on ESP32 edit with ESP32's serial port and run following command. +```sh +esptool.py -p -b 960000 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition-table_sdio_v0.2.bin 0x1000 bootloader_sdio_v0.2.bin 0x10000 esp_hosted_firmware_sdio_v0.2.bin +``` + +For windows user, you can also program the binaries using ESP Flash Programming Tool. + + Or if you have source, compile the app against ESP-IDF 4.0 release. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory and navigate to `Example Configuration -> Transport layer -> SDIO interface -> select` and exit from menuconfig. ``` $ make menuconfig ``` diff --git a/docs/Linux_based_host/SPI_setup.md b/docs/Linux_based_host/SPI_setup.md index a0d81429d0..3f27e825b9 100644 --- a/docs/Linux_based_host/SPI_setup.md +++ b/docs/Linux_based_host/SPI_setup.md @@ -29,7 +29,13 @@ Please reboot Raspberry-Pi after changing this file. ### ESP32 Setup -On ESP32 either use pre-provided hosted mode firmware binary or if you have source, compile the app against ESP-IDF 4.0 release. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory and navigate to `Example Configuration -> Transport layer -> SPI interface -> select` and exit from menuconfig. +For pre built hosted mode firmware is present in `release` tab. To flash it on ESP32 edit with ESP32's serial port and run following command. +```sh +esptool.py -p -b 960000 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition-table_spi_v0.2.bin 0x1000 bootloader_spi_v0.2.bin 0x10000 esp_hosted_firmware_spi_v0.2.bin +``` +For windows user, you can also program the binaries using ESP Flash Programming Tool. + +Or if you have source, compile the app against ESP-IDF 4.0 release. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory and navigate to `Example Configuration -> Transport layer -> SPI interface -> select` and exit from menuconfig. ``` $ make menuconfig ``` diff --git a/docs/Linux_based_host/UART_setup.md b/docs/Linux_based_host/UART_setup.md index 19da24fac4..b26a3ac5dd 100644 --- a/docs/Linux_based_host/UART_setup.md +++ b/docs/Linux_based_host/UART_setup.md @@ -41,7 +41,13 @@ dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=5c2c80d1-02 rootfstype=ext4 elev ### ESP32 Setup -On ESP32 either use pre-provided hosted mode firmware binary or if you have source, compile the app against ESP-IDF 4.0 release. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory navigate to `Component config -> Bluetooth -> Bluetooth controller -> HCI mode -> UART(H4) -> select` also to set baud rate, `Component config -> Bluetooth -> Bluetooth controller -> HCI UART(H4) Options -> UART Baudrate for HCI -> -> Ok` and exit from menuconfig. +For pre built hosted mode firmware is present in `release` tab. To flash it on ESP32 edit with ESP32's serial port and run following command. +```sh +esptool.py -p -b 960000 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition-table_sdio_uart_v0.2.bin 0x1000 bootloader_sdio_uart_v0.2.bin 0x10000 esp_hosted_firmware_sdio_uart_v0.2.bin +``` +For windows user, you can also program the binaries using ESP Flash Programming Tool. + +Or if you have source, compile the app against ESP-IDF 4.0 release. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory navigate to `Component config -> Bluetooth -> Bluetooth controller -> HCI mode -> UART(H4) -> select` also to set baud rate, `Component config -> Bluetooth -> Bluetooth controller -> HCI UART(H4) Options -> UART Baudrate for HCI -> -> Ok` and exit from menuconfig. ``` $ make menuconfig ``` diff --git a/docs/MCU_based_host/Setup.md b/docs/MCU_based_host/Setup.md index bbde05bfa2..7874439ee1 100644 --- a/docs/MCU_based_host/Setup.md +++ b/docs/MCU_based_host/Setup.md @@ -44,6 +44,14 @@ The control path between host and ESP32 is based on `protobuf`. For that `protoc ``` $ git mv components/protocomm/src/common/protocomm_priv.h components/protocomm/include/common/ ``` +For pre built hosted mode firmware is present in `release` tab. To flash it on ESP32 edit with ESP32's serial port and run following command. +```sh +esptool.py -p -b 960000 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition-table_spi_v0.2.bin 0x1000 bootloader_spi_v0.2.bin 0x10000 esp_hosted_firmware_spi_v0.2.bin +``` +For windows user, you can also program the binaries using ESP Flash Programming Tool. + +Or if you have source, follow below procedure. + Currently ESP32 and STM32 communicates over SPI transport. To use `make` build system, run following command in `esp/esp_driver/network_adapter` directory and navigate to `Example Configuration -> Transport layer -> SPI interface -> select` and exit from menuconfig. ``` $ make menuconfig diff --git a/esp/esp_driver/network_adapter/CMakeLists.txt b/esp/esp_driver/network_adapter/CMakeLists.txt index 89207cc381..827b523ee3 100644 --- a/esp/esp_driver/network_adapter/CMakeLists.txt +++ b/esp/esp_driver/network_adapter/CMakeLists.txt @@ -2,5 +2,10 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) +set(PROJECT_VER "0.2") +message(*************************************************************************************) +message(" Building ESP-Hosted Firmware version :: ${PROJECT_VER} ") +message(*************************************************************************************) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(network_adapter) diff --git a/esp/esp_driver/network_adapter/Makefile b/esp/esp_driver/network_adapter/Makefile index 9ede49b34b..4b497027dc 100644 --- a/esp/esp_driver/network_adapter/Makefile +++ b/esp/esp_driver/network_adapter/Makefile @@ -3,7 +3,13 @@ # project subdirectory. # -PROJECT_NAME := network_adapter +PROJECT_VER := 0.2 +$(info *********************************************************************************) +$(info * Building ESP-Hosted firmware version :: $(PROJECT_VER) ) +$(info *********************************************************************************) + +PROJECT_NAME := network_adapter_$(PROJECT_VER) +CPPFLAGS += -DPROJECT_VER=$(PROJECT_VER) + EXTRA_COMPONENT_DIRS := $(realpath ../../../common) include $(IDF_PATH)/make/project.mk - diff --git a/esp/esp_driver/network_adapter/main/CMakeLists.txt b/esp/esp_driver/network_adapter/main/CMakeLists.txt index 9aac1efab8..7557fd21c7 100644 --- a/esp/esp_driver/network_adapter/main/CMakeLists.txt +++ b/esp/esp_driver/network_adapter/main/CMakeLists.txt @@ -7,4 +7,7 @@ else(CONFIG_ESP_SPI_HOST_INTERFACE) list(APPEND COMPONENT_SRCS spi_slave_api.c) endif() + register_component() +set(PROJECT_VER "-DPROJECT_VER=0.2") +target_compile_definitions(${COMPONENT_LIB} PRIVATE ${PROJECT_VER}) diff --git a/esp/esp_driver/network_adapter/main/app_main.c b/esp/esp_driver/network_adapter/main/app_main.c index 4718f7aaa3..b03fd3f06d 100644 --- a/esp/esp_driver/network_adapter/main/app_main.c +++ b/esp/esp_driver/network_adapter/main/app_main.c @@ -99,6 +99,18 @@ static inline int min(int x, int y) { return (x < y) ? x : y; } +static void print_firmware_version() +{ + ESP_LOGI(TAG, "*********************************************************************"); + ESP_LOGI(TAG, " ESP-Hosted Firmware version :: %.1f ", PROJECT_VER); +#if CONFIG_ESP_SPI_HOST_INTERFACE + ESP_LOGI(TAG, " Supported Transport :: SPI "); +#else + ESP_LOGI(TAG, " Supported Transport :: SDIO "); +#endif + ESP_LOGI(TAG, "*********************************************************************"); +} + static uint8_t get_capabilities() { uint8_t cap = 0; @@ -613,6 +625,7 @@ void app_main() { esp_err_t ret; uint8_t capa = 0; + print_firmware_version(); capa = get_capabilities();