Pinoccio / chrome-app-pinoccio

1 stars 4 forks source link

Add ability to wipe Bitlash EEPROM during provisioning, in case of bricked board #23

Open amcjen opened 10 years ago

amcjen commented 10 years ago

I tried this once:

function startup { wifi.disassociate }

And my board never got a prompt back, even when reflashing.

I had to load a custom sketch to erase the first part of EEPROM:

#include <avr/eeprom.h>

void setup() {
  Serial.begin(115200);
  Serial.println("Erasing");
  for (int i=0; i<500; i++) {
    eeprom_update_byte((uint8_t *)i, 0xFF);
  }
  Serial.println("Done");
}

void loop() { }

It'd be great if we used the STK500 support in the Chrome app to be able to have the option to clear out all Bitlash functions from EEPROM, in case someone else does this.

But we want to make sure not to erase the entire eeprom, as we have our unique serial numbers at the end. so only up until ENDDB (which is defined in Bitlash.)