Open noopkat opened 8 years ago
Hi @noopkat,
Thanks for putting this library together. I'm having trouble getting my script to upload using avrgirl-usbtinyisp. I tried using the example code
async.series([
avrgirl.enterProgrammingMode,
avrgirl.writeFlash.bind(avrgirl, 'script.c.hex'),
avrgirl.exitProgrammingMode
], function (error) {
console.log('err', error);
avrgirl.close();
}
);
as well as trying to call each function and callback manually
avrgirl.enterProgrammingMode(function(e) {
if (e === undefined) {
avrgirl.writeFlash('script.c.hex', function(e) {
if (e === null) {
avrgirl.exitProgrammingMode(function(e) {
if (e === undefined) {
console.log("Flash succeeded");
}
else {
console.log("Error exiting programming mode");
console.log(e);
}
});
}
else {
console.log("Error writing flash");
console.log(e);
}
});
}
else {
console.log("Error entering programming mode");
console.log(e);
}
});
Neither are throwing errors and it appears my code is successfully finding my programmer and attempting to flash the chip, but it just doesn't quite finish correctly. It almost seems like it's not taking enough time to fully send the data across the wire. Am I missing something obvious and/or is there a way to get more debug output?
Hi there @shickey thanks for reporting this issue. Let's see if we can figure out what's going wrong 🔍
This could be old dependencies needing an update, or my code being not so robust for all scenarios, or something else entirely. We'll try to get to the bottom of it though. I'll get out my usbtinyisp and try flashing something to an attiny85 in the meantime to see if I can replicate.
Thanks and apologies that you're having dramas using this library!
If you have any of the devices that avrgirl-usbtinyisp supports, please have a go at using it to upload a precompiled script to a chip. Open an issue if you run into anything other than success.
Thank you :sparkles: