嵌入式 Linux 基础:环境配置(Debian 12 安装配置)
<p></p><div class="toc"><div class="toc-container-header">目录</div><ul><li>一、虚拟机 Debian12 环境配置<ul><li>1、安装 VMware Workstation Pro<ul><li>注册博通官网注册账号</li><li>下载 VMware Workstation Pro</li></ul></li><li>2、虚拟机安装 Debian12<ul><li>下载 Debian12 镜像</li><li>虚拟机设置</li><li>配置(安装) debian12</li><li>配置 debian12 环境</li></ul></li><li>3、Debian12 安装常用软件(微信、QQ)<ul><li>设置 Flatpak 和 Flathub</li><li>安装微信</li></ul></li><li>4、Debian12 安装开发工具<ul><li>ARM 的交叉编译工具链</li><li>其他开发必备基础软件</li><li>Docker</li></ul></li><li>5、配置主机与 Debian12 的连通<ul><li>共享文件夹</li></ul></li></ul></li><li>二、其他开发环境配置<ul><li>1、USB 转串口驱动下载安装<ul><li>下载安装 CH341SER.EXE</li><li>下载安装 PL23XX-M_LogoDriver_Setup.exe</li><li>需安装驱动的情况</li></ul></li><li>2、Windows 安装配置 ssh 工具<ul><li>下载 Electerm</li><li>安装Electerm</li><li>下载 Xshell</li><li>安装 Xshell</li><li>使用 Xshell<ul><li>串口连接</li><li>串口 Xmodem 协议文件传输</li></ul></li></ul></li></ul></li></ul></div><p></p><h2 id="一虚拟机-debian12-环境配置">一、虚拟机 Debian12 环境配置</h2>
<h3 id="1安装-vmware-workstation-pro">1、安装 VMware Workstation Pro</h3>
<blockquote>
<p>注意,现在官网下载很麻烦,不想麻烦可以直接看到后面官网下载失败的方法</p>
</blockquote>
<h4 id="注册博通官网注册账号">注册博通官网注册账号</h4>
<p>进入官网注册界面进行注册</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001120870-698406270.png" style="width: 80%"></center>
<blockquote>
<p>使用 QQ 邮箱就行,注册完后需要自行登录</p>
</blockquote>
<h4 id="下载-vmware-workstation-pro">下载 VMware Workstation Pro</h4>
<p>登录后进入下载界面:</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001124754-354310450.png" style="width: 80%"></center>
<p>下滑找到 VMware Workstation Pro:</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001125700-234317266.png" style="width: 80%"></center>
<p>版本选择面向个人用户使用的 windows 版本:</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001126679-2113085243.png" style="width: 80%"></center>
<p>点击想要下载的版本号,进入下载界面进行下载:</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001127774-787750233.png" style="width: 80%"></center>
<p>下载完成后安装即可。</p>
<blockquote>
<p>如果官网下载失败,可以到果壳剥壳下载或者其他你信得过的第三方网站下载,安装完成后选择个人使用或输入密钥都可以正常使用。</p>
<p><mark><strong>不要下载 VMware Workstation Pro 17.5.2版,其 vmware-tools 有问题</strong></mark></p>
</blockquote>
<h3 id="2虚拟机安装-debian12">2、虚拟机安装 Debian12</h3>
<blockquote>
<p>Debian12 说实话其实挺好用的,自带中文输入法、open-vm-tools 和其他基础软件包,Debian 系统中正真开始做到可以开箱即用的一代。</p>
</blockquote>
<h4 id="下载-debian12-镜像">下载 Debian12 镜像</h4>
<p>我选择在官网下载,觉得官网速度慢的可以在其他国内镜像源(中科大源、清华源等自行搜索即可)下载。</p>
<blockquote>
<p>注意:要下载 3.7G(4G左右)的完整版。</p>
</blockquote>
<p>进入debian官网,选择其他下载链接:</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001133626-352868779.png" style="width: 80%"></center>
<p>选择完整版进行下载:</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001136215-557257517.png" style="width: 80%"></center>
<h4 id="虚拟机设置">虚拟机设置</h4>
<blockquote>
<p>我虚拟机使用的是 17.5.1 版本,至少这个版本 VMware Tools 是正常的。</p>
</blockquote>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001136901-1127732676.png" style="width: 80%"></center>
<p><strong>选择创建新的虚拟机,选择典型:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001137411-896529855.png" style="width: 50%"></center>
<p><strong>设置镜像路径:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001137934-1354778399.png" style="width: 50%"></center>
<p><strong>设置虚拟机名字和路径:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001138323-700136710.png" style="width: 50%"></center>
<p><strong>设置虚拟机磁盘大小(按需):</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001138763-1690392179.png" style="width: 50%"></center>
<p><strong>选择自定义硬件:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001139248-1389336435.png" style="width: 50%"></center>
<ul>
<li>网络设置为桥接,其他按需:</li>
</ul>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001139629-304692290.png" style="width: 33%"></center>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001140005-283383712.png" style="width: 50%"></center>
<h4 id="配置安装-debian12">配置(安装) debian12</h4>
<p><strong>选择第一个(图形化界面)安装,回车进入:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001141552-1900731648.png" style="width: 67%"></center>
<p><strong>语言选择简体中文:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001143596-1757640009.png" style="width: 67%"></center>
<p><strong>选择位置为中国:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001145195-992242562.png" style="width: 67%"></center>
<p><strong>选择输入法为汉语:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001146652-1478328097.png" style="width: 67%"></center>
<p><strong>设置主机名:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001148235-1359241448.png" style="width: 67%"></center>
<p><strong>配置网络名留空:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001149115-688383876.png" style="width: 67%"></center>
<p><strong>设置root密码:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001151114-209109239.png" style="width: 67%"></center>
<p><strong>设置新用户名和密码:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001152583-1096032241.png" style="width: 67%"></center>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001154118-1369717696.png" style="width: 67%"></center>
<p><strong>对磁盘进行分区选择“向导 - 使用整个磁盘”:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001156122-1001057149.png" style="width: 67%"></center>
<p><strong>以下默认即可:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001157554-1916609847.png" style="width: 67%"></center>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001159090-2133645693.png" style="width: 67%"></center>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001200992-1666765524.png" style="width: 67%"></center>
<p><strong>将改动写入磁盘选择“是”:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001202524-376460397.png" style="width: 67%"></center>
<p><strong>扫描额外的安装介质选择“否”:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001204138-1227461270.png" style="width: 67%"></center>
<p><strong>使用网络镜像站点选择“是”:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001205772-2005636576.png" style="width: 67%"></center>
<p><strong>源站点选择中国:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001207214-1160210552.png" style="width: 67%"></center>
<p><strong>源仓库选择清华源(其他可用源也可):</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001208914-1379311238.png" style="width: 67%"></center>
<p><strong>HTTP代理信息留空:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001210106-531495591.png" style="width: 67%"></center>
<p><strong>参加软件包流行度调查随意即可:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001211877-2000389486.png" style="width: 67%"></center>
<p><strong>选择需要的基础服务和桌面环境(我选择的是 KDE ,SSH要选):</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001213067-1662016442.png" style="width: 67%"></center>
<p><strong>安装 GRUB 启动引导器:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001214713-1695574945.png" style="width: 67%"></center>
<p><strong>安装引导器的设备选择”/dev/sda“:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001216271-1690976233.png" style="width: 67%"></center>
<p><strong>安装完成,继续:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001217697-333216786.png" style="width: 67%"></center>
<p><strong>启动效果:</strong></p>
<p><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001116755-1305001569.png" alt="image-20240616154308915" loading="lazy"></p>
<h4 id="配置-debian12-环境">配置 debian12 环境</h4>
<p><strong>用户账户添加到 <code>sudo</code> 组:</strong></p>
<pre><code class="language-sh"># 打开终端并使用 root 密码进入 root 账户
su
# 将用户添加到 sudo 用户组(-a 表示附加(append),-G 表示指定用户所属的附加组(groups))
/usr/sbin/usermod -aG sudo yzxe
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001218272-207611934.png" style="width: 67%"></center>
<p><strong>添加源,更新软件:</strong></p>
<pre><code class="language-sh"># 编辑软件源列表文件
sudo nano /etc/apt/sources.list
# 获取最新的软件包信息
sudo apt update
# 下载并安装所有已安装软件包的最新版本
sudo apt upgrade
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001219573-1757903179.png" style="width: 80%"></center>
<blockquote>
<p>这里最上面那一条一定会有,要注释,否则会报错</p>
</blockquote>
<p><strong>源文件:</strong></p>
<pre><code class="language-sh"># deb cdrom:/ bookworm contrib main non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
</code></pre>
<p><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001118336-2010304217.png" alt="image-20240617212603878" loading="lazy"></p>
<p><strong>更新软件包:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001220296-354768596.png" style="width: 67%"></center>
<p><strong>VMware Tools:</strong></p>
<blockquote>
<p>这个版本 VMware Workstation Pro 竟然不用安装 VMware Tools 就可以用,要知道 VMware Workstation Pro 17.5.2 我试了多久,果然是 VMware Workstation Pro 版本问题啊。</p>
<p><strong>Debian12 自带 <code>open-vm-tools</code>,按道理只要更新一下软件包即可使用才对。</strong></p>
</blockquote>
<p>VMware Tools有很大的不稳定性(我捣鼓了很久,最后莫名其妙好了,到最后都没弄明白是什么问题),因此我的建议是大家可以“八仙过海,各显神通”了。</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001221483-2086619225.png" style="width: 80%"></center>
<h3 id="3debian12-安装常用软件微信qq">3、Debian12 安装常用软件(微信、QQ)</h3>
<h4 id="设置-flatpak-和-flathub">设置 Flatpak 和 Flathub</h4>
<p><strong>安装<code>flatpak</code>包管理器:</strong></p>
<pre><code class="language-sh">sudo apt install flatpak
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001222565-2084982408.png" style="width: 80%"></center>
<p><strong>安装 Software Flatpak 插件:</strong></p>
<blockquote>
<p>让 snap 可以搜到 flatpak 上面的软件</p>
</blockquote>
<pre><code class="language-sh">sudo apt install gnome-software-plugin-flatpak
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001223692-987706398.png" style="width: 67%"></center>
<p><strong>添加 Flatpak 远程软件仓库:</strong></p>
<pre><code class="language-sh">sudo apt install plasma-discover-backend-flatpak
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001224522-775918839.png" style="width: 80%"></center>
<p><strong>上面的官方源太慢了(等到地球毁灭了,一个软件都还没下载完),更换为上海交大的镜像源:</strong></p>
<pre><code class="language-sh">sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001225047-474234472.png" style="width: 80%"></center>
<h4 id="安装微信">安装微信</h4>
<p><strong>安装完 Flatpak 后,可在软件管理中心直接搜索下载:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001226347-99567625.png" style="width: 80%"></center>
<p><strong>安装 Flatpak 应用程序前会弹出以下需要安装,完成安装即可:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001227474-356353445.png" style="width: 80%"></center>
<blockquote>
<p>其他软件同理,可在软件管理中心安装,也可使用以下命令进行安装:</p>
<pre><code class="language-sh"># 使用 apt(一般):apt 是 Debian 和基于 Debian 的发行版(如 Ubuntu)中使用的包管理工具。
sudo apt install <package-name>
# 使用 Flatpak:Flatpak 是一个用于在各种 Linux 发行版上部署和管理应用程序的工具。
sudo flatpak install flathub <application-id>
# 使用 Snap:Snap 是由 Canonical 开发的用于在各种 Linux 发行版上分发和管理应用程序的系统。
sudo snap install <application-name>
</code></pre>
</blockquote>
<p><strong>以下是我安装的一般软件:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001227991-1715387935.png" style="width: 50%"></center>
<h3 id="4debian12-安装开发工具">4、Debian12 安装开发工具</h3>
<h4 id="arm-的交叉编译工具链">ARM 的交叉编译工具链</h4>
<p><strong>安装工具链包:</strong></p>
<ul>
<li>安装 <code>gcc-arm-none-eabi</code>:这是一个GNU Compiler Collection (GCC) 的工具链,用于嵌入式系统开发。它生成没有操作系统支持的裸机(bare-metal)代码。</li>
</ul>
<pre><code class="language-sh">sudo apt install gcc-arm-none-eabi
</code></pre>
<ul>
<li>安装 <code>gcc-aarch64-linux-gnu</code>(适用于64位ARM):这是一个用于64位ARM架构的GNU工具链,生成的代码可以在支持AArch64(64位ARM架构)的Linux操作系统上运行。</li>
</ul>
<pre><code class="language-sh">sudo apt install gcc-aarch64-linux-gnu
</code></pre>
<ul>
<li>安装 <code>gcc-arm-linux-gnueabi</code>(适用于32位ARM):这是一个用于32位ARM架构的GNU工具链,生成的代码可以在支持ARM架构的Linux操作系统上运行。</li>
</ul>
<pre><code class="language-sh">sudo apt install gcc-arm-linux-gnueabi
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001229210-1299080122.png" style="width: 80%"></center>
<ul>
<li>查看是否安装成功:</li>
</ul>
<pre><code class="language-sh">arm-none-eabi-gcc --version
aarch64-linux-gnu-gcc --version
arm-linux-gnueabi-gcc --version
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001230329-1332031732.png" style="width: 67%"></center>
<p><strong>配置环境变量:</strong></p>
<ul>
<li>查看安装位置:</li>
</ul>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001230880-1748165211.png" style="width: 50%"></center>
<ul>
<li>编辑环境变量文件:</li>
</ul>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001232181-548421295.png" style="width: 80%"></center>
<ul>
<li>使更改生效:</li>
</ul>
<pre><code class="language-sh"># 使环境变量更改立即生效
source ~/.bashrc
# 验证是否成功添加了工具链路径
echo $PATH
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001232726-13326396.png" style="width: 67%"></center>
<h4 id="其他开发必备基础软件">其他开发必备基础软件</h4>
<ul>
<li><strong>Build-Essential</strong>:
<ul>
<li><strong>用途</strong>:安装基本的开发工具,包括 <code>gcc</code>, <code>g++</code>, <code>make</code> 等,用于编译从源代码构建软件。</li>
</ul>
</li>
</ul>
<ul>
<li>
<p><strong>Curl</strong>:</p>
<ul>
<li><strong>用途</strong>:命令行工具,用于从或向服务器传输数据,支持多种协议(HTTP, FTP 等)。</li>
</ul>
</li>
<li>
<p><strong>Git</strong>:</p>
<ul>
<li><strong>用途</strong>:版本控制系统,用于管理源代码和版本。</li>
</ul>
</li>
<li>
<p><strong>Wget</strong>:</p>
<ul>
<li><strong>用途</strong>:命令行下载工具,支持HTTP、HTTPS、FTP协议,用于下载文件。</li>
</ul>
</li>
<li>
<p><strong>Vim/Nano</strong>:</p>
<ul>
<li><strong>用途</strong>:文本编辑器。Vim 是一个强大的编辑器,适合高级用户;Nano 更简单,适合新手。</li>
</ul>
</li>
<li>
<p><strong>GCC/G++</strong>:</p>
<ul>
<li><strong>用途</strong>:GNU编译器集合,包含C和C++编译器,用于编译C和C++程序。</li>
</ul>
</li>
<li>
<p><strong>SSH Server</strong>:</p>
<ul>
<li><strong>用途</strong>:OpenSSH 服务器,用于远程登录和安全传输。</li>
</ul>
</li>
<li>
<p><strong>HTOP</strong>:</p>
<ul>
<li><strong>用途</strong>:交互式进程查看器,类似于 <code>top</code>,但更强大和用户友好。</li>
</ul>
</li>
<li>
<p><strong>Net-tools</strong>:</p>
<ul>
<li><strong>用途</strong>:网络工具包,包含 <code>ifconfig</code>, <code>netstat</code>, <code>route</code> 等命令。</li>
</ul>
</li>
<li>
<p><strong>Nmon</strong>:</p>
<ul>
<li><strong>用途</strong>:系统性能监控工具,实时显示CPU、内存、网络、磁盘等使用情况。</li>
</ul>
</li>
</ul>
<pre><code class="language-sh">sudo apt install build-essential curl git wget vim nano gcc g++ openssh-client openssh-server htop net-tools nmon
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001233944-906395825.png" style="width: 80%"></center>
<h4 id="docker">Docker</h4>
<h3 id="5配置主机与-debian12-的连通">5、配置主机与 Debian12 的连通</h3>
<h4 id="共享文件夹">共享文件夹</h4>
<p><strong>虚拟机设置共享文件夹:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001234658-1498415837.png" style="width: 67%"></center>
<p><strong>挂载共享文件夹:</strong></p>
<pre><code class="language-sh"># 创建一个挂载点
sudo mkdir -p /mnt/hgfs/VMshare
# 挂载命令
sudo mount -t fuse.vmhgfs-fuse .host:/VMshare /mnt/hgfs/VMshare -o allow_other
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001235231-333724724.png" style="width: 80%"></center>
<p><strong>配置每次开机自动挂载:</strong></p>
<ul>
<li>编辑<code>/etc/fstab</code>文件</li>
</ul>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001235686-1559371356.png" style="width: 50%"></center>
<ul>
<li>文件最后加入挂载配置</li>
</ul>
<pre><code class="language-ch">.host:/VMshare /mnt/hgfs/VMshare fuse.vmhgfs-fuse allow_other,defaults 0 0
</code></pre>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001237129-498426975.png" style="width: 80%"></center>
<h2 id="二其他开发环境配置">二、其他开发环境配置</h2>
<h3 id="1usb-转串口驱动下载安装">1、USB 转串口驱动下载安装</h3>
<p><strong>USB 转串口有可能会需要以下两个驱动:</strong></p>
<blockquote>
<p>如果是 win10 及以上系统,这两个一定要按我给网站下载安装最新(合适系统的)版本,否则驱动出错!!!</p>
</blockquote>
<ul>
<li><code>CH341SER.EXE</code> 是一个驱动程序安装包,主要用于安装 CH341 系列 USB 转串口芯片的驱动程序。CH341 是由中国公司南京沁恒微电子有限公司(WCH)制造的一种常见的 USB 转串口芯片。该芯片广泛用于各种设备中,以实现 USB 接口和串行接口(如 RS232、RS485、TTL 等)之间的通信。</li>
<li><code>PL23XX-M_LogoDriver_Setup.exe</code> 是用于安装 Prolific PL2303 系列 USB 转串口芯片驱动程序的安装包。Prolific Technology Inc. 是一家制造 USB 转串口桥接芯片的公司,PL2303 系列是其广泛使用的产品。这些芯片用于将 USB 接口转换为标准的 RS232 串口,用于连接各种串行设备,如调制解调器、GPS 接收器、微控制器等。</li>
</ul>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001237572-1307842444.png" style="width: 50%"></center>
<h4 id="下载安装-ch341serexe">下载安装 CH341SER.EXE</h4>
<p>下载地址:CH341SER.EXE - 南京沁恒微电子股份有限公司</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001238557-1245883573.png" style="width: 80%"></center>
<blockquote>
<p>下载完成后,点击安装即可。</p>
</blockquote>
<h4 id="下载安装-pl23xx-m_logodriver_setupexe">下载安装 PL23XX-M_LogoDriver_Setup.exe</h4>
<p>下载地址:Products PL2303 Windows驱动程序下载 USB转RS232串口</p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001239768-565524219.png" style="width: 80%"></center>
<h4 id="需安装驱动的情况">需安装驱动的情况</h4>
<p><strong>若出现以下情况,则需按照上述安装合适驱动:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001240607-1469473296.png" style="width: 80%"></center>
<p><strong>驱动安装正确,串口正确识别:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001241001-2048569874.png" style="width: 50%"></center>
<h3 id="2windows-安装配置-ssh-工具">2、Windows 安装配置 ssh 工具</h3>
<blockquote>
<p>这里我尝试两款 ssh 工具:Electerm、Xshell,我最后选择了 Xshell。</p>
</blockquote>
<hr>
<blockquote>
<p>Electerm 是一款开源免费的终端模拟器,集终端模拟器、文件管理器、SSH 远程连接、SFTP 客户端等功能于一体。它可以在 Windows、macOS 和 Linux 操作系统上运行,为用户提供一个功能丰富、易于使用的终端环境。它还支持多语言,包括英语、中文等。</p>
</blockquote>
<h4 id="下载-electerm">下载 Electerm</h4>
<p>下载地址:Electerm 官网</p>
<p><strong>官网下滑到下载,选择合适版本下载,如 Windows:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001241751-1493581578.png" style="width: 80%"></center>
<h4 id="安装electerm">安装Electerm</h4>
<blockquote>
<p>下载完成后双击安装包开始安装</p>
</blockquote>
<p><strong>选择为所有用户安装:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001242167-1618877355.png" style="width: 67%"></center>
<p><strong>选择合适安装位置:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001242567-358520107.png" style="width: 67%"></center>
<p><strong>安装完成:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001242897-1716573860.png" style="width: 67%"></center>
<blockquote>
<p>Electerm开源、跨平台,但我试了一下感觉用起来不太顺手,然后就放弃了。</p>
</blockquote>
<hr>
<blockquote>
<p>Xshell 是一个功能强大的终端模拟器,它主要用于远程管理和连接服务器。它在Windows系统上运行,支持多种协议,包括SSH、Telnet、Rlogin、SFTP 和 Serial。</p>
</blockquote>
<h4 id="下载-xshell">下载 Xshell</h4>
<p><strong>进入Xshell 官网个人使用免费下载 Xshell:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001244999-275728370.png" style="width: 80%"></center>
<h4 id="安装-xshell">安装 Xshell</h4>
<blockquote>
<p>下载完成后双击安装包开始安装。</p>
</blockquote>
<p><strong>设置安装位置:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001245578-1776824466.png" style="width: 67%"></center>
<p><strong>安装完成:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001245964-1321876390.png" style="width: 67%"></center>
<p><strong>输入名字和邮箱获得免费许可:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001247030-632559980.png" style="width: 50%"></center>
<p><strong>收到邮件后点击邮件中的链接即可完成注册:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001248019-1893489423.png" style="width: 67%"></center>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001251436-1035779096.png" style="width: 80%"></center>
<h4 id="使用-xshell">使用 Xshell</h4>
<h5 id="串口连接">串口连接</h5>
<p><strong>点击左上角图标新建会话:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001252231-179127050.png" style="width: 80%"></center>
<p><strong>新建回话界面中选择连接,修改会话名称,选择协议SERIAL:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001252808-1822381550.png" style="width: 67%"></center>
<p><strong>点击串口,设置端口号和波特率,点击确定:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001253134-2117348105.png" style="width: 67%"></center>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001253542-154200635.png" style="width: 67%"></center>
<p><strong>双击新建的会话,自动连接串口:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001254241-414252874.png" style="width: 80%"></center>
<h5 id="串口-xmodem-协议文件传输">串口 Xmodem 协议文件传输</h5>
<p><strong>串口连接完成后,点击会话属性图标,进入会话设置:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001255041-1978453037.png" style="width: 80%"></center>
<p><strong>会话设置界面选择文件传输,上传协议选择 Xmodem:</strong></p>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001255786-1614500655.png" style="width: 80%"></center>
<p><strong>打开会话界面,直接将要传输的文件拉入终端:</strong></p>
<blockquote>
<p>不知道为什么,我这个传输很慢(大概两分钟),耐心等一下就好。</p>
</blockquote>
<center><img src="https://img2023.cnblogs.com/blog/2638054/202406/2638054-20240619001256830-32607378.png" style="width: 80%"></center><br><br>
来源:https://www.cnblogs.com/YZXE/p/18253333
頁:
[1]