Skip to content

Commit

Permalink
release binaries added
Browse files Browse the repository at this point in the history
Signed-off-by: ajita.chavan <[email protected]>
  • Loading branch information
ajita02 committed Sep 15, 2020
1 parent 7f31c9e commit 7e047e7
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 5 deletions.
9 changes: 8 additions & 1 deletion docs/Linux_based_host/SDIO_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <serial_port> with ESP32's serial port and run following command.
```sh
esptool.py -p <serial_port> -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
```
Expand Down
8 changes: 7 additions & 1 deletion docs/Linux_based_host/SPI_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <serial_port> with ESP32's serial port and run following command.
```sh
esptool.py -p <serial_port> -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
```
Expand Down
8 changes: 7 additions & 1 deletion docs/Linux_based_host/UART_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> <set baudrate> -> Ok` and exit from menuconfig.
For pre built hosted mode firmware is present in `release` tab. To flash it on ESP32 edit <serial_port> with ESP32's serial port and run following command.
```sh
esptool.py -p <serial_port> -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 -> <set baudrate> -> Ok` and exit from menuconfig.
```
$ make menuconfig
```
Expand Down
8 changes: 8 additions & 0 deletions docs/MCU_based_host/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <serial_port> with ESP32's serial port and run following command.
```sh
esptool.py -p <serial_port> -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
Expand Down
5 changes: 5 additions & 0 deletions esp/esp_driver/network_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 8 additions & 2 deletions esp/esp_driver/network_adapter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 3 additions & 0 deletions esp/esp_driver/network_adapter/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
13 changes: 13 additions & 0 deletions esp/esp_driver/network_adapter/main/app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -613,6 +625,7 @@ void app_main()
{
esp_err_t ret;
uint8_t capa = 0;
print_firmware_version();

capa = get_capabilities();

Expand Down

0 comments on commit 7e047e7

Please sign in to comment.