Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ファームウェアビルド時のエラー #183

Open
taisan11 opened this issue Jul 16, 2023 · 7 comments
Open

ファームウェアビルド時のエラー #183

taisan11 opened this issue Jul 16, 2023 · 7 comments

Comments

@taisan11
Copy link

不具合の概要
ファームウェアをビルドした際にエラーが発生する

再現手順
不具合を再現できる手順を記述してください
1.npm iをしてvisualstudioを入れnpm run setupはvisualstudiocommandpalletv17.6.5で、npm run setup -- --device=esp32npm run setupで出てきた新しいコマンドプロンプトで実行し、

  1. これnpm run build --target=esp32/m5stack_core2をESP-IDF 5.1 CMDで実行する
  2. 下のようなエラーが発生する

ログ

> stack-chan@0.2.1 build
> cross-env npm_config_target?=esp32/m5stack cross-env-shell mcconfig -d -m -p \$npm_config_target -t build ./stackchan/manifest_local.json

C:\Espressif\tools\idf-exe\1.0.3\idf.py.exe
C:\Espressif\frameworks\esp-idf-v5.1\tools\idf.py
*** Update required to ESP-IDF v4.4.3 (found v5.1)
  See update instructions at: https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/devices/esp32.md
"Expected ESP IDF v4.4.3, found v5.1"
NMAKE : fatal error U1077: 'python C:\Users\ユーザー名\xs-dev\moddable\build\devices\esp32\xsProj-esp32\versionCheck.py v4.4.3 v5.1 || (echo "Expected ESP IDF v4.4.3, found v5.1" && exit 1)' : リターン コード '0x1'
Stop.

環境:

  • OS: Windows11
  • IDE: ESP-IDF?
  • スタックチャンのバージョン:dev/v1.0
  • M5Stack Core2
@stc1988
Copy link
Contributor

stc1988 commented Jul 20, 2023

ESP IDFのv5.1がインストールされているようですが、現在Moddableで対応しているのはv4.4.3です。
インストール方法についてはModdable公式ドキュメントを参照ください

@taisan11
Copy link
Author

ESP-IDFv4.4.3のコマンドプロンプト内でC:\Users\kappy\xs-dev\Moddable.batを実行しnpm run build --target=esp32/m5stack_core2を実行したところ以下のようなエラーが発生します

-- Configuring incomplete, errors occurred!
See also "C:/Users/user/xs-dev/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
NMAKE : fatal error U1077: 'python %IDF_PATH%\tools\idf.py -n reconfigure -D SDKCONFIG_DEFAULTS=C:/Users/user/xs-dev/moddable/build/tmp/esp32/m5stack_core2/debug/stackchan/xsProj-esp32/sdkconfig.mc -D SDKCONFIG_HEADER="C:\Users\user\xs-dev\moddable\build\tmp\esp32\m5stack_core2\debug\stackchan\xsProj-esp32\build\config\sdkconfig.h" -D CMAKE_MESSAGE_LOG_LEVEL=ERROR -D DEBUGGER_SPEED=1500000 -D IDF_TARGET=esp32 -D ESP32_SUBCLASS=esp32 -D SDKCONFIG_DEFAULTS=C:\Users\user\xs-dev\moddable\build\tmp\esp32\m5stack_core2\debug\stackchan\xsProj-esp32\sdkconfig.mc' : リターン コード '0x2'
Stop.

生成されたログは以下の通りです
https://gist.github.com/taisan11/b621128f20267c9a0b9f16ff1df9625d

@stc1988
Copy link
Contributor

stc1988 commented Aug 1, 2023

確認遅くなりすみません。
いただいたログからも手がかりがないのでnpm run doctorを実行して環境が構築できているか確認いただけますでしょうか

@taisan11
Copy link
Author

taisan11 commented Aug 2, 2023

npm run doctorを実行してみましたが特におかしい点はありませんでした
以下実行ログです

stack-chan environment info:
4bf78b32f11bdd3457a3826fd247a2dfeb99e808
C:/Users/kappy/Documents/stack-chan
xs-dev environment info:
  CLI Version                0.20.0
  OS                         Windows_NT
  Arch                       x64
  NodeJS Version             v18.16.0 (C:\Program Files\nodejs\node.EXE)
  Python Version             3.8.7 (C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.EXE)
  Moddable SDK Version       3.9.2 (C:\Users\kappy\xs-dev\moddable)
  Supported target devices   win, esp32
  ESP32 IDF Directory        C:\Users\kappy\xs-dev\esp32\esp-idf

If this is related to an error when using the CLI, please create an issue at "https://github.com/hipsterbrown/xs-dev/issues/new" with the above info.

@stc1988
Copy link
Contributor

stc1988 commented Aug 2, 2023

環境構築はxs-devを使って実施してそうですね。私のほうでも試してみますが、Windows環境のxs-devはサポート状況が完全でなく、動作しない可能性もあります。

[Windows環境においては公式の手順を実施し他が早回りかもしれません。

@washishi 本件のような事象に遭遇したことはありますでしょうか

@washishi
Copy link
Contributor

washishi commented Aug 2, 2023

Windowsの場合 xs-dev というか ESP-IDF Windows InstallerでPython3.8.7が入りそれが使われるのですがそのPythonに問題がある様でスタックチャンのファームウエアのビルドは失敗します
なので利用するPythonを変更する必要があります

下記メモを作ってますので参照してみてください
Windowsでのxs-devを利用したmodableビルド環境構築

利用するPythonの変更については「・ESP-IDF Tools で利用するPythonの変更」のところで書いてます

@washishi
Copy link
Contributor

washishi commented Aug 2, 2023

【参考】ビルドで失敗する件のメッセージの詳細はこちらで書いてましたね
#136 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants