开发环境
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[ESP32]]
&color(red){※This article is based on esp-idf 4.0};
#contents
* 开发文档 [#qdece1a4]
https://docs.espressif.com/projects/esp-idf/zh_CN/latest...
* 编译环境的下载 [#qbaac25b]
** ESP-IDF 5.0之前 [#tf825eb8]
https://docs.espressif.com/projects/esp-idf/zh_CN/latest...
也可以使用ESP8266的[[+ESP8266+开发环境]]
** ESP-IDF 5.0以后 [#lcc6cb6e]
https://github.com/espressif/idf-installer
从上面的网址下载在线/离线安装包,Eclipse的开发环境
** Matter [#t99e3ce9]
git clone --recursive https://github.com/espressif/esp-m...
ESP32、ESP32-S系列、ESP32-C系列、ESP32-H系列均支持Matter...
* 配置编译环境 [#oa1c1aa4]
** MingW32 [#j4539659]
#codeprettify{{
export PATH="$PATH:/opt/xtensa-esp32-elf/bin"
export IDF_PATH="D:/Tools/msys32/home/Administrator/esp/e...
}}
** Windows [#t0e2d900]
*** Install [#g1cabc4c]
运行 install.bat batch文件
或者
python -m pip install --user -r $IDF_PATH/requirements.c...
需要注意看 requirements.core.txt是否在 IDF_PATH 当中
使用bat安装后的环境也可以使用powershell来编译,运行之前,...
*** 设置环境变量 [#y0c1e288]
运行 export.bat batch文件
&color(red){※注意};
如果修改了 IDF_TOOLS_PATH 变量,请确保该变量在每次执行安...
***编译 [#de4ea2c8]
每次启动命令行后执行一下 export.bat batch文件
去example 文件夹里面,运行下面的命令
..\..\..\tools\idf.py set-target esp32s2
..\..\..\tools\idf.py menuconfig
..\..\..\tools\idf.py build
命令执行后,会自动下载安装确实的依赖包
&ref(esp-idf_cmdbuild2.png);
#codeprettify{{
Project build complete. To flash, run this command:
C:\Users\Administrator\.espressif\python_env\idf5.0_py3.7...
-p (PORT) -b 460800 --before default_reset --after hard_...
0x1000 build\bootloader\bootloader.bin 0x8000 build\part...
0x10000 build\hello_world.bin
or run 'idf.py -p (PORT) flash'
}}
** VS Code [#g8ab3004]
&color(red){ESP-IDF 5.0 版本以后的编译,暂时无法使用MingW...
VSCode 插件仓库搜索“ESP-IDF” Espressif IDF 现在最新版本是...
正常输入命令 ESP-IDF: Configure ESP-IDF extension 后会出...
&ref(esp-idf_configure.png);
***安装问题 [#t2b0c392]
在配置ESP_IDF时 v1.3.0版本有下面的bug,请安装低版本的1.2
restart Visual Studio Code and run this wizard again.
网上有个解决的办法是下载下面的 vsix 插件,使用这个安装,有...
https://nightly.link/espressif/vscode-esp-idf-extension/...
&ref(esp-idf_vsixinstall.png);
* 烧录 [#z7055eaa]
||模式|GPIO0|
|UART|下载模式|低|
|Flash|运行模式|高|
* monitor [#m9803cf8]
串口监视命令
使用第二个串口)
#codeprettify{{
//Linux
make monitor ESPPORT=/dev/cu.wchusbserial14140
//Windows
make monitor ESPPORT=ESPPORT=COMx
}}
* 查看错误信息 [#y69220a0]
#codeprettify{{
//dump文件
xtensa-lx106-elf-objdump -S build/GW32.elf > a.S
//查看错误所在
xtensa-esp32-elf-addr2line -pfiaC -e build/GW32.elf 0x400...
}}
&ref(ZigBee_体系结构.png);
#hr();
コメント:
#comment_kcaptcha
終了行:
[[ESP32]]
&color(red){※This article is based on esp-idf 4.0};
#contents
* 开发文档 [#qdece1a4]
https://docs.espressif.com/projects/esp-idf/zh_CN/latest...
* 编译环境的下载 [#qbaac25b]
** ESP-IDF 5.0之前 [#tf825eb8]
https://docs.espressif.com/projects/esp-idf/zh_CN/latest...
也可以使用ESP8266的[[+ESP8266+开发环境]]
** ESP-IDF 5.0以后 [#lcc6cb6e]
https://github.com/espressif/idf-installer
从上面的网址下载在线/离线安装包,Eclipse的开发环境
** Matter [#t99e3ce9]
git clone --recursive https://github.com/espressif/esp-m...
ESP32、ESP32-S系列、ESP32-C系列、ESP32-H系列均支持Matter...
* 配置编译环境 [#oa1c1aa4]
** MingW32 [#j4539659]
#codeprettify{{
export PATH="$PATH:/opt/xtensa-esp32-elf/bin"
export IDF_PATH="D:/Tools/msys32/home/Administrator/esp/e...
}}
** Windows [#t0e2d900]
*** Install [#g1cabc4c]
运行 install.bat batch文件
或者
python -m pip install --user -r $IDF_PATH/requirements.c...
需要注意看 requirements.core.txt是否在 IDF_PATH 当中
使用bat安装后的环境也可以使用powershell来编译,运行之前,...
*** 设置环境变量 [#y0c1e288]
运行 export.bat batch文件
&color(red){※注意};
如果修改了 IDF_TOOLS_PATH 变量,请确保该变量在每次执行安...
***编译 [#de4ea2c8]
每次启动命令行后执行一下 export.bat batch文件
去example 文件夹里面,运行下面的命令
..\..\..\tools\idf.py set-target esp32s2
..\..\..\tools\idf.py menuconfig
..\..\..\tools\idf.py build
命令执行后,会自动下载安装确实的依赖包
&ref(esp-idf_cmdbuild2.png);
#codeprettify{{
Project build complete. To flash, run this command:
C:\Users\Administrator\.espressif\python_env\idf5.0_py3.7...
-p (PORT) -b 460800 --before default_reset --after hard_...
0x1000 build\bootloader\bootloader.bin 0x8000 build\part...
0x10000 build\hello_world.bin
or run 'idf.py -p (PORT) flash'
}}
** VS Code [#g8ab3004]
&color(red){ESP-IDF 5.0 版本以后的编译,暂时无法使用MingW...
VSCode 插件仓库搜索“ESP-IDF” Espressif IDF 现在最新版本是...
正常输入命令 ESP-IDF: Configure ESP-IDF extension 后会出...
&ref(esp-idf_configure.png);
***安装问题 [#t2b0c392]
在配置ESP_IDF时 v1.3.0版本有下面的bug,请安装低版本的1.2
restart Visual Studio Code and run this wizard again.
网上有个解决的办法是下载下面的 vsix 插件,使用这个安装,有...
https://nightly.link/espressif/vscode-esp-idf-extension/...
&ref(esp-idf_vsixinstall.png);
* 烧录 [#z7055eaa]
||模式|GPIO0|
|UART|下载模式|低|
|Flash|运行模式|高|
* monitor [#m9803cf8]
串口监视命令
使用第二个串口)
#codeprettify{{
//Linux
make monitor ESPPORT=/dev/cu.wchusbserial14140
//Windows
make monitor ESPPORT=ESPPORT=COMx
}}
* 查看错误信息 [#y69220a0]
#codeprettify{{
//dump文件
xtensa-lx106-elf-objdump -S build/GW32.elf > a.S
//查看错误所在
xtensa-esp32-elf-addr2line -pfiaC -e build/GW32.elf 0x400...
}}
&ref(ZigBee_体系结构.png);
#hr();
コメント:
#comment_kcaptcha
ページ名: