Linux系统中源码安装Arduino IDE

本文内容参考:

Ubuntu22.04安装Arduino IDE及Arduino UNO(使用CH341驱动)调试方法__KILLMILEDC_的博客-CSDN博客

在Linux上下载arduino_不说话的白帽子的博客-CSDN博客

https://guoqing.blog.csdn.net/article/details/88913063?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-88913063-blog-117020864.235%5Ev36%5Epc_relevant_default_base3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-88913063-blog-117020864.235%5Ev36%5Epc_relevant_default_base3&utm_relevant_index=2

一、下载Arduino IDE安装包

1. 进入官方下载页

首先通过浏览器进入Software | Arduino。页面如下所示:

2. 选择下载版本

选择以上页面中的“Linux ZIP file 64 bits (X86-64)”。点击之后进入以下页面:

点击“JUST DOWNLOAD” 进行下载(大小为208MB,需要一定时间)。下载完成后的文件名称为arduino-ide_2.1.0_Linux_64bit.zip,将其放置到自行指定的路径。

3. 解压源码包

运行unzip命令解压源码包。实际命令及结果如下所示:

$ unzip arduino-ide_2.1.0_Linux_64bit.zip
……
inflating: resources/app/plugins/vscode-language-pack-zh-hans/extension/translations/extensions/vscode.vscode-theme-seti.i18n.json  
  inflating: resources/app/plugins/vscode-language-pack-zh-hans/extension/translations/extensions/vscode.xml.i18n.json  
  inflating: resources/app/plugins/vscode-language-pack-zh-hans/extension/translations/extensions/vscode.yaml.i18n.json  
  inflating: resources/app/plugins/vscode-language-pack-zh-hans/extension/translations/extensions/xml.i18n.json  
  inflating: resources/app/plugins/vscode-language-pack-zh-hans/extension/translations/extensions/yaml.i18n.json  
  inflating: resources/app/plugins/vscode-language-pack-zh-hans/extension/translations/main.i18n.json  
   creating: resources/app/scripts/
  inflating: resources/app/scripts/arduino-ide-electron-main.js  
  inflating: resources/app/scripts/notarize.js  
   creating: resources/app/src-gen/
   creating: resources/app/src-gen/backend/
  inflating: resources/app/src-gen/backend/main.js  
  inflating: resources/app/src-gen/backend/server.js  
   creating: resources/app/src-gen/frontend/
  inflating: resources/app/src-gen/frontend/electron-main.js  
  inflating: resources/app/src-gen/frontend/index.html  
  inflating: resources/app/src-gen/frontend/index.js  
  inflating: resources/app/src-gen/frontend/secondary-index.js  
  inflating: resources/app/src-gen/frontend/secondary-window.html  
  inflating: snapshot_blob.bin       
   creating: swiftshader/
  inflating: swiftshader/libEGL.so   
  inflating: swiftshader/libGLESv2.so  
  inflating: v8_context_snapshot.bin  
  inflating: vk_swiftshader_icd.json  

查看源码内容:

$ ls
arduino-ide                        chrome_100_percent.pak  chrome_crashpad_handler  icudtl.dat  libffmpeg.so  libvk_swiftshader.so  LICENSE.electron.txt    locales    resources.pak      swiftshader              vk_swiftshader_icd.json
chrome_200_percent.pak  chrome-sandbox           libEGL.so   libGLESv2.so  libvulkan.so.1        LICENSES.chromium.html  resources  snapshot_blob.bin  v8_context_snapshot.bin

二、运行Arduino IDE

2.1.0版本不同于1.8.x版本,不需要执行install.sh文件进行安装,而是直接运行源码根目录下的arduino-ide即可。如下所示:

$ ./arduino-ide 
Arduino IDE 2.1.0
Starting backend process. PID: 275747
[275768:0528/020826.677517:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///home/penghao/.theia'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-05-27T18:08:27.186Z root INFO Backend Object.initialize: 3.2 ms [Finished 0.583 s after backend start]
2023-05-27T18:08:27.186Z root INFO Backend Object.configure: 2.5 ms [Finished 0.583 s after backend start]
2023-05-27T18:08:27.186Z root INFO Backend MessagingContribution.onStart: 1.1 ms [Finished 0.583 s after backend start]
2023-05-27T18:08:27.187Z root INFO Backend OSBackendApplicationContribution.configure: 0.3 ms [Finished 0.608 s after backend start]
2023-05-27T18:08:27.187Z root INFO Backend DefaultWorkspaceServer.onStart: 0.3 ms [Finished 0.608 s after backend start]
2023-05-27T18:08:27.188Z root INFO Backend PluginLocalizationBackendContribution.configure: 0.1 ms [Finished 0.608 s after backend start]
2023-05-27T18:08:27.188Z root INFO Backend PluginLocalizationBackendContribution.initialize: 25.2 ms [Finished 0.608 s after backend start]
2023-05-27T18:08:27.188Z root INFO Backend TaskBackendApplicationContribution.onStart: 0.2 ms [Finished 0.608 s after backend start]
2023-05-27T18:08:27.189Z root INFO Backend ElectronTokenBackendContribution.configure: 0.7 ms [Finished 0.609 s after backend start]
2023-05-27T18:08:27.189Z config INFO >>> Initializing CLI configuration...
……

之后主程序启动,界面如下:

过一会进入以下界面:

可以看到,下方的输出窗口正在下载相关组件,下载完成后的界面如下:

这样,Arduino IDE就在笔者的类Debian上跑起来了。

猜你喜欢

转载自blog.csdn.net/phmatthaus/article/details/130907726