当前位置:网站首页>SimpleFOC+PlatformIO踩坑之路
SimpleFOC+PlatformIO踩坑之路
2022-07-29 05:23:00 【BobBobBao】
背景
最近一直在用simpleFOC做BLDC电机驱动开发,simpleFOC是一个开源库,基于Arduino平台的,其底层调用了很多arduino的函数。但是ArduinoIDE的编译速度实在是太慢了,动不动就是十几分钟。网上查找发现了一个可以完全替代ArduinoIDE软件,platformIO.具体安装使用可以参考官方文档:
问题总结
问题1: 测试BLDC_Driver_6PWM例程时,platformIO下载后无反应,同样的程序Arduino下载后正常
解决: 在platformio.ini启动文件中添加:lib_archive = false
问题2: 在VScode中关闭后再打开的工程,在platformIO中无法编译下载。
解决: 在platformIO–>Home页面中,点击打开工程,重新把工程加载到platformIO的工作环境中
**问题3:**第一次使用board时,会自动下载一些关联文档,下载时报错;但是下载好了,之后使用都正常
**解决:**因为PC上开了VPN,关闭VPN。等依赖库下载完成后,再打开VPN就不会报错了。
其它
platformIO是在VSCode基础上的一个扩展插件。使用时很方便,代码跟ArduinoIDE完全兼容,特别注意的是需要配置启动文件,很多地方调试出问题都是启动文件设置的问题。这里放一个示例:
[env:bluepill_f103c8_128k]
platform = ststm32
board = bluepill_f103c8_128k
framework = arduino
debug_tool = stlink
upload_protocol = stlink
lib_deps = askuric/Simple FOC @ ^2.2.2
lib_archive = false
monitor_speed = 115200
build_flags =
-D PIO_FRAMEWORK_ARDUINO_SERIAL_DISABLED
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
边栏推荐
猜你喜欢

新能源充电桩后台管理系统平台

基于FPGA:多目标运动检测(手把手教学①)

Migration learning notes - adaptive component analysis

HAL库学习笔记-14 ADC和DAC

ABSA1: Attentional Encoder Network for Targeted Sentiment Classification

迁移学习—Geodesic Flow Kernel for Unsupervised Domain Adaptation

Typical cases of xdfs & China Daily Online Collaborative Editing Platform

Transfer feature learning with joint distribution adaptation

ML16 neural network (2)

入门到入魂:单片机如何利用TB6600高精度控制步进电机(42/57)
随机推荐
Chongqing Avenue cloud bank, as a representative of the software industry, was invited to participate in the signing ceremony of key projects in Yuzhong District
4、 Application of one hot and loss function
Low rank transfer subspace learning
Migration learning notes - adaptive component analysis
QT学习笔记-Excel的导入导出
Transfer joint matching for unsupervised domain adaptation
Migration learning - geodesic flow kernel for unsupervised domain adaptation
2022春招——芯动科技FPGA岗技术面(一面心得)
ML11-SKlearn实现支持向量机
2.4G频段的无线收发芯片 SI24R1 问题汇总解答
PHY6252是一款超低功耗物联网蓝牙无线通信芯片
零基础学FPGA(五):时序逻辑电路设计之计数器(附有呼吸灯实验、简单组合逻辑设计介绍)
HAL库学习笔记-10 HAL库外设驱动框架概述
Transfer feature learning with joint distribution adaptation
基于F407ZGT6的WS2812B彩灯驱动
HAL学习笔记 - 7 定时器之高级定时器
ML16-神经网络(2)
Wechat applet source code acquisition (download with tools)
Error importing Spacy module - oserror: [e941] can't find model 'en'
迁移学习—Geodesic Flow Kernel for Unsupervised Domain Adaptation