首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >shiftPWM和ATTiny85出错

shiftPWM和ATTiny85出错
EN

Stack Overflow用户
提问于 2015-12-17 05:25:45
回答 1查看 315关注 0票数 0

我在这一点上迷路了,感谢任何人的帮助!我从一个旧的GitHub下载了这个库,但我甚至不会编译它。

代码语言:javascript
复制
Arduino: 1.6.6 Hourly Build 2015/10/14 10:42 (Windows 8.1), Board: "ATtiny 

x5 series, ATtiny85, 8 mhz (internal), B.O.D. Disabled"

Warning: platform.txt from core 'Arduino SAMD (32-bits ARM Cortex-M0+) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'ATtiny Classic' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
In file included from C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/ShiftPWM.h:25:0,

                 from C:\Users\Luke Bouchard\Documents\Arduino\test\test.ino:13:

C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/pins_arduino_compile_time.h:318:3: error: 'PORTC' was not declared in this scope

  &PORTC,

   ^

C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/pins_arduino_compile_time.h:319:3: error: 'PORTD' was not declared in this scope

  &PORTD,

   ^

exit status 1
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
EN

回答 1

Stack Overflow用户

发布于 2015-12-17 06:25:22

看起来您的库不支持ATTINY85芯片。

为了使代码与ATTINY兼容,我必须对库进行以下更改...

  • 减小代码大小以适应ATTINY有限的闪存空间。
  • 消除了对SPI和串行硬件的所有依赖,因为ATTINY没有它们。
  • 将现有的Timer0中断用于刷新触发器,因为ATTINY的定时器较少。
  • 为ATTINY定义管脚和设备映射。

我还做了一些美观的更改,比如在编译时静态分配缓冲区,因为如果没有串行连接,就无法看到“内存不足”错误。

叉子就在这里。https://github.com/bigjosh/ShiftPWM-Redux

自述文件包含有关将代码从旧库迁移到新库(不难)的必要更改的信息。fork中的示例也进行了更新,以使用新的库,因此是一个很好的起点。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34322406

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档