首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Zephyr hello world应用程序ESP32失败

Zephyr hello world应用程序ESP32失败
EN

Stack Overflow用户
提问于 2020-04-05 08:17:06
回答 2查看 1.1K关注 0票数 1

操作系统: Ubuntu 18.04 64位(新安装)

Zephyr版本: 2.2.99

Zephyr SDK版本: 0.11.2

xtensa-elf 32-elf-gcc版本: 5.2.0 --build=x86_64-build_pc-linux-gnu

根据Zephyr和esp的入门指南,我们设置了环境变量。

出口ZEPHYR_TOOLCHAIN_VARIANT=“浓缩” 导出ESPRESSIF_TOOLCHAIN_PATH="/home/swapna/Documents/Workspace/esp/xtensa-esp32-elf“ 导出ZEPHYR_SDK_INSTALL_DIR="/home/swapna/Documents/Workspace/Zephyr_ESP/zephyr-sdk“

我们构建hello_world应用程序:

west build -b esp32 samples/hello_world

84/122建筑ASM对象modules/xtensa/CMakeFiles/modules_xtensa_hal.dir/src/hal/cache_asm.S.obj

失败: modules/xtensa/CMakeFiles/modules_xtensa_hal.dir/src/hal/cache_asm.S.obj

ccache /home/swapna/Documents/Workspace/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DBUILD_VERSION=zephyr-v2.2.0-844-g6c2451c5c0a6 -DKERNEL -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/zephyr/include -Izephyr/include/generated -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/zephyr/soc/xtensa/esp32 -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/zephyr/soc/xtensa/ESP 32/ -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/esp-idf/zephyr/../components/esp32/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/esp-idf/zephyr/../components/soc/esp32/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/xtensa/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/xtensa/zephyr/soc/esp32 -isystem /home/swapna/Documents/Workspace/Zephyr_ESP/zp/zephyr/lib/libc/minimal/include -isystem /home/swapna/Documents/Workspace/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/include /home/swapna/Documents/Workspace/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.包括-固定-imacros/home/swapna/Documents/Workspace/Zephyr_ESP/zp/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-通用-g -xassembler-with-cpp -imacros/home/swapna/Documents/Workspace/Zephyr_ESP/zp/zephyr/include/toolchain/zephyr_stdint.h -D_ASMLANGUAGE -Wall -Wformat -w格式-Wno-格式-零长度-Wno-主-Wno-指针-符号-w指针-arith-Wno-未使用-但是-设置变量-Werror=隐式-int-fno-异步-展开-表-fno-饼-fno-pic -fno-严格-溢出-fno-reorder-fno-延迟-弹出-功能-fdata-节-节modules/xtensa/CMakeFiles/modules_xtensa_hal.dir/src/hal/cache_asm.S.obj -MD -MT -MF -o模块/xtensa/CMakeFiles。/modules_xtensa_hal.dir/src/hal/cache_asm.S.obj -c /home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/xtensa/src/hal/cache_asm.S

/home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/xtensa/src/hal/cache_asm.S:汇编程序消息:

/home/swapna/Documents/Workspace/Zephyr_ESP/zp/modules/hal/xtensa/src/hal/cache_asm.S:186:错误:未知操作码或格式名称“declfunc”

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-04-11 22:30:08

环境路径上有一个错误。

  1. ESPRESSIF_TOOLCHAIN_PATH

使用指南构建esp32 32的hello应用程序。

根据有关如何构建工具链路径的文档,

$HOME/.espressif/tools/xtensa-esp32-elf/esp-2020r1-8.2.0/xtensa-esp32-elf/

更改此设置并再次尝试构建。再次构建失败的错误

  1. 建筑仍然失败。我在github上检查了与esp32相关的问题。我看到了。 因此,我按照提交中提到的更改修改了代码。 还有沃拉!!啊,真灵。成功构建并在esp32上闪烁。
票数 1
EN

Stack Overflow用户

发布于 2021-07-08 00:54:19

下面是环境设置的更新版本:https://docs.zephyrproject.org/latest/boards/xtensa/esp32/doc/index.html

现在可以使用west espressif installwest espressif update来管理工具链。不过,您需要在环境变量中提供工具链二进制文件的路径,即将其添加到您的~/.profile中。

代码语言:javascript
复制
export ESPRESSIF_TOOLCHAIN_PATH="${HOME}/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf"
export PATH=$PATH:$ESPRESSIF_TOOLCHAIN_PATH/bin
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61039799

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档