Ubuntu 下搭建ESP32 ESP-IDF开发环境,并在windows下用VSCode通过SSH登录Ubuntu开发ESP32应用

从零在 Linux(ubuntu)下,使用VScode+ESP32 IDF+Platform IO搭建开发环境 ESP32的开发环境确实不友好,远不如STM32,在了解了几个的编译环境和方法后,我认为这个方法是最简单方便的,无需繁杂的命令配置,只需要认真阅读官方文档一般都能解决问题。 这里有几个问题: 1).为什么开发环境要使用Linux而不是Windows: Linux下编译更快!速度在5-10倍以上 2).为什么编译工具使用VScode而不是CMake等,其实Eclipse也是可以的,但是我习惯了vs全家桶,就用vscode了。 主要是方便,再加上本身对make也不熟悉。 工具介绍如图: 官方ESP-IDF 编 阅读详情
AI摘要

本文介绍在Ubuntu下搭建ESP32 ESP-IDF开发环境,因Windows下编译慢,选择Ubuntu系统。详细步骤包括安装依赖项、获取ESP-IDF框架、安装设置工具链、配置环境变量、验证安装、设置设备权限。还说明了Windows通过SSH连接Ubuntu及VSCode配置,实现Windows写代码、Ubuntu编译。

Ubuntu 下搭建ESP32 ESP-IDF开发环境,网上操作指南很多,本来一直也没有想过要写这么一篇文章。因为我其实不太习惯在linux下开发应用,平时更习惯windows的软件操作,只是因为windows下开发ESP32的应用编译时太慢,让人受不了,所以最后还是选择搭建了一个Ubuntu系统下的ESP32 ESP-IDF的开发环境,并在window系统下通过SSH连接Ubuntu,这样就即可以在window下用esp-idf开发esp32的应用,又不用忍受window下编译的漫长等待。

一、安装依赖项

这里我们假设Ubuntu系统已经安装完毕。我使用的是ubuntu 24.04.2 LTS版本(非虚拟机,如果使用虚拟机安装,可能后面有一些步骤会略有不同)。

sudo apt update

sudo apt-get install vim 
sudo apt install git
sudo apt-get install python3

sudo apt install -y git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
 

 在ubuntu终端命令行分别输入以上命令并运行。这里一般不会出问题,不多说。

 二、获取ESP-IDF框架

 首先建立工作目录。

mkdir ~/esp
cd ~/esp

这里需要特别强调的一点是:用git命令来clone下来,这就可以可以同步最新的框架版本!不能直接一个downLoad 下载,发现会有错误,切记!

git clone -b v5.4 --recursive https://github.com/es
ESP-IDF/VSCode安装和使用(ESP32开发环境) 在国产MCU中,众鑫的ESP-32系列对开发者是比较友好的,除了有较为丰富的外设接口(例如,对WiFi和蓝牙的支持)外,它的开发环境相对来说也是优秀的。众鑫提供的开发环境是ESP-IDF,它可以以字符界面的方式独立运行,也可以作为插件,在集成开发环境(如VSCode)下运行。本文总结了在Windows、MacOS 和 Ubuntu 几个不同操作系统环境下安装和配置 ESP-IDF/VSCode的过程,供读者参考。 阅读详情

相关推荐

告别Arduino!用VSCode+ESP-IDF搭建ESP32-C3开发环境(Windows/Ubuntu双系统保姆级教程)

本文提供了一份详细的ESP32-C3开发环境搭建指南,教你如何在Windows和Ubuntu双系统下使用VSCode+ESP-IDF替代Arduino进行开发。从环境配置到工程实战,涵盖常见问题解决、调试配置及性能优化技巧,帮助开发者充分利用ESP32-C3的RISC-V架构优势。

weixin_26854829的博客 305

ESP32之Linux编译环境搭建流程

本文详细介绍了在Windows环境下通过VSCode连接Linux虚拟机进行ESP32开发的完整配置流程。主要内容包括:1)安装VMware和Ubuntu服务器版;2)配置Ubuntu网络并安装必要工具链;3)通过gitee工具拉取esp-idf源码及编译环境;4)设置VSCode远程开发环境,包括SSH连接、插件安装和免密登录配置。该方案有效解决了Windows下ESP32编译速度慢的问题,同时保留了VSCode的编辑便利性。文中提供了从虚拟机安装到开发环境搭建的详细步骤说明和常见问题解决方法。

Freddy_Ssc的博客 2080

ESP32 ESP-IDF UART串口通信实战:从环境搭建到DMA与RS485调试

串口通信是嵌入式开发中最基础也最常用的设备交互方式,UART协议通过简单的收发引脚和约定的波特率实现异步数据传输。理解帧格式、电平标准与硬件引脚映射是正确处理串口问题的前提。在现代物联网与工业控制场景中,主控芯片往往需要同时对接多个串口设备,这要求开发者具备高效的工程化实现能力。ESP-IDF作为乐鑫官方框架,提供了比Arduino更底层的UART驱动,包括事件队列、DMA收发和RS485自动换向等特性,适用于更高吞吐和更复杂的项目需求。本文从Ubuntu环境下搭建ESP-IDF v5.4.4开始,系统拆解

weixin_33894640的博客 622

VMware+Ubuntu开发环境四层搭建实战指南

Linux开发环境是嵌入式、机器人、AI和后端服务的基础支撑,其核心在于可复现性、隔离性与硬件兼容性。VMware提供稳定虚拟化底座,Ubuntu则保障原生Linux生态完整性;二者组合规避了WSL2驱动冲突、Windows USB权限异常及Server版图形栈缺失等工程痛点。通过分层架构(虚拟机底座→系统镜像→工具链→领域框架),可系统性解决PX4仿真、ROS2可视化、STM32调试、ESP32-P4开发等典型场景的环境依赖问题。本文聚焦VMware Workstation Pro与Ubuntu 22.0

weixin_33970449的博客 481

【环境搭建】使用openSfM+MVSNet重建稠密点云

本帖详细介绍了如何使用openSfM+MVSNet对真实采集的数据进行稀疏重建与稠密重建,并针对一些真实场景下可能遇到的问题进行了整理。

YuhsiHu的博客 1973

TC397 EB配置ADC软件触发:从零实现周期采样与中断处理

本文详细介绍了如何在Infineon AURIX TC397芯片上使用EB Tresos工具配置ADC软件触发,实现周期采样与中断处理。通过硬件连接、EB模块配置、代码初始化及数据处理的全流程解析,帮助开发者快速掌握ADC软件触发技术,提升嵌入式系统开发效率。

root9的博客 234

Uniapp+Vue3+Monorepo:如何优化你的前端开发流程(附完整配置代码)

本文详细介绍了如何利用Uniapp+Vue3+Monorepo技术栈优化前端开发流程,提升代码可维护性和团队协作效率。通过Monorepo架构实现依赖管理智能化、代码复用最大化和构建流程统一化,结合完整配置代码和实战指南,帮助开发者快速构建高性能跨端应用。

weixin_29011993的博客 453

2022-2028年中国美容仪行业发展战略规划及投资机会预测报告

报告类型:产业研究 报告格式:电子版、纸介版 出品单位:智研咨询-产业信息网 美容仪是一种根据人体生理机能进行调节改善身体和面部的机器,它按照功能来说有美白、嫩肤、祛斑、祛皱、脱毛、减肥等多种,按照名称来说有超声波导入、光子嫩肤、高周波电疗、RF 电波拉皮、电子祛斑点痣、E 光永久脱毛嫩肤、贾法尼营养导入导出等。 智研咨询发布的《2022-2028年中国美容仪行业发展战略规划及投资机会预测报告》共十七章。首先介绍了中国美容仪行业市场发展环境、美容仪整体运行态势等,接着分析了中...

kt346的博客 468

matlab实现MSK调制解调

文章目录一、要求二、设计三、代码四、结果五、结论 一、要求 画出MSK信号产生的信息、I路、Q路信号对比图以及接收端解调的信息恢复的对比图。 二、设计 1.MSK调制 2.MSK解调 三、代码 clear all;clc; N=20; T=1; fc=10; Fs=100; bitstream=randi([0,1],1,N); bitstream1=2*bitstream-1; b0=1; for i=1:N encode_output(i)=b0*bitstream

Time_book的博客 1万+

Cesium实战:从DEM数据到3D地形可视化的全流程解析

本文详细解析了从DEM数据到3D地形可视化的全流程,重点介绍了Cesium和Cesiumlab在数字高程模型(DEM)处理与地形数据转换中的应用。通过实战案例和工具对比,帮助开发者高效实现地形可视化,并分享性能优化与高级功能开发经验。

weixin_29079743的博客 337

宇树机器人G1二次开发:导览、起始点、目的地与完整示例

通过宇树G1 SDK的导航接口,开发者可以高效地实现机器人的自主移动功能。连接 -> 设置目标点 -> 发送命令 -> 监控状态。本文提供的完整示例涵盖了从环境搭建到代码实现的全部步骤,并解释了起始点、目的地等关键概念。开发者可以在此基础上,结合多目标点巡逻、动态避障(需高级配置)等功能,构建更复杂的机器人应用。建议读者先在小范围、熟悉的平坦环境中测试,成功后再逐步扩展到更复杂的场景。

m0_52645558的博客 751

基于OSEK_TP.dll封装通用,多ECU自由切换的诊断函数库

本文介绍了基于CANoe内置OSEK_TP.dll库实现通用诊断通讯的方法。通过封装CAN_TP.cin顶层脚本,实现了ECU连接管理、数据收发和多ECU切换功能。系统采用字典结构存储ECU参数,支持从配置文件读取诊断ID等配置信息,通过TpCreateConnection建立TP层连接。文章详细说明了诊断请求发送函数Uds_DiagSendRequest的实现逻辑,以及如何利用回调函数处理收发事件。该方法无需依赖诊断数据库,通过底层封装实现了灵活高效的诊断通讯方案,适用于车载诊断领域的测试需求。

蚂蚁小兵 1570

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

上一篇: CH579 CH573 CH582 CH592 蓝牙主机(Central)实例应用讲解(一)
下一篇: MicroPython 开发ESP32应用教程 之 线程介绍及实例分析
永远的元子
博客等级 码龄16年 330粉丝 44原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

永远的元子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值