kindzhon 发表于 2017-3-27 10:24:43

ESP8266最简单的编译环境搭建和机智云SOC代码导入

ESP8266官方编译环境的搭建不是要用linux就是虚拟机,对于刚学习编程的孩子来说就是个噩梦,所以初学者转向了Arduino。
但象机智云之类的很多物联网开发社区,能找到的源码又是必须用官方环境编译固件,让人头痛。

我后来找到一个最简单的方法,就是用安信可的IDE开发工具Esp8266IDE,它只是个压缩包,解压后在windows下就能直接用了,完全不需要linux和虚拟机。它把make指令等都集成在eclipse上,直接通过build project就可以编译出bin文件,当然,安信可的工具集里面是有包括烧录工具的,所以不须另外下载。将sdk导入安信可IDE,点导入工程,浏览到一个要编译的工程,编译器选 Cygwin,就可以完成编译成bin文件了。

具体教程请参看这里 http://blog.csdn.net/jackhuang2015/article/details/50850204

但问题来了,导入机智云等源代码,编译并不能通过,生成不了bin固件。解决问题的方法也很简单,看下图,

**** Hidden Message *****



你已经可以轻松享受8266的编译了。
用一个多小时,不用谢哈!

Rui 发表于 2017-4-13 16:58:52

请问,烧写哪些固件?是按照链接的教程烧写0x00000和0x40000这两个人固件吗

雁飞残月天 发表于 2018-6-30 09:19:07

请问,我在机智云上下载了soc方案生成的代码但是使用AiThinker_IDE 编译时一直报错是什么原因?求大神帮忙!09:13:28 *** Build of configuration Default for project SoC_ESP8266_8M_source *** make allmake: Entering directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app' make: Entering directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/user' DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils user_main.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils user_json.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/user_json.o -c user_json.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/user_main.o -c user_main.c xt-ar ru .output/eagle/debug/lib/libuser.a .output/eagle/debug/obj/user_json.o .output/eagle/debug/obj/user_main.oxt-ar: creating .output/eagle/debug/lib/libuser.a make: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/user' make: Entering directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/driver' DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils hw_timer.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils uart.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils gpio16.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils spi.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils key.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils i2c_master.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils spi_overlap.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils hal_key.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/hal_key.o -c hal_key.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/spi_overlap.o -c spi_overlap.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/i2c_master.o -c i2c_master.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/key.o -c key.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/spi.o -c spi.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/gpio16.o -c gpio16.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/uart.o -c uart.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/hw_timer.o -c hw_timer.c xt-ar ru .output/eagle/debug/lib/libdriver.a .output/eagle/debug/obj/hal_key.o .output/eagle/debug/obj/spi_overlap.o .output/eagle/debug/obj/i2c_master.o .output/eagle/debug/obj/key.o .output/eagle/debug/obj/spi.o .output/eagle/debug/obj/gpio16.o .output/eagle/debug/obj/uart.o .output/eagle/debug/obj/hw_timer.oxt-ar: creating .output/eagle/debug/lib/libdriver.a make: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/driver' make: Entering directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/Gizwits' DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils gizwits_product.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils gizwits_protocol.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/gizwits_protocol.o -c gizwits_protocol.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/gizwits_product.o -c gizwits_product.c xt-ar ru .output/eagle/debug/lib/libGizwits.a .output/eagle/debug/obj/gizwits_protocol.o .output/eagle/debug/obj/gizwits_product.oxt-ar: creating .output/eagle/debug/lib/libGizwits.a make: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/Gizwits' make: Entering directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/Utils' DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils dataPointTools.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils common.c DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils ringbuffer.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/ringbuffer.o -c ringbuffer.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/common.o -c common.c xt-xcc -Os -g -Wpointer-arith -Wundef -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections   -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include-I ../../include -I ../../include/eagle -I ../..//app/gagent/inc -I ../..//app/Gizwits -I ../..//app/Utils-o .output/eagle/debug/obj/dataPointTools.o -c dataPointTools.c xt-ar ru .output/eagle/debug/lib/libUtils.a .output/eagle/debug/obj/ringbuffer.o .output/eagle/debug/obj/common.o .output/eagle/debug/obj/dataPointTools.oxt-ar: creating .output/eagle/debug/lib/libUtils.a make: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/Utils' xt-xcc-L../lib -nostdlib -T../ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lmain -ljson -lupgrade -lssl -lpwm -lcrypto -lsmartconfig -lairkiss -lgagent user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a Gizwits/.output/eagle/debug/lib/libGizwits.a Utils/.output/eagle/debug/lib/libUtils.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out/opt/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg' collect2: error: ld returned 1 exit status make: ** [../Makefile:363: .output/eagle/debug/image/eagle.app.v6.out] Error 1 make: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app' make: ** Error 2

DCLED 发表于 2017-7-31 15:49:43

本帖最后由 DCLED 于 2017-7-31 22:27 编辑

請問下~~我使用的是ESP8266 01S
想做出一個SOC方案,如帖子所述操作,利用機智雲自動生成代碼,

再使用 AiThinkerIDE_V0.5進行編譯



也都得到下列文件
3.烧录固件
esp_init_data_default.bin          0x3fc000
blank.bin                        0x3fe000
boot_v1.6.bin                      0x00000
user1.4096.new.6.bin               0x01000

並按照檔案中的 readme位置燒寫
其中 燒寫設定如下:官網確定ESP8266 01S 為8Mbit

但是為何編譯完成後,串口一直出現打印訊息??? ((藍燈恆亮))
無法理解哪個環節有誤 ??
還請大神們 指教如何操作?
還有一個疑問 ??
為何第一次編譯後 總是出現下列兩個文件
eagle.flash.bin
eagle.irom0text.bin




但是關掉後,再導入一次程序 ,第二次編輯 又可以出現需要的文件




我是MR汪 发表于 2017-3-27 10:29:34

刷记录的么?

郭庆帅 发表于 2017-3-27 10:30:03

现在我也BOOT?=new
APP?=1
SPI_SPEED?=40
SPI_MODE?=QIO
SPI_SIZE_MAP?=4搞不明白 为什么要改

叶丶渐落 发表于 2017-3-27 11:10:00

很好 xiangkankan

bigfanofloT 发表于 2017-3-27 12:28:16

本帖最后由 bigfanofloT 于 2017-4-9 19:49 编辑

感谢您的分享,不错,不过,这一行应改为
[*]SPI_SIZE_MAP?=6

linhui 发表于 2017-3-27 13:43:57

看上去还不错

lyt 发表于 2017-3-27 19:25:01

谢谢分享~~~~~~~~~~~

MCU记忆 发表于 2017-3-27 21:40:08

我都找到了,

新人2017 发表于 2017-3-27 22:38:31

可以吗,感觉不行啊

rookie 发表于 2017-3-28 09:45:31

ESP8266最简单的编译环境搭建和机智云SOC代码导入

zyk 发表于 2017-3-28 14:57:22

谢谢分享!

ww2ee 发表于 2017-3-28 16:25:09

haoren 好人

鸿鹄与燕雀 发表于 2017-3-28 19:41:19

支持~优秀作品~

老汤猫 发表于 2017-3-28 19:54:05

看看看看看看

qvbhusrh 发表于 2017-3-28 19:54:25

学习谢谢,,

bboy格宇 发表于 2017-3-29 09:30:47

感谢您的分享,不错。。。。。。。。。。。。。。。。。。。

clide2000 发表于 2017-3-29 15:31:49

新手学习,感谢分享!

ckd 发表于 2017-3-29 15:51:49

学习学习

jizhi 发表于 2017-3-29 16:32:44

回复,求图

康颖 发表于 2017-3-29 19:23:29

以前也是直接用官方IDE很麻烦
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: ESP8266最简单的编译环境搭建和机智云SOC代码导入