使用 docker 以及修改后的 esp8266 nonos sdk 快速建立开发环境

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

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:
docker pull neucrack/esp-build
or
docker pull daocloud.io/neucrack/esp-build
  • plug in you device(eg:node mcu)
  • create a container
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

docker start esp8266-builder
docker attach esp8266-builder

4. build project and download to board

run in container

cd /build/esp8266-nonos-sdk
make flash

build options:

make           : compile project
make flash     : compile and upload code to flash of board
make erase     : erase all data in flash
make monitor   : serial monitor tool
make clean     : clean binary files
make distclean : clean binary files and folders
make help      : help info

parameters:

(1) ESPPORT
    Default:/dev/ttyUSB0
(2) DOWNLOADBAUD
    Default:1500000
(3) COMPILE
    Possible value: gcc
    Default value: gcc
    If set null, will use xt-xcc.
(4) BOOT
    Possible value: none/old/new
      none: no need boot
      old: use boot_v1.1
      new: use boot_v1.2+
    Default value: new
(5) APP
    Possible value: 0/1/2
      0: original mode, generate eagle.app.v6.flash.bin and eagle.app.v6.irom0text.bin
      1: generate user1
      2: generate user2
    Default value: 1
(6) SPI_SPEED
    Possible value: 20/26.7/40/80
    Default value: 40
(7) SPI_MODE
    Possible value: QIO/QOUT/DIO/DOUT
    Default value: DIO
(8) SPI_SIZE_MAP
    Possible value: 0/2/3/4/5/6
    Default value: 2
For example:
    make COMPILE=gcc BOOT=new APP=1 SPI_SPEED=40 SPI_MODE=DIO SPI_SIZE_MAP=2
You can also use gen_misc to make and generate specific bin you needed.
    Linux: ./gen_misc.sh
    Windows: gen_misc.bat
    Follow the tips and steps by steps.

5. monitor serial output

use serial monitor:</br>

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

exit minicom:</br>
<kbd>ctrl+A</kbd> -> <kbd>X</kbd> -> <kbd>Enter</kbd></br>
or use screen

screen /dev/ttyUSB0 115200

exit screen:</br>
<kbd>ctrl+A</kbd> -> <kbd>K</kbd> -> <kbd>Y</kbd></br>

  • when docker,use:
make monitor

(pay attenrion, RTS and DTR are locked, so push reset button will not functional, use <kbd>ctrl+T</kbd>-><kbd>ctrl+H</kbd> to see help)

  • when windows,use serial monitor with GUI,such as UartAssist.exe

directories description

src           source code
|---driver    driver source code
|---include   include files
|---user      user main

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,073评论 19 139
  • 这位爸爸,是一位世界冠军,却退出摔跤界,他没能为自己的国家获得金牌,他想让自己的儿子代他获得金牌,他想要一...
    塞飞夜阅读 2,299评论 0 3
  • 文/李啊ii 以前我也见过紫薇花,但那时我却是只见其花,却不知其名,首次见它只觉得在普通不过了。 第二次再见紫薇...
    李啊ii阅读 3,173评论 1 7
  • 当初的我们是那么的单纯可爱,理想是那么的美好,我们都在快乐的阳光普照下生活,多好啊!这美好的生活怎么来的呢?值得我...
    文艺不是装出来滴阅读 1,310评论 0 0
  • 春光好——张抡 烟淡淡,雨蒙蒙,水溶溶。贴水落花飞不起, 小桥东。 翩翩怨蝶愁蜂。绕芳丛,恋余红。不恨无情桥下水,...
    胖乎乎先生阅读 2,939评论 0 10

友情链接更多精彩内容