Arduino micro bricked?

So, I was testing one of my brand new Pololu Astar micro (Pololu - A-Star 32U4 Micro) with an example of an ArduinnoJson Libary. But after making a change in the code, I uploaded the sketch and puf de device disappeared. no com port available after the upload.

this is the code that worked:

#include <ArduinoJson.h>

void setup() {
  Serial.begin(9600);
  while (!Serial) {
    // wait serial port initialization
  }

  // Memory pool for JSON object tree.
  //
  // Inside the brackets, 200 is the size of the pool in bytes,
  // If the JSON object is more complex, you need to increase that value.
  // See https://bblanchon.github.io/ArduinoJson/assistant/


  StaticJsonBuffer<200> jsonBuffer;



  // StaticJsonBuffer allocates memory on the stack, it can be
  // replaced by DynamicJsonBuffer which allocates in the heap.
  //
  // DynamicJsonBuffer  jsonBuffer(200);

  // JSON input string.



  char json[] =
      "{\"cartao\":\"12\",\"processo\":\"a35395\",\"password\":\"lol\",\"autorizadobecre\":\"false\",\"estatuto\":\"aluno\"}";




  // Root of the object tree.
  //
  // It's a reference to the JsonObject, the actual bytes are inside the
  // JsonBuffer with all the other nodes of the object tree.
  // Memory is freed when jsonBuffer goes out of scope.
  JsonObject& root = jsonBuffer.parseObject(json);

  // Test if parsing succeeds.
  if (!root.success()) {
    Serial.println("parseObject() failed");
    return;
  }

  // Fetch values.
  //
  // Most of the time, you can rely on the implicit casts.
  // In other case, you can do root["time"].as<long>();
  const char* sensor = root["cartao"];
  const char* sensor1 = root["processo"];
  const char* sensor2 = root["passwordor"];
  const char* sensor3 = root["autorizadobecre"];
  const char* sensor4 = root["estatuto"];
  

  // Print values.
   Serial.println(sensor);
   Serial.println(sensor1);
   Serial.println(sensor2); 
   Serial.println(sensor3);
   Serial.println(sensor4);

}

void loop() {
  // not used in this example
}

This was working fine. But i needed to input a bigger string so i changed

  StaticJsonBuffer<200> jsonBuffer;

To this:

  StaticJsonBuffer<2000> jsonBuffer;

As soon as the upload finished the board disappeared from com ports and device manager. Now it displays like:

I tried to install the drivers again reinstall everything reboot … nothing worked.
Tested on other arduino micro and it did the same, after the sketch it bricked. On an arduino uno the device does not brick but my modification makes the program crash.

At the moment i just wanna fix the arduinos… they werent cheap and i really need them. Please help me.

Program the UNO with the ArduinoISP sketch, make the appropriate ICSP connections to the Micros, select "Arduino as ISP" in the programmer menu, then burn bootloader.

You uploaded code that rubs out of ram and hoses the usb

After reset t he arduino will be visible for a short time. Time pressint reset while trying to upload blink

The micro’s funny like that. Have to press the reset during upload while rubbing your tummy clockwise and patting your head. Don’t worry, you’ll get it fixed eventually.

Hey guys. Thank you for the reply. My arduino does not have a rest button how can I do that? The device does not appear at boot as an arduino. I already tried to burn the bootloader but it gives an error. Maybe I'm doing the connections wrong? How do u suggest me to connect it? I'm using the configuration indicated in the is sketch. Pin 11 12 13 etc... Gives me not in sync error.

Add a reset button between RST and GND. Tap the reset button and then upload the blink sketch. You may need to try several times to get the timing right, because it will be visible to the PC over USB for only a few seconds after reset.

Solved!!!!! Thank you.