orempel / twiboot Goto Github PK
View Code? Open in Web Editor NEWAVR bootloader over TWI/I2C
License: GNU General Public License v2.0
AVR bootloader over TWI/I2C
License: GNU General Public License v2.0
Hi,
i ported twiboot to my Tiny84 target.
So far, it is working. I am able to download the code and start a small demo application via the I2C command.
Unfortunately, it is not starting without any I2C communication (timeout).
Any hint?
For debugging, i added some fast LED toggling just before jump_to_app();
The problem, is, that my app code is just not working, when it is started by timeout.
Additional, i think there is a concept error with the appvect_save variable.
I think, the appvect_save & rstvect_save are initialized with the wrong value in main.
When I check/compare without writing it, then i get a mismatch with the original code.
I think, it should be:
rstvect_save[0] = buf[APPVECT_PAGE_OFFSET];
rstvect_save[1] = buf[APPVECT_PAGE_OFFSET + 1];
appvect_save[0] = ?;
appvect_save[1] = ?;
I added a simple CRC16 checksum query. This is very useful doing a quick code compare without read the entire flash to the master.
Later, i like to add support for the AT Tiny841 too. This device has a different I2C slave implementation.
Shall i provide a pull request for this?
Maik
This is not an issue but just a remark.
You might like the "twoboot-proxy" which allows to use a leonardo to bridge between the Arduino IDE and a atmega328 based twiboot device:
Awesome work on twiboot! Any chance offering support for Tiny85? I changed the MCU in the Makefile and it seems some registers are Tiny85-specific..
Currently, my ATmega328p runs at 16MHz on an external clock (I set the fuse bits manually in a copy of the Makefile you provide). However, it would be nice to utilize a custom CPU frequency that doesn't require me manually editing the Makefile. This isn't something important, as it doesn't impact my project much (just that I have to be faster when stopping the abort boot timeout ๐). However, it would be nice to have.
I'd like to use this code in a product I am developing, but I cannot accept the GPL 2 license attached.
Are you open to changing the license? LGPL?
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.