avr-objcopy.exe - 在 arduino IDE(Win8.1.1 Pro 64 位)中编译时出现应用程序错误

avr-objcopy.exe - 在 arduino IDE(Win8.1.1 Pro 64 位)中编译时出现应用程序错误

当我单击编译时,我得到了这个:

“avr-objcopy.exe-应用程序错误

0x0044c2e5 处的指令引用了 0x0044c2e5 处的内存。无法写入该内存。

单击“确定”终止该程序。”

紧接着是这个:

“WerFault.exe-应用程序错误

0x67272a49 处的指令引用了 0x00000001 处的内存。无法写入该内存。

单击“确定”终止该程序。”

是什么原因造成的?我该如何修复?我真的需要编译此代码,这是我弟弟的生日礼物。有问题的代码是:

//**************************************************
//
// Test of playtune library for Arduino NANO
//
// L. Shustek, 31 Jan 2011, initial release.
// L. Shustek, 27 Feb 2011, new score data
//
//**************************************************


#include <Playtune.h    

// Playtune bytestream for file "happy_birthday.mid" created by MIDITONES V1.6 on Mon Aug  4 08:55:29 2014
// command line: miditonesV1.6.exe -t3 happy_birthday 
byte PROGMEM score [] = {
// Happy Birthday
4,176, 0x90,60, 1,194, 0x80, 0x90,60, 0,150, 0x91,41, 0x80, 0x90,62, 2,88, 0x92,53, 0x80, 
0x90,57, 2,88, 0x80, 0x82, 0x90,65, 0x92,53, 2,88, 0x80, 0x81, 0x82, 0x90,64, 0x91,48, 2,88, 
0x92,52, 2,88, 0x80, 0x90,60, 1,194, 0x80, 0x90,60, 0,150, 0x81, 0x82, 0x80, 0x90,36, 0x91,62, 
2,88, 0x92,52, 0x81, 0x91,58, 2,88, 0x81, 0x82, 0x91,67, 0x92,52, 2,88, 0x81, 0x80, 0x82, 0x90,65, 
0x91,41, 2,88, 0x92,53, 2,88, 0x80, 0x90,60, 1,194, 0x80, 0x90,60, 0,150, 0x81, 0x82, 0x80, 
0x90,41, 0x91,72, 2,88, 0x92,53, 0x81, 0x91,57, 2,88, 0x81, 0x82, 0x91,65, 0x92,53, 2,88, 
0x81, 0x80, 0x82, 0x90,64, 0x91,48, 2,88, 0x80, 0x81, 0x90,62, 0x91,50, 0x92,53, 2,13, 1,212, 
0x80, 0x90,70, 1,194, 0x80, 0x90,70, 0,75, 1,212, 0x80, 0x82, 0x81, 0x90,69, 0x91,41, 2,88, 
0x80, 0x90,53, 0x92,65, 2,88, 0x82, 0x81, 0x80, 0x90,67, 0x91,52, 0x92,58, 2,88, 0x80, 0x82, 0x81, 
0x90,65, 0x91,53, 0x92,57, 7,8, 0x80, 0x82, 0x81, 0xf0};
// This score contains 201 bytes, and 3 tone generators are used.
// 24 notes had to be skipped.



Playtune pt;

void setup() {

  // Enable all 3 NANO timers for notes that are output on digital pins 10, 11, and 12.
  // Those pins should be wired to 500-ohm resistors, the other ends of which should be connected together
  // to one terminal of an 8-ohm speaker.  The other terminal of the speaker should be connected to ground.  
  // No other hardware is needed!

  pt.tune_initchan (10); 
  pt.tune_initchan (11);
  pt.tune_initchan (12);
}

void loop () {
  pt.tune_playscore (score);  /* start playing */
  while (pt.tune_playing) ;   /* wait here until playing stops */
}

答案1

卸载并重新安装 arduino 软件似乎有效

相关内容