Instantcontiki 3.0中的Cooja hello-world-example.csc模拟器给出了错误提示:尝试在boot.h中使用中毒的“ SPMCR”

时间:2019-07-20 11:05:59

标签: contiki cooja

在Instantcontiki3.0 ubuntu内部,使用命令启动cooja模拟器来启动cooja模拟器。

蚂蚁奔跑

从文件夹/ home / user / contiki / tools / cooja

使用以下步骤从cooja模拟器启动地狱世界模拟时,看到以下错误。

“文件->打开模拟-> 2 cooja_helloworld.csc”->选择hello-world-example.csc->打开

在../../cpu/avr/dev/flash.c:4:0中包含的文件中: /usr/lib/avr/include/avr/boot.h:128:16:错误:尝试使用中毒的“ SPMCR”

 #elif defined (SPMCR)
                ^

制造商:*** [obj_micaz / flash.o]错误1

instantcontiki3.0中的以下代码已损坏

/* Check for SPM Control Register in processor. */
#if defined (SPMCSR)
    #  define __SPM_REG    SPMCSR
#elif defined (SPMCR)
    #  define __SPM_REG    SPMCR
#else
    #  error AVR processor does not provide bootloader support!
#endif

1 个答案:

答案 0 :(得分:0)

更改以下代码

/* Check for SPM Control Register in processor. */
#if defined (SPMCSR)
#  define __SPM_REG    SPMCSR
#elif defined (SPMCR)
#  define __SPM_REG    SPMCR
#else
#  error AVR processor does not provide bootloader support!
#endif

/* Check for SPM Control Register in processor. */
#if defined (SPMCSR)
#  define __SPM_REG    SPMCSR
//#elif defined (SPMCR)
//#  define __SPM_REG    SPMCR
#else
//#  error AVR processor does not provide bootloader support!
#  if defined (SPMCR)
#    define __SPM_REG    SPMCR
#  else
#    error AVR processor does not provide bootloader support!
#  endif 
#endif

在/usr/lib/avr/include/avr/boot.h内部