栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

乐鑫ESP32环境搭建(3)-运行helloworld

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

乐鑫ESP32环境搭建(3)-运行helloworld


终端结束之后,编译工具相关的环境变量都会失效。下次新开终端时,都要首先导出这些变量。
比如 $IDF_PATH 是指 esp-idf的路径。 
Echo  $IDF_PATH 检查一下这个路径是不是OK的

======增加快捷命令 .bash_profile
alias get_idf='. $HOME/xxxxxx/esp-idf/export.sh'

source ~/.bash_profile

导出环境变量:

get_idf 

Echo  $IDF_PATH检查一下

===== 开始 hello_world ====
复制hello_world代码
1.cp -r $IDF_PATH/examples/get-started/hello_world .
cd hello_world
idf.py set-target esp32c3  #环境变量导出OK,idf.py 就会有自动补齐功能
idf.py menuconfig  #不做也可,默认115200波特率
idf.py build #编译工程
idf.py -p /dev/tty.wchusbserial1410 flash #烧录到板子上,自动刚开始运行  -b设置波特率 默认115200
idf.py -p /dev/tty.wchusbserial1410 monitor # 监听串口 
ctrl+] 退出监听

Hello world!
This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision 3, 2MB external flash
Minimum free heap size: 329596 bytes
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
Restarting in 5 seconds...
Restarting in 4 seconds...
Restarting in 3 seconds...
Restarting in 2 seconds...
Restarting in 1 seconds...
Restarting in 0 seconds...
Restarting now.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/510735.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号