noopkat / avrgirl-usbtinyisp Goto Github PK
View Code? Open in Web Editor NEWAVRGirl wrapper for driving USBtinyISP programmers
AVRGirl wrapper for driving USBtinyISP programmers
So I'm trying to write to an ATMega328 with a SparkFun Pocket programmer, and it hangs on write.
After inserting some clumsy console.log statements:
avrgirlUsbTinyIsp.prototype._writeMem = function (memType, hex, callback) {
var self = this;
var options = this.options.chip;
var pageAddress = 0;
var useAddress;
var pageSize = options[memType].pageSize;
var addressOffset = options[memType].addressOffset;
var addressOffset = 1;
var data, readFile;
var page = 0;
if (Buffer.isBuffer(hex)) {
data = hex;
} else if (typeof hex === 'string') {
try {
readFile = fs.readFileSync(hex, { encoding: 'utf8' });
} catch (e) {
if (e.code === 'ENOENT') {
return callback(new Error('could not write ' + memType + ': please supply a valid path to a hex file.'));
} else {
return callback(e);
}
}
data = intelhex.parse(readFile).data;
} else {
return callback(new Error('could not write ' + memType + ': please supply either a hex buffer or a valid path to a hex file.'));
}
this.debug('writing to ' + memType + ', please wait...');
this.hackerLog('page length:', hex.length / pageSize);
async.whilst(
// we exit out of this while loop when we are at the end of the hex file
function testEndOfFile() {
console.log(pageAddress, data.length, pageSize)
return pageAddress < data.length;
},
it says pageSize is null.
I'll see if I can patch this.
slight refactor needed for flashing, I'm on it though.
The delay should be 900000µs (!!!)
I am going to play with this to get it down from that unrealistic number.
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 ✨
Looks like istanbul is no longer maintained / is not getting the love it needs, so a new coverage library would be preferred. There are security vulns that affect us continuing to use istanbul and istanbul-coveralls.
Very low priority, removing these coverage libs and deactivating them in CI would probably be more productive for now.
So ❤️ neat and clean! 🥇
Your repo README's should be presentation examples!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.