gpt4 book ai didi

c - PlatformIO 中的 avr-gcc 与 Arduino

转载 作者:太空狗 更新时间:2023-10-29 16:01:03 26 4
gpt4 key购买 nike

我正在使用 PlatformIO 作为 AVR MCU 编程的 IDE。我正在开始 AVR 编程(我有 C/C++ 背景和在操作系统上编程,而不是嵌入式,尽管我过去做过一些 Arduino 的东西)并使用 PlatformIO 为寄存器/引脚提供代码完成,这就是为什么我用它。

看来我无法在不丢失代码完成的情况下将框架从 Arduino 切换到 PlatformIO 中的 avr-gcc。

I am wondering if there's any drawbacks in keeping Arduino as theframework?

我知道 Arduino 在后面使用 avr-gcc,但我读到它仍然在用户不知情的情况下进行了一些设置(例如延迟的 Timer0 设置,这是我需要的,因为我将它用作时钟我的 ATTiny85 上 USI 的来源)。

Otherwise, is there anyway in PlatformIO to keep code completion anduse avr-gcc instead of Arduino?

谢谢!

编辑:我在 OSX 或 linux (ubuntu) 上。

最佳答案

正如 ivankravets 在 PlatformIO 上指出的那样社区平台(参见:https://community.platformio.org/t/avr-programming-without-arduino-framework/525/4),只需从 platformio.ini 文件中删除行 framework = arduino 即可摆脱 Arduino 框架并开始工作在裸 C 中用于 avr-gcc。

关于c - PlatformIO 中的 avr-gcc 与 Arduino,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38483311/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com