ESP8266 2.2.x AT固件编译和修改波特率

ESP8266 AT固件编译方法:(4MB固件)

cp -a examples/at ./

cd at

./gen_misc.sh

gen_misc.sh version 20150511

Please follow below steps(1-5) to generate specific bin(s):

STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)

enter(0/1/2, default 2):

1

boot mode: new

STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)

enter (0/1/2, default 0):

1

generate bin: user1.bin

STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)

enter (0/1/2/3, default 2):

2

spi speed: 40 MHz

STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)

enter (0/1/2/3, default 0):

2

spi mode: DIO

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)

    7=4096KB(2048KB+2048KB) not support ,just for compatible with nodeMCU board

    8=8192KB(1024KB+1024KB)

    9=16384KB(1024KB+1024KB)

enter (0/2/3/4/5/6/7/8/9, default 0):

4

spi size: 4096KB

spi ota map:  512KB + 512KB

start...

----------------------------------------------------------------------------------------------------------

ESP8266 AT固件烧录方法:(4MB固件)

cd ../bin

esptool.py --chip esp8266 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0000 boot_v1.7.bin 0x01000 upgrade/user1.4096.new.4.bin 0x3fc000 esp_init_data_default_v08.bin 0x7e000 blank.bin 0x3fe000 blank.bin

ESP8266 AT固件波特率修改方法:

在入口函数添加:

uart_init(BIT_RATE_115200, BIT_RATE_115200);

注意:一定要在 at_init() 后面添加,at_init() 会重新对串口进行初始化

猜你喜欢

转载自blog.csdn.net/fengfeng0328/article/details/90529241