选中内容(绿色)时除了会搜索文章名,还会搜索文章内容
点击结果中的文章名进入文章界面后可以按Ctrl+F在页面内搜索
  • 版权:CC BY-SA 4.0
  • 创建:2019-10-13
  • 更新:2019-10-19
搭建 8266 的 docker 编译环境


Feature

  • based on espressif nonos sdk v2.0
  • integrate esptool and set default download baudrate as 1500000
  • driver and project can be built directly at you first get this project

How To Use

1. clone esp8266-nonos-sdk(optimized) project

  1. git clone https://github.com/Neutree/esp8266-nonos-sdk.git

2. install docker

3. create container(set up compile environment and download tool etc.)

  • pull docker image:
    1. docker pull neucrack/esp-build
    2. or
    3. docker pull daocloud.io/neucrack/esp-build
  • plug in you device(eg:node mcu)
  • create a container
    1. docker run -ti --name esp8266-builder --device /dev/ttyUSB0:/dev/ttyUSB0 -v dir:/build neucrack/esp-build /bin/bash

    the dir is the direction of esp8266-nonos-sdk project
    when pull and run completed, the next time you want use this container by

    1. docker start esp8266-builder
    2. docker attach esp8266-builder

4. build project and download to board

run in container

  1. cd /build/esp8266-nonos-sdk
  2. make flash

build options:

  1. make : compile project
  2. make flash : compile and upload code to flash of board
  3. make erase : erase all data in flash
  4. make monitor : serial monitor tool
  5. make clean : clean binary files
  6. make distclean : clean binary files and folders
  7. make help : help info

parameters:

  1. (1) ESPPORT
  2. Default:/dev/ttyUSB0
  3. (2) DOWNLOADBAUD
  4. Default:1500000
  5. (3) COMPILE
  6. Possible value: gcc
  7. Default value: gcc
  8. If set null, will use xt-xcc.
  9. (4) BOOT
  10. Possible value: none/old/new
  11. none: no need boot
  12. old: use boot_v1.1
  13. new: use boot_v1.2+
  14. Default value: new
  15. (5) APP
  16. Possible value: 0/1/2
  17. 0: original mode, generate eagle.app.v6.flash.bin and eagle.app.v6.irom0text.bin
  18. 1: generate user1
  19. 2: generate user2
  20. Default value: 1
  21. (6) SPI_SPEED
  22. Possible value: 20/26.7/40/80
  23. Default value: 40
  24. (7) SPI_MODE
  25. Possible value: QIO/QOUT/DIO/DOUT
  26. Default value: DIO
  27. (8) SPI_SIZE_MAP
  28. Possible value: 0/2/3/4/5/6
  29. Default value: 2
  30. For example:
  31. make COMPILE=gcc BOOT=new APP=1 SPI_SPEED=40 SPI_MODE=DIO SPI_SIZE_MAP=2
  32. You can also use gen_misc to make and generate specific bin you needed.
  33. Linux: ./gen_misc.sh
  34. Windows: gen_misc.bat
  35. Follow the tips and steps by steps.

5. monitor serial output

use serial monitor:

  • when linux ,use minicom or screen
    use minicom
    1. sudo apt install minicom
    2. sudo minicom -s (setting /deb/ttyUSB0 115200 8n1)
    3. sudo minicom -c on
    exit minicom:

    ctrl+A -> X -> Enter

    or use screen
    1. screen /dev/ttyUSB0 115200
    exit screen:

    ctrl+A -> K -> Y
  • when docker,use:
    1. make monitor
    (pay attenrion, RTS and DTR are locked, so push reset button will not functional, use ctrl+T->ctrl+H to see help)
  • when windows,use serial monitor with GUI,such as UartAssist.exe

directories description

  1. src source code
  2. |---driver driver source code
  3. |---include include files
  4. |---user user main

you can copy example from exampleto src,or delete example to make project clean~~

文章有误?有想法想讨论?查看或者发起勘误/讨论 主题
(发起评论需要先登录 github)

/wallpaper/wallhaven-737jo3.jpg