platformio创建项目卡死问题(ctl解决)

文章讲述了在VSCode中安装PlatformIO后,遇到项目创建无限循环的问题,通过在终端使用ctl并配置代理解决。作者分享了从官网获取ctl脚本、安装所需工具、指定开发板ID创建项目的过程,以及识别问题源于IDE默认不走代理导致的网络问题。
摘要由CSDN通过智能技术生成

vscode上安装完platformio后,创建一个新项目,始终在转圈,查阅官网文档后发现可以使用ctl在终端中创建项目,本文方案的前提是终端走了代理。

根据官网命令安装ctl:

curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py

注意,我使用的linux环境。

安装完后运行pio boards查找开发板信息

例如:

❯ pio boards c52rc

Platform: intel_mcs51

ID MCU Frequency Flash RAM Name


STC89C52RC STC89C52RC 11MHz 8KB 512B Generic STC89C52RC

此时创建一个项目文件夹,然后告知pio开发板id即可创建目录。

❯ mkdir learn
❯ cd learn
❯ pio project init --board STC89C52RC
The following files/directories have been created in /home/vscode/sdcc/learn
include - Put project header files here
lib - Put project specific (private) libraries here
src - Put project source files here
platformio.ini - Project Configuration File
Resolving STC89C52RC dependencies…
Tool Manager: Installing platformio/toolchain-sdcc @ >=1.40100.0,<1.40401.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: toolchain-sdcc@1.40100.12072 has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40700.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: tool-scons@4.40700.0 has been installed!
Already up-to-date.
Project has been successfully initialized!

整个下载过程耗时不到5s.此时在platform页面创建也能秒进,应该是这个ide默认不会走代理,导致第一次初始化项目由于网络问题卡死。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

湿物男

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

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

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

打赏作者

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

抵扣说明:

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

余额充值