Error during uploading" avrdude: stk500_recv(): programmer is not responding"

getting following error msg during Uploading And "L" led continue flashing.

Arduino: 1.8.13 (Windows 7), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\acer\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\acer\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\acer\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\acer\AppData\Local\Temp\arduino_build_564364 -warnings=none -build-cache C:\Users\acer\AppData\Local\Temp\arduino_cache_608920 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Program Files\Arduino\examples\01.Basics\Blink\Blink.ino

C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\acer\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\acer\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\acer\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\acer\AppData\Local\Temp\arduino_build_564364 -warnings=none -build-cache C:\Users\acer\AppData\Local\Temp\arduino_cache_608920 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Program Files\Arduino\examples\01.Basics\Blink\Blink.ino

Using board 'nano' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\sketch\\Blink.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Generating function prototypes...

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\sketch\\Blink.ino.cpp" -o "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"C:\\Program Files\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\sketch\\Blink.ino.cpp" -o "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\sketch\\Blink.ino.cpp.o"

Compiling libraries...

Compiling core...

Using precompiled core: C:\Users\acer\AppData\Local\Temp\arduino_cache_608920\core\core_arduino_avr_nano_cpu_atmega328old_5638c217b04eda8279099c4937887265.a

Linking everything together...

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/Blink.ino.elf" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364\\sketch\\Blink.ino.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/..\\arduino_cache_608920\\core\\core_arduino_avr_nano_cpu_atmega328old_5638c217b04eda8279099c4937887265.a" "-LC:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364" -lm

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/Blink.ino.elf" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/Blink.ino.eep"

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/Blink.ino.elf" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/Blink.ino.hex"

"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_564364/Blink.ino.elf"

Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b57600 -D -Uflash:w:C:\Users\acer\AppData\Local\Temp\arduino_build_564364/Blink.ino.hex:i 

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.



avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM6

         Using Programmer              : arduino

         Overriding Baud Rate          : 57600

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd1

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd1

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd1

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd1

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd1


i also have tried Re-install Arduino IDE setup.
i don't know about programmer error messege. please guide me in simple steps
thank you..

Your problem is very common and answered in the forum thousand times... Please use forum search.

In general - you PC doesn't connect to the board. The most likely causes are wrong port and cable without data lines(charging cable).

  • ensure your board is really a Nano
  • ensure you selected the right port
  • try the other boot loader for the Nano

Cable has been checked.it is working on my camera to pc ..

Board is Nano. Port is right being show in ide. Also have tried other boot loader....

is it an official nano or one with a ch340 chip for the Serial communication? if so, do you have the right driver?

have you tried a different USB cable? different USB port?

There are no simple steps :wink:

Could you upload in the past?
What is the project that you're working on when it started failing?
Anything connected to pins 0 and/or 1?

If that is one second on / one off, it's the blink sketch that comes preloaded from the factory.

It is ch340.
LED flashing faster.
I tried another Nano board( for blink example) . That is also giving same error.
No issue of data cable. Also tried another port.
.
I tried Teensy LC board (for blink example) on same Port. It successfully uploaded code. And running fine.
"If about drivers " --- I upload many built-in examples codes before one week. There was no problem.
The problem appeared perhaps when I tried code in this Post

so do you have that driver installed?

so you double posted on that issue. that's bad... You were told the code is not the problem, the problem is with the upload.

May be you damaged something. Do you have another board to try out?

Do you try to upload the code without anything connected to 0 & 1 pins, as suggested in that thread?

Code is not being upload toa Arduino nano. Giving following error

Arduino: 1.8.13 (Windows 7), TD: 1.53, Board: "Arduino Nano, ATmega328P (Old Bootloader)"

Sketch uses 18990 bytes (61%) of program storage space. Maximum is 30720 bytes.

Global variables use 939 bytes (45%) of dynamic memory, leaving 1109 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch



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

From following code



#include <Adafruit_SSD1306.h>    //   ok sketch    PIN 6 7 8 ARE FREE NOW
#include <TimerOne.h>
#include <EEPROM.h>
#include <Encoder.h>
#include <MIDI.h>
#include <Keypad.h>

const byte ROWS = 6; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
{1,2,3,4},
{5,6,7,8},
{9,10,11,12},
{13,14,15,16},
{17,18,19,20},
{21,22,23,24}
};
byte rowPins[ROWS] = {8,9,10,11,12,A0}; //connect to the row pinouts of the kpd
byte colPins[COLS] = {4,5,6,7}; //connect to the column pinouts of the kpd
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
String msg;


#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

//  #define LED_PIN1 7 // Tempo LED
//  #define SYNC_OUTPUT_PIN 6 // Audio Sync Digital Pin
//  #define SYNC_OUTPUT_PIN2 8 // 2nd Audio Sync Pin
#define CLOCKS_PER_BEAT 24 // MIDI Clock Ticks
#define AUDIO_SYNC 12 // Audio Sync Ticks
#define AUDIO_SYNC2 12 // 2nd Audio Sync Ticks

#define MINIMUM_BPM 20
#define MAXIMUM_BPM 300

#define BLINK_TIME 4 // LED blink time

unsigned long Mark_A = 0;
unsigned long Mark_B = 0;
unsigned long Gap = 0;
byte Patch = 50;
byte STOP_CUT = 0;
byte SHIFT_UP = 0;
byte SHIFT_DOWN = 0;


volatile int  blinkCount = 0,
              blinkCount2 = 0,
              AudioSyncCount = 0,
              AudioSyncCount2 = 0;

long intervalMicroSeconds,
      bpm,
      audio_sync2;

boolean playing = false,
      sync_editing = false,
      display_update = false;

Encoder myEnc(2, 3); // Rotary Encoder Pin 2,3 

MIDI_CREATE_DEFAULT_INSTANCE();

void sendClockPulse() {    //  -----------------------SEND CLOCK PULSE

  MIDI.sendRealTime(midi::Clock); // sending midi clock 
  if (playing) {  
  blinkCount = (blinkCount + 1) % CLOCKS_PER_BEAT;
  blinkCount2 = (blinkCount2 + 1) % (CLOCKS_PER_BEAT / 2);
  AudioSyncCount = (AudioSyncCount + 1) % AUDIO_SYNC;
  AudioSyncCount2 = (AudioSyncCount2 + 1) % audio_sync2;

  if (AudioSyncCount == 0) {    /*  digitalWrite(SYNC_OUTPUT_PIN, HIGH);  */  } 
  else {          if (AudioSyncCount == 1) {     /*  digitalWrite(SYNC_OUTPUT_PIN, LOW); */  } }  

  if (AudioSyncCount2 == 0) {  /* digitalWrite(SYNC_OUTPUT_PIN2, HIGH);  */ } 
  else {          if (AudioSyncCount2 == 1) {  /* digitalWrite(SYNC_OUTPUT_PIN2, LOW); */  }  }
  
  if (blinkCount == 0) {  /*  digitalWrite(LED_PIN1, HIGH);  */  }
  else {    if (blinkCount == BLINK_TIME) {  /* digitalWrite(LED_PIN1, LOW); */  }  }  } // if playing
}      //   ------------------------------SEND CLOCK PULSE
void updateBpm() { // update BPM function (on the fly)
  long interval = 60L * 1000 * 1000 / bpm / CLOCKS_PER_BEAT;  
  Timer1.setPeriod(interval);  }    

void setup(void) {
  MIDI.begin(); // MIDI init
  MIDI.turnThruOff();

  bpm = EEPROMReadInt(0);
  if (bpm > MAXIMUM_BPM || bpm < MINIMUM_BPM) {
    bpm = 120;
  }
  audio_sync2 = EEPROMReadInt(3);
  if (audio_sync2 > 64 || audio_sync2 < 2) {
    audio_sync2 = 12;
  }
   
  Timer1.initialize(intervalMicroSeconds);
  Timer1.setPeriod(60L * 1000 * 1000 / bpm / CLOCKS_PER_BEAT);
  Timer1.attachInterrupt(sendClockPulse);  
  
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.setTextColor(WHITE);  
  display.setTextSize(4);
  display.setCursor(0,0);
  display.print(bpm);
  display.display();
}

void EEPROMWriteInt(int p_address, int p_value)
     {
     byte lowByte = ((p_value >> 0) & 0xFF);
     byte highByte = ((p_value >> 8) & 0xFF);
     EEPROM.write(p_address, lowByte);
     EEPROM.write(p_address + 1, highByte);
     }

unsigned int EEPROMReadInt(int p_address)
     {
     byte lowByte = EEPROM.read(p_address);
     byte highByte = EEPROM.read(p_address + 1);
     return ((lowByte << 0) & 0xFF) + ((highByte << 8) & 0xFF00);
}

void bpm_display() { 
  updateBpm();
  EEPROMWriteInt(0,bpm);  
  display.setTextSize(4);
  display.setCursor(0,0);  
  display.setTextColor(WHITE, BLACK);
  display.print("     ");
  display.setCursor(0,0);
  display.print(bpm);
  display.display();
  display_update = false;
}

void sync_display() {
  EEPROMWriteInt(3,audio_sync2);
  
  int sync_current;
  sync_current = audio_sync2 - 12;  
  
  if (sync_current < 0) {    
    sync_current = abs(sync_current);
  } else if (sync_current > 0) {
    sync_current = -sync_current;
  }
    
  display.setTextSize(4);
  display.setCursor(0,0);
  display.setTextColor(WHITE, BLACK);
  display.print("     ");  
  display.setCursor(0,0);
  display.print(sync_current);
  display.display();
}

void startOrStop() {
  if (!playing) {
    MIDI.sendRealTime(midi::Start);
  } else {
  //    all_off();
    MIDI.sendRealTime(midi::Stop);
  }
  playing = !playing;
}

int oldPosition;

void loop(void) {      //___________________ LOOP START ___________________LOOP START _______________________ LOOP START ______________________________

  byte i = 0;
  byte p = 0;

  
  int newPosition = (myEnc.read()/4);
  if (newPosition != oldPosition) {    
    if (oldPosition < newPosition) {   i = 2;  } 
    else if (oldPosition > newPosition) {   i = 1;  }
    oldPosition = newPosition; }
  
  if (!sync_editing) {      
      if (i == 2) {     bpm++;      if (bpm > MAXIMUM_BPM) {     bpm = MAXIMUM_BPM;  }   bpm_display();     } 
  else if (i == 1) {     bpm--;     if (bpm < MINIMUM_BPM) {     bpm = MINIMUM_BPM;  }     bpm_display();   } 
  else if (p == 1) {    sync_display();    sync_editing = true;     }          //rotary.resetPush();


  } else  { // 2nd jack audio sync speed
           if (p == 1) {            bpm_display();     sync_editing = false;    }
      else if (i == 1) {       audio_sync2++;    if (audio_sync2 > 64)   { audio_sync2 = 64; }     sync_display();    }
      else if (i == 2) {       audio_sync2--;    if (audio_sync2 < 2)    { audio_sync2 = 2;  }     sync_display();    }      
  }


    if (kpd.getKeys())     //     _________________KEYPAD ___________________________KEYPAD___________________________________________________
    {     for (int i=0; i<LIST_MAX; i++)       {     byte mykey = kpd.key[i].kchar ;

            if (( kpd.key[i].stateChanged )  &&  (mykey == 1))  // -------------------KEY_1----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn(60 ,127 ,1 );  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff(60 ,0 ,1 );   //  
                break;
                }   } //  --------------------------------------------------------------------------------------------------------------------
                            if (( kpd.key[i].stateChanged )  &&  (mykey == 2))  // -------------------KEY_2----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn(61 ,127,1 );  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 61, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                            if (( kpd.key[i].stateChanged )  &&  (mykey == 3))  // -------------------KEY_3----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 62, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 62, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                            if (( kpd.key[i].stateChanged )  &&  (mykey == 4))  // -------------------KEY_4----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 63, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 63, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                            if (( kpd.key[i].stateChanged )  &&  (mykey == 5))  // -------------------KEY_5----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 64, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 64, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                            if (( kpd.key[i].stateChanged )  &&  (mykey == 6))  // -------------------KEY_6----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 65, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 65, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                            if (( kpd.key[i].stateChanged )  &&  (mykey == 7))  // -------------------KEY_7----------------------------
             {      switch (kpd.key[i].kstate) { 
                    case PRESSED:
                    MIDI.sendNoteOn( 66, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
            {      switch (kpd.key[i].kstate) {  
                 case RELEASED:
                    MIDI.sendNoteOff( 66, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 8))  // -------------------KEY_8----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 67, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 67, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 9))  // -------------------KEY_9----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 68, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 68, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 10))  // -------------------KEY_10----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    STOP_CUT = 1;
                break;
                 case RELEASED:
                    STOP_CUT = 0; 
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 11))  // -------------------KEY_11----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    MIDI.sendNoteOn( 69, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal) ________TRIG-1
                     if (STOP_CUT ==1) {       
                      MIDI.sendControlChange(123,0,1);  
                      MIDI.sendRealTime(midi::Stop);  
                      MIDI.sendNoteOn( 69, 127, 1);   }
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 69, 0, 1);   //  
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 12))  // -------------------KEY_12----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:                              //   TRIG 2 
                    MIDI.sendNoteOn( 70, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)  _________TRIG-2
                    if (STOP_CUT ==1) {       
                      MIDI.sendControlChange(123,0,1);  
                      MIDI.sendRealTime(midi::Stop);  
                      MIDI.sendNoteOn( 70, 127, 1);   }
                break;
                 case RELEASED:
                    MIDI.sendNoteOff( 70, 0, 1);   // 
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 13))  // -------------------KEY_13----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                     MIDI.sendNoteOn( 71, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)  _________TRIG-3
                    if (STOP_CUT ==1) {       
                      MIDI.sendControlChange(123,0,1);  
                      MIDI.sendRealTime(midi::Stop);  
                      MIDI.sendNoteOn( 71, 127, 1);   }
                break;
                 case RELEASED:
                        MIDI.sendNoteOff( 71, 0, 1);   //
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 14))  // -------------------KEY_14----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                      MIDI.sendNoteOn( 72, 127, 1);  //   Note=48, velocity=127, channal=1     MIDI.sendNoteOn(Note,Velocity,Channal)  _________TRIG-4
                    if (STOP_CUT ==1) {       
                      MIDI.sendControlChange(123,0,1);  
                      MIDI.sendRealTime(midi::Stop);  
                      MIDI.sendNoteOn( 72, 127, 1);   }
                break;
                 case RELEASED:
                        MIDI.sendNoteOff( 72, 0, 1);   //
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 15))  // -------------------KEY_15----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                       Mark_B = micros();         Gap = Mark_B - Mark_A;       Mark_A = micros();    //  Tempo Taping
                         if (Gap<1000000) { bpm = 60000000/Gap; bpm_display();  }     
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 16))  // -------------------KEY_16----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                     MIDI.sendControlChange(123,0,1);  
                      MIDI.sendRealTime(midi::Stop);  
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 17))  // -------------------KEY_17----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                      Patch++;
                          MIDI.sendProgramChange(Patch, 1); 
                break;
                 case HOLD:
                     SHIFT_UP = 1;
                break;
                 case RELEASED:
                     SHIFT_UP = 0;
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 18))  // -------------------KEY_18----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                    Patch--;
                        MIDI.sendProgramChange(Patch, 1); 
                break;
                 case HOLD:
                     SHIFT_DOWN = 1;
                break;
                 case RELEASED:
                     SHIFT_DOWN = 0;
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 19))  // -------------------KEY_19----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                        MIDI.sendProgramChange(91, 1); 
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 20))  // -------------------KEY_20----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                        MIDI.sendProgramChange(92, 1); 
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 21))  // -------------------KEY_21----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                        MIDI.sendProgramChange(93, 1); 
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 22))  // -------------------KEY_22----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                        MIDI.sendProgramChange(94, 1); 
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey == 23))  // -------------------KEY_23----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                        MIDI.sendProgramChange(95, 1); 
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------
                 if (( kpd.key[i].stateChanged )  &&  (mykey ==24))  // -------------------KEY_24----------------------------
            {      switch (kpd.key[i].kstate) {  
                    case PRESSED:
                        MIDI.sendProgramChange(96, 1); 
                break;
                 case RELEASED:
                     
                break;
                }   } //  ------------------------------------------------------------------------------------------------------------------


                }}  //   __________________KEYPAD END _______________KEYPAD END_____________________________________________________________

  
} }

if (SHIFT_UP ==1)  {     Patch++;    MIDI.sendProgramChange(Patch, 1);  }
if (SHIFT_DOWN ==1)  {      Patch--;    MIDI.sendProgramChange(Patch, 1);  }
}        //___________________ LOOP END ___________________LOOP END_______________________ LOOP END ______________________________________________________________________________________







/*
 
void all_off() { // make sure all sync, led pin stat to low
//  digitalWrite(SYNC_OUTPUT_PIN, LOW);
//  digitalWrite(SYNC_OUTPUT_PIN2, LOW);
//  digitalWrite(LED_PIN1, LOW);
}

void sendClockPulse() {    //  -----------------------SEND CLOCK PULSE

  MIDI.sendRealTime(midi::Clock); // sending midi clock 
  if (playing) {  
  blinkCount = (blinkCount + 1) % CLOCKS_PER_BEAT;
  blinkCount2 = (blinkCount2 + 1) % (CLOCKS_PER_BEAT / 2);
  AudioSyncCount = (AudioSyncCount + 1) % AUDIO_SYNC;
  AudioSyncCount2 = (AudioSyncCount2 + 1) % audio_sync2;

  if (AudioSyncCount == 0) {      digitalWrite(SYNC_OUTPUT_PIN, HIGH);    } 
  else {          if (AudioSyncCount == 1) {       digitalWrite(SYNC_OUTPUT_PIN, LOW);   } }  

  if (AudioSyncCount2 == 0) {   digitalWrite(SYNC_OUTPUT_PIN2, HIGH);   } 
  else {          if (AudioSyncCount2 == 1) {   digitalWrite(SYNC_OUTPUT_PIN2, LOW);   }  }
  
  if (blinkCount == 0) {   digitalWrite(LED_PIN1, HIGH);    }
  else {    if (blinkCount == BLINK_TIME) {   digitalWrite(LED_PIN1, LOW);   }  }  } // if playing
}      //   ------------------------------SEND CLOCK PULSE



void updateBpm() { // update BPM function (on the fly)
  long interval = 60L * 1000 * 1000 / bpm / CLOCKS_PER_BEAT;  
  Timer1.setPeriod(interval);  }    
  
   void Tap  ()  {       //   For Tempo TAP BUtton
      Mark_B = micros();         Gap = Mark_B - Mark_A;       Mark_A = micros();  
   if (Gap<1000000) { bpm = 60000000/Gap; bpm_display();  }
   }
   void BPM_100 ()   {  bpm = 100;  ; bpm_display();    }

    void  START_STOP ()  {   startOrStop(); }  // for START Button

  void MIDI_Functions ()    {
                                           MIDI.sendNoteOn(48 ,127, 1);  //   Note=48, velocity=127, channal=1
                                             MIDI.sendNoteOff(48 ,127, 1);   //  
                                               MIDI.sendControlChange(123,64,1);  // controller number=123, cc_value=64, channal=1
                                               MIDI.sendProgramChange(41, 1);   //     Prog=41,  channal=1

                                                 MIDI.sendRealTime(midi::Clock); // sending midi clock  
                                                   MIDI.sendRealTime(midi::Start); // sending midi Start 
                                                     MIDI.sendRealTime(midi::Stop); // sending midi Stop 
                                                    }
                                           */
                                                    

                                                     
   

Please describe here to solve issue

This error related to upload process. It has nothing to do with "global variables and dynamic memory" and with code at all.
First, turn on detail output in IDE preferences and show it in the forum.

You have an upload issue, seems the compilation went fine

I noticed this

Have you tried the « new » bootloader?

Also, follow that suggestion, and report the (more detailed) messages that you get.

Your topic has been moved to the more suitably category, because the question has nothing to do with programming.

Personaly I think that for an upload error it's a silly suggestion. Might be wrong but my advise is always to disable it for upload errors.

thank you all my senior for reply.
as you suggest. ---- "Show verbose output during compilation"
i am getting these messege during uploading

Arduino: 1.8.13 (Windows 7), TD: 1.53, Board: "Arduino Nano, ATmega328P (Old Bootloader)"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\acer\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\acer\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\acer\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\acer\AppData\Local\Temp\arduino_build_292687 -warnings=none -build-cache C:\Users\acer\AppData\Local\Temp\arduino_cache_215479 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\acer\Documents\Arduino\Simplifying__Clock_tempo_code\Simplifying__Clock_tempo_code_2\Simplifying__Clock_tempo_code_2.ino 
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\acer\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\acer\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\acer\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\acer\AppData\Local\Temp\arduino_build_292687 -warnings=none -build-cache C:\Users\acer\AppData\Local\Temp\arduino_cache_215479 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\acer\Documents\Arduino\Simplifying__Clock_tempo_code\Simplifying__Clock_tempo_code_2\Simplifying__Clock_tempo_code_2.ino 
Using board 'nano' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr 
Using core 'arduino' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr 
Detecting libraries used... 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for Adafruit_SSD1306.h: [Adafruit_SSD1306@2.2.0] 
ResolveLibrary(Adafruit_SSD1306.h) 
  -> candidates: [Adafruit_SSD1306@2.2.0] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for Wire.h: [Wire@1.0] 
ResolveLibrary(Wire.h) 
  -> candidates: [Wire@1.0] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for SPI.h: [SPI@1.0] 
ResolveLibrary(SPI.h) 
  -> candidates: [SPI@1.0] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for Adafruit_GFX.h: [Adafruit_GFX_Library@1.7.5] 
ResolveLibrary(Adafruit_GFX.h) 
  -> candidates: [Adafruit_GFX_Library@1.7.5] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for TimerOne.h: [TimerOne@1.1] 
ResolveLibrary(TimerOne.h) 
  -> candidates: [TimerOne@1.1] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for EEPROM.h: [EEPROM@2.0] 
ResolveLibrary(EEPROM.h) 
  -> candidates: [EEPROM@2.0] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for Encoder.h: [Encoder-1.4.2@1.4.2] 
ResolveLibrary(Encoder.h) 
  -> candidates: [Encoder-1.4.2@1.4.2] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Encoder-1.4.2" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for MIDI.h: [MIDI_Library-5.0.2@5.0.2] 
ResolveLibrary(MIDI.h) 
  -> candidates: [MIDI_Library-5.0.2@5.0.2] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Encoder-1.4.2" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\MIDI_Library-5.0.2\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Alternatives for Keypad.h: [Keypad-3.1.1@3.1.1] 
ResolveLibrary(Keypad.h) 
  -> candidates: [Keypad-3.1.1@3.1.1] 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Encoder-1.4.2" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\MIDI_Library-5.0.2\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Keypad-3.1.1\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp 
Using cached library dependencies for file: C:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp 
Using cached library dependencies for file: C:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c 
Using cached library dependencies for file: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI\src\SPI.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Adafruit_GFX_Library\glcdfont.c 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\TimerOne\TimerOne.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Encoder-1.4.2\Encoder.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\MIDI_Library-5.0.2\src\MIDI.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Keypad-3.1.1\src\Key.cpp 
Using cached library dependencies for file: C:\Users\acer\Documents\Arduino\libraries\Keypad-3.1.1\src\Keypad.cpp 
Generating function prototypes... 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Encoder-1.4.2" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\MIDI_Library-5.0.2\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Keypad-3.1.1\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE 
"C:\\Program Files\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\preproc\\ctags_target_for_gcc_minus_e.cpp" 
Compiling sketch... 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_SSD1306" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\TimerOne" "-IC:\\Program Files\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Encoder-1.4.2" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\MIDI_Library-5.0.2\\src" "-IC:\\Users\\acer\\Documents\\Arduino\\libraries\\Keypad-3.1.1\\src" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp" -o "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp.o" 
Compiling libraries... 
Compiling library "Adafruit_SSD1306" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp.o 
Compiling library "Wire" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Wire\Wire.cpp.o 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Wire\utility\twi.c.o 
Compiling library "SPI" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\SPI\SPI.cpp.o 
Compiling library "Adafruit_GFX_Library" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Adafruit_GFX_Library\glcdfont.c.o 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp.o 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp.o 
Compiling library "TimerOne" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\TimerOne\TimerOne.cpp.o 
Compiling library "EEPROM" 
Compiling library "Encoder-1.4.2" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Encoder-1.4.2\Encoder.cpp.o 
Compiling library "MIDI_Library-5.0.2" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\MIDI_Library-5.0.2\MIDI.cpp.o 
Compiling library "Keypad-3.1.1" 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Keypad-3.1.1\Keypad.cpp.o 
Using previously compiled file: C:\Users\acer\AppData\Local\Temp\arduino_build_292687\libraries\Keypad-3.1.1\Key.cpp.o 
Compiling core... 
Using precompiled core: C:\Users\acer\AppData\Local\Temp\arduino_cache_215479\core\core_arduino_avr_nano_cpu_atmega328old_5638c217b04eda8279099c4937887265.a 
Linking everything together... 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.elf" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\sketch\\Simplifying__Clock_tempo_code_2.ino.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Adafruit_SSD1306\\Adafruit_SSD1306.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Adafruit_GFX_Library\\glcdfont.c.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Adafruit_GFX_Library\\Adafruit_GFX.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Adafruit_GFX_Library\\Adafruit_SPITFT.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\TimerOne\\TimerOne.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Encoder-1.4.2\\Encoder.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\MIDI_Library-5.0.2\\MIDI.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Keypad-3.1.1\\Key.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687\\libraries\\Keypad-3.1.1\\Keypad.cpp.o" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/..\\arduino_cache_215479\\core\\core_arduino_avr_nano_cpu_atmega328old_5638c217b04eda8279099c4937887265.a" "-LC:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687" -lm 
avrdude: stk500_recv(): programmer is not responding 
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xb9 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.elf" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.eep" 
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.elf" "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.hex" 
Using library Adafruit_SSD1306 at version 2.2.0 in folder: C:\Users\acer\Documents\Arduino\libraries\Adafruit_SSD1306  
Using library Wire at version 1.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire  
Using library SPI at version 1.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI  
Using library Adafruit_GFX_Library at version 1.7.5 in folder: C:\Users\acer\Documents\Arduino\libraries\Adafruit_GFX_Library  
Using library TimerOne at version 1.1 in folder: C:\Users\acer\Documents\Arduino\libraries\TimerOne  
Using library EEPROM at version 2.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\EEPROM  
Using library Encoder-1.4.2 at version 1.4.2 in folder: C:\Users\acer\Documents\Arduino\libraries\Encoder-1.4.2  
Using library MIDI_Library-5.0.2 at version 5.0.2 in folder: C:\Users\acer\Documents\Arduino\libraries\MIDI_Library-5.0.2  
Using library Keypad-3.1.1 at version 3.1.1 in folder: C:\Users\acer\Documents\Arduino\libraries\Keypad-3.1.1  
"C:\\Program Files\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\acer\\AppData\\Local\\Temp\\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.elf" 
Sketch uses 18990 bytes (61%) of program storage space. Maximum is 30720 bytes. 
Global variables use 939 bytes (45%) of dynamic memory, leaving 1109 bytes for local variables. Maximum is 2048 bytes. 
C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b57600 -D -Uflash:w:C:\Users\acer\AppData\Local\Temp\arduino_build_292687/Simplifying__Clock_tempo_code_2.ino.hex:i  
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. 
 
avrdude: Version 6.3-20190619 
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ 
         Copyright (c) 2007-2014 Joerg Wunsch 
 
         System wide configuration file is "C:\Users\acer\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" 
 
         Using Port                    : COM6 
         Using Programmer              : arduino 
         Overriding Baud Rate          : 57600 
avrdude: stk500_recv(): programmer is not responding 
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xb3 

today i am getting same messege also during upload my previous sketches.which was working fine before 6 monthes. And now led on my nano board also being flashing continously.
as you look at above detailed error msg , what should i do next to solve it.......

How your midi hardware is connected?
Please provide the schematic with designating the pin numbers

Wiring is same as It

But error coming during uploading.

Is there any file missing in windows directory???

Try with nothing connected anything to pins 0 and 1