收藏官网首页
查看: 435255|回复: 836

[经验分享] ESP8266最简单的编译环境搭建和机智云SOC代码导入

 

8

主题

35

帖子

505

积分

高级会员

Rank: 4

积分
505
发表于 2017-3-27 10:24:43 | 显示全部楼层 |阅读模式
校园创客福利
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固件。解决问题的方法也很简单,看下图,

游客,如果您要查看本帖隐藏内容请回复




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

本帖被以下淘专辑推荐:

4

主题

19

帖子

199

积分

注册会员

Rank: 2

积分
199
发表于 2017-4-13 16:58:52 | 显示全部楼层
请问,烧写哪些固件?是按照链接的教程烧写0x00000和0x40000这两个人固件吗

点评

同问,编译出来的几个bin文件分别对应什么地址烧录,这些文件跟官方教程不一样啊  详情 回复 发表于 2017-5-12 09:20

0

主题

2

帖子

17

积分

新手上路

Rank: 1

积分
17
发表于 2018-6-30 09:19:07 | 显示全部楼层
请问,我在机智云上下载了soc方案生成的代码但是使用AiThinker_IDE 编译时一直报错是什么原因?求大神帮忙!09:13:28 *** Build of configuration Default for project SoC_ESP8266_8M_source *** make all  make[1]: Entering directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app' make[2]: 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.o  xt-ar: creating .output/eagle/debug/lib/libuser.a make[2]: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/user' make[2]: 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.o  xt-ar: creating .output/eagle/debug/lib/libdriver.a make[2]: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/driver' make[2]: 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.o  xt-ar: creating .output/eagle/debug/lib/libGizwits.a make[2]: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app/Gizwits' make[2]: 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.o  xt-ar: creating .output/eagle/debug/lib/libUtils.a make[2]: 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[1]: ** [../Makefile:363: .output/eagle/debug/image/eagle.app.v6.out] Error 1 make[1]: Leaving directory '/cygdrive/c/Users/chenh/Desktop/a/SoC_ESP8266_8M_source/app' make: ** [Makefile:307: .subdirs] Error 2

1

主题

27

帖子

396

积分

中级会员

Rank: 3Rank: 3

积分
396
发表于 2017-7-31 15:49:43 | 显示全部楼层
本帖最后由 DCLED 于 2017-7-31 22:27 编辑

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

再使用 AiThinkerIDE_V0.5進行編譯
2.png


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




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




4.png
5.png

点评

FLASH SIZE 选择最后一个  详情 回复 发表于 2018-5-13 18:57

0

主题

4

帖子

32

积分

新手上路

Rank: 1

积分
32
发表于 2017-3-27 10:29:34 | 显示全部楼层
免费使用STM32、APP自动代码生成工具
刷记录的么?

36

主题

308

帖子

70

积分

注册会员

Rank: 2

积分
70
发表于 2017-3-27 10:30:03 | 显示全部楼层
现在我也BOOT?=new
APP?=1
SPI_SPEED?=40
SPI_MODE?=QIO
SPI_SIZE_MAP?=4搞不明白 为什么要改
G3机智云物联网云服务 287087942
有什么疑问,可以在论坛,qq群(优先在论坛哦,避免重复造轮子)
在论坛提问的回答率是100%!!!!!!!!
希望和大家一起交流学习.

0

主题

2

帖子

22

积分

新手上路

Rank: 1

积分
22
发表于 2017-3-27 11:10:00 | 显示全部楼层
很好 xiangkankan  

321

主题

1054

帖子

4501

积分

论坛元老

Rank: 8Rank: 8

积分
4501
QQ
发表于 2017-3-27 12:28:16 | 显示全部楼层
本帖最后由 bigfanofloT 于 2017-4-9 19:49 编辑

感谢您的分享,不错,不过,这一行应改为
  • SPI_SIZE_MAP?=6
1、机智云QQ群:G1群:104975951 G2群:491509598 G3群:287087942
机智云爱好者-APP开发群: 599735135
QQ群目前非常活跃,欢迎大家参与进来,交流,讨论,答疑,解惑~~
2、机智云微信公众号: 机智云 gizwits、 机智云智能宠物屋go-iot
关注机智云Gizwits官方公众号随时掌握最新资讯和活动信息

0

主题

1

帖子

5

积分

新手上路

Rank: 1

积分
5
发表于 2017-3-27 13:43:57 | 显示全部楼层
看上去还不错

1

主题

30

帖子

374

积分

中级会员

Rank: 3Rank: 3

积分
374
发表于 2017-3-27 21:40:08 | 显示全部楼层
我都找到了,

0

主题

2

帖子

58

积分

注册会员

Rank: 2

积分
58
发表于 2017-3-27 22:38:31 | 显示全部楼层
可以吗,感觉不行啊

0

主题

1

帖子

21

积分

新手上路

Rank: 1

积分
21
发表于 2017-3-28 09:45:31 | 显示全部楼层
ESP8266最简单的编译环境搭建和机智云SOC代码导入

0

主题

2

帖子

58

积分

注册会员

Rank: 2

积分
58
发表于 2017-3-28 16:25:09 | 显示全部楼层
教您5分钟接入机智云,实现傻瓜式开发
haoren 好人

36

主题

105

帖子

1086

积分

金牌会员

Rank: 6Rank: 6

积分
1086
发表于 2017-3-28 19:41:19 | 显示全部楼层
支持~  优秀作品~
精通C、C++、Java、C#、VB、HTML、Delphi、JavaScript、PHP等语言的拼写,熟练PhotoShop、Illustrator CS、CorelDraw、Flash CS、AutoCAD、Office等软件的卸载,掌握Windows Server、Unix、Lunix等系统的开关机

1

主题

31

帖子

423

积分

中级会员

Rank: 3Rank: 3

积分
423
发表于 2017-3-28 19:54:05 | 显示全部楼层
看看看看看看

14

主题

105

帖子

846

积分

高级会员

Rank: 4

积分
846
发表于 2017-3-29 09:30:47 | 显示全部楼层
感谢您的分享,不错。。。。。。。。。。。。。。。。。。。

27

主题

89

帖子

742

积分

高级会员

Rank: 4

积分
742
发表于 2017-3-29 15:31:49 | 显示全部楼层
注册成为机智云开发者,手机加虚拟设备快速开发
新手学习,感谢分享!

0

主题

4

帖子

431

积分

中级会员

Rank: 3Rank: 3

积分
431
发表于 2017-3-29 19:23:29 | 显示全部楼层
以前也是直接用官方IDE很麻烦
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

加入Q群 返回顶部

版权与免责声明 © 2006-2024 Gizwits IoT Technology Co., Ltd. ( 粤ICP备11090211号 )

快速回复 返回顶部 返回列表