Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESP8266 support in EmBitz 1.11
#1
This package adds support ESP8266 in EmBitz 1.11. https://www.dropbox.com/s/n79681zju269cq...tz_1.11.7z

It is necessary to unpack the archive into the folder where it is installed EmBitz 1.11.
With default installation path in x64 Windows
Quote:C:\Program Files (x86)\EmBitz\1.11\
The Windows x86 path
Quote:C:\Program Files\EmBitz\1.11\

After you need to open the file config.script located in the folder
Quote:share\EmBitz\templates\wizard\

In function RegisterWizards()need to add the line
Code:
RegisterWizard(wizProject,     _T("ESP8266"),      _T("ESP8266"),        _T("ESP"));
Now need to run EmBitz and set compiler options. Open the window Tool setting (menu Setting -> Tools). Select compiler ARM GCC Compiler (generic) and in the tab Search directories in the tab Incudes write these paths
Code:
$(TARGET_COMPILER_DIR)\..\xtensa-lx106-elf\include
$(TARGET_COMPILER_DIR)\..\include

   

In the tab Incudes write these paths
Code:
$(TARGET_COMPILER_DIR)\..\xtensa-lx106-elf\lib
$(TARGET_COMPILER_DIR)\..\lib

   

In the tab Toolchain executables set the parameters as in the picture

   

These parameters
Code:
${EMBITZ}\share\esp\gcc_esp\bin

xtensa-lx106-elf-gcc.exe
xtensa-lx106-elf-g++.exe
xtensa-lx106-elf-gcc.exe
xtensa-lx106-elf-gcc.exe
xtensa-lx106-elf-ar.exe
xtensa-lx106-elf-objcopy.exe

Now you need to add the ESP8266 firmware tool.
Open the window User-defined tools (menu Tools -> Configure tools) and add a new tool.
Set the parameters as in the picture.

   

These parameters
Code:
ESP Flasher

${EMBITZ}\share\esp\FlashTool\ESP_HexFlasher_CLI.exe

-f -fw ${PROJECT_DIR}${TARGET_OUTPUT_DIR}${TARGET_OUTPUT_BASENAME}.hex -cf ${PROJECT_DIR}FlashTool.cfg

In the new project window, a new item will appear with the name ESP8266.

   

When creating a project, set the size of the flash memory correctly, otherwise the firmware will not work.

Here is some sample code - blink
Code:
#include "main.h"

#define LED_GPIO 2
#define LED_GPIO_MUX PERIPHS_IO_MUX_GPIO2_U
#define LED_GPIO_FUNC FUNC_GPIO2

void ICACHE_FLASH_ATTR user_init()
{
    uint8_t state=0;

    gpio_init();
    PIN_FUNC_SELECT(LED_GPIO_MUX, LED_GPIO_FUNC);

    while (1)
    {
        GPIO_OUTPUT_SET(LED_GPIO, state);
        system_soft_wdt_feed();
        os_delay_us(500000);
        state ^= 1;
    }
}
Other examples https://www.dropbox.com/s/vjzu2qwplna2m3...xamples.7z
Reply
#2
Excellent work!
I have been using EmBitz for ESP8266 development since 2018, but I only build and link my code to pre-built libraries from ESP8266_RTOS_SDK (IDF Style).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)