请选择 进入手机版 | 继续访问电脑版
论坛
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 1104|回复: 5

求助:一体化开发环境编译错误,不懂makefile。愁死了

[复制链接]

1

主题

5

帖子

30

积分

新手上路

Rank: 1

积分
30
发表于 2018-11-9 10:05:11 | 显示全部楼层 |阅读模式
按照教程 http://wiki.ai-thinker.com/ai_ide_use 做的第一个工程编译错误如下:
make[2]: *** [../../Makefile:345: .output/eagle/debug/obj/user_esp_platform_timer.o] Error 126
make[2]: Leaving directory '/home/aithinker/project/ESP8266_NONOS_SDK-2.2.0/app/user'
make[1]: *** [../Makefile:330: .subdirs] Error 2
make[1]: Leaving directory '/home/aithinker/project/ESP8266_NONOS_SDK-2.2.0/app'
make: *** [Makefile:330: .subdirs] Error 2
自带的matt工程,编译错误如下
CC user/user_main.c
AR .build/esp8266_mqtt_app.a
LD .build/esp8266_mqtt.out
Run objcopy, please wait...
objcopy done
Run gen_appbin.py
/usr/bin/python: /usr/bin/python: 鏃犳硶鎵ц浜岃繘鍒舵枃浠?
make: *** [../common_nonos.mk:239锛?.build/esp8266_mqtt.out] 閿欒 126
回复

使用道具 举报

1

主题

5

帖子

30

积分

新手上路

Rank: 1

积分
30
 楼主| 发表于 2018-11-9 10:09:52 | 显示全部楼层
完整错误
make all
make[1]: Entering directory '/home/aithinker/project/ESP8266_NONOS_SDK-2.2.0/app'
make[2]: Entering directory '/home/aithinker/project/ESP8266_NONOS_SDK-2.2.0/app/user'
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_sensor.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_light.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_esp_platform.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_devicefind.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_plug.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_main.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_json.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_light_adj.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_webserver.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
DEPEND: xt-xcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_esp_platform_timer.c
/bin/sh: line 1: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file: Exec format error
xt-xcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include  -o .output/eagle/debug/obj/user_esp_platform_timer.o -c user_esp_platform_timer.c
/opt/xtensa-lx106-elf/bin/xt-xcc: /opt/xtensa-lx106-elf/bin/xt-xcc: cannot execute binary file
make[2]: *** [../../Makefile:345: .output/eagle/debug/obj/user_esp_platform_timer.o] Error 126
make[2]: Leaving directory '/home/aithinker/project/ESP8266_NONOS_SDK-2.2.0/app/user'
make[1]: *** [../Makefile:330: .subdirs] Error 2
make[1]: Leaving directory '/home/aithinker/project/ESP8266_NONOS_SDK-2.2.0/app'
make: *** [Makefile:330: .subdirs] Error 2
回复

使用道具 举报

1

主题

5

帖子

30

积分

新手上路

Rank: 1

积分
30
 楼主| 发表于 2018-11-9 10:43:54 | 显示全部楼层
解决了,开发环境是几个月前装的, 不知道是路径有变化还是新的SDK模板有变化,出现了问题。
重新把开发环境折腾了一遍就好了。
回复

使用道具 举报

1

主题

5

帖子

30

积分

新手上路

Rank: 1

积分
30
 楼主| 发表于 2018-11-9 17:08:30 | 显示全部楼层
问题又来了,esp8266_nonos_sdk-2.2.0.zip 这个工程下载进去后 乱码输出。
想去掉多余代码, 自己写个hello word 也显示不了。
醉了
回复

使用道具 举报

1

主题

5

帖子

30

积分

新手上路

Rank: 1

积分
30
 楼主| 发表于 2018-11-10 12:00:43 | 显示全部楼层
Makefile中的选项要和 下载选项一致 吗?
BOOT?=new
APP?=1
SPI_SPEED?=40
SPI_MODE?=DIO
SPI_SIZE_MAP?=6
下载csdn大牛的例程也不能正确打印输出,调整了各种配置。 唉, 要放弃了?
https://blog.csdn.net/xh870189248/article/details/77985541
回复

使用道具 举报

1

主题

4

帖子

28

积分

新手上路

Rank: 1

积分
28
发表于 2018-11-16 15:34:42 | 显示全部楼层
多读几遍文档吧  我也无能为力  我还在琢磨文档
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|安信可论坛    

GMT+8, 2019-9-23 06:17 , Processed in 0.023433 second(s), 14 queries , Redis On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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