Arduino Micro doesn't load new sketch.

Hi,

It worked ok, but when I loaded sketch below It stopped to receve new sketches.
When I open port monitor I see that board works (it sends data to serial port)!
But when I try to load new sketch arduino blinks leds 2 times, I hear sound on my computer (like usb device off)
then it waits for a long time saying loading…
I tried to use another computer - the same.
I disconnected all the wires from arduino (external sensors) - the same.
I installed 1.5 4 - the same.
My arduino program sees the port. And as I said before I can minitor the port and it works.
Does anybody know how to fix the problem?
Thanks.

void setup()
{

Serial.begin(9600);
}

#define DEPTH 1000
int x[DEPTH];
int xcount=0;

void loop()
{

for (int i=1;i<DEPTH;i++)
{
x = x[i-1];

  • }*

  • x[0] = analogRead(A2);*

  • double xsum = 0;*

  • for (int i=0;i<DEPTH;i++)*

  • {*
    _ xsum += x*;_
    _
    }*_

* xsum = (double) xsum / DEPTH;*

* Serial.println(xsum);*

}

I did it!
I made ISP programmer using arduino Mega and load new bootloader to it.

It seems that my sketch broke arduino due to too much static array!
Hey, arduino developers, it’s a bug, isn’t it?

Best regards,
Fhlebyj