close

 

Downloading the Virtual Machine
   
Download ESP8266_lubuntu_20141021.ova
         
from: http://downloads.espressif.com/FB/ESP8266_GCC.zip

     解開 ESP8266_GCC_LUBUNTU.ZIP 且參考ESP8266_GCC_LUBUNTU.docx  
 
   內有安裝步驟及程序 

Download the ESP8266 RTOS SDK

    Download  ESP8266_RTOS_SDK_V1.5.0.7z   from
         
http://domoticx.com/esp8266-wifi-software-software-development-kit-espressif/

Extract the RTOS SDK  (參考http://iot-bits.com/articles/building-examples-in-esp8266-rtos-sdk/)

 

Compile an example project

  • cd /home/esp8266/Share/ESP8266_RTOS_SDK_V1.5.0/example/project_template
  • vi  gen_misc.sh     
  • 編輯SDK_PATH=/home/esp8266/Share/ESP8266_RTOS_SDK_V1.5.0
  • 編輯BIN_PATH=/home/esp8266/Share/ESP8266_RTOS_SDK_V1.5.0/BIN_dir
  • chmod +x gen_misc.sh &  ./gen_misc.sh   
  • 執行完後 BIN_dir 包含 BIN files

Flashing to ESP8266 chip TEST

 

#--------------------

補充說明:

BIN generation parameters

  • STEP 1: use boot_v1.2+ by default
    boot mode: new
    This boot file is forced by default in the RTOS SDK. Users cannot opt for another version of boot.bin
     
  • STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
    enter (0/1/2, default 0):
    Choose option 0 if your firmware does not use FOTA feature (updates over Wi-Fi). Use options 1/2 for firmware with FOTA enabled.
     
  • STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)
    enter (0/1/2/3, default 2):

    Use the appropriate SPI flash chip access speed that suits your flash memory. It is recommended to use 40MHz or lower for best compatibility.
     
  • STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)
    enter (0/1/2/3, default 0):

    Type of flash chip and how it is connected to the ESP8266. This would be QIO for standard modules like the ESP-01 or ESP-12 series.
     
  • STEP 5: choose spi size and map
        0= 512KB( 256KB+ 256KB)
        2=1024KB( 512KB+ 512KB)
        3=2048KB( 512KB+ 512KB)
        4=4096KB( 512KB+ 512KB)
        5=2048KB(1024KB+1024KB)
        6=4096KB(1024KB+1024KB)
    enter (0/2/3/4/5/6, default 0):

    This is relevant only for FOTA firmware that uses user1.bin and user2.bin.

As an example, a set of working configurations for the ESP-12E or ESP-12F module would be as follows for non-FOTA applications:
Step 1: new
Step 2: option 0
Step 3: option 2
Step 4: option 0
Step 5: option 4

#---------------------------------------------

project_template File structure

The template creates four files/directories:

  • user/main.c main source file with program entry point. Start writing your code here
  • user/user_config.h user defined configuration header, empty by default. SDK header files rely on the existence of this file, so don't delete it even if you don't use it
  • driver/ empty directory to place code for drivers. Mainly to separate external components' driver code from the main code, can be deleted if not used.
  • Makefile putting it all neatly together. Again, this was copied from an example project and I don't take credit for it.

參考資料; 

http://iot-bits.com/articles/building-examples-in-esp8266-rtos-sdk/
https://jcard0na.wordpress.com/2015/11/24/esp8266-hello-world-with-native-sdk/
http://domoticx.com/esp8266-wifi-software-software-development-kit-espressif/
http://www.nefastor.com/esp8266-freertos-introduction/
http://swutai.blogspot.tw/2014/08/rtos_15.html

 

arrow
arrow

    stanley 發表在 痞客邦 留言(0) 人氣()