AVR Option -H must not be defined more than once: -H1895 【已解决】

在使用IAR for AVR 5.40 做mega128的开发时,编译出现如下提示

原因分析:

-H 在AVR编译器中设置过一次,在option文件中也设置过,造成冲突。

如下options文件中内容

/* Fill unused interrupt vector's with RETI */
-H1895
-h(CODE)0-_..X_INTVEC_SIZE

解决办法

在general Options中去掉 "Initialize unused interruupt vectors with RETI instruction",如下

原文地址:https://www.cnblogs.com/aqing1987/p/4281672.html