尝试通过Eclipse

编程入门 行业动态 更新时间:2024-10-26 14:34:51
尝试通过Eclipse-AVR使用Arduino的HardwareSerial(Trying to use Arduino's HardwareSerial via Eclipse-AVR)

我正在尝试移植现在随Arduino 1.0 IDE一起提供的硬件串行库。 我正在编译ATMega2560处理器并使用一个简单的“Hello World”示例测试Arduino USART库“HardwareSerial”,但我留下了这个奇怪的声音错误。

它告诉我,我是: attempt[ing] to use poisoned "SIG_USART0_RECV" ......我以前从未听说过这样的错误。 我试图找出它的定义,eclipse给了我这个:

#define SIG_USART0_RECV _VECTOR(25) ,它位于iomxx0_1.h 。

然后从那里_VECTOR(n)通过#define _VECTOR(N) __vector_ ## N重定向到__vector_25 。 但那些是在系统路径中,我认为它们仍然有效,因为当前的Arduino库仍然使用它们。

为什么他们会毒害自己的定义? 在尝试编译项目之前,是否需要声明其他内容?


编辑:

我在iomxx0_1.h发现了毒药,说明: #pragma GCC poison SIG_USART0_RECV 。 那他们为什么要毒害这个呢?

I am trying to port over the Hardware Serial library that now comes with the Arduino 1.0 IDE. I am compiling on a ATMega2560 processor and testing the Arduino USART library "HardwareSerial" with a simple "Hello World" example, but I am left with this strange sounding error.

It tells me that I am: attempt[ing] to use poisoned "SIG_USART0_RECV"... I have never heard of such an error before. I tried to find out what it was defined to and eclipse gave me this:

#define SIG_USART0_RECV _VECTOR(25) which was found in iomxx0_1.h.

Then from there _VECTOR(n) redirected to __vector_25 via #define _VECTOR(N) __vector_ ## N. But those are in system paths, and I assume they are still valid since the current Arduino libraries still uses them.

Why would they poison their own defines? Do I need to declare something else before I try compiling the project?


Edit:

I found the poison in iomxx0_1.h stating: #pragma GCC poison SIG_USART0_RECV. So why would they poison this?

最满意答案

几年前,SIG_xx中断向量已被弃用。 您可以在以下位置查看更新列表:

AVR-GCC手动在线中断向量

The SIG_xx interrupt vectors were deprecated several years ago. You can see an updated list at:

AVR-GCC Manual Online-Interrupt Vectors

更多推荐

本文发布于:2023-08-07 15:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464717.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Eclipse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!