Author Topic: a smaller, cost-reduced digispark (<$1)  (Read 25015 times)

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: a smaller, cost-reduced digispark (<$1)
« Reply #30 on: September 05, 2013, 10:46:08 am »
Is there any evidence at all that it's possible for the micronucleus bootloader to overwrite any part of itself if you try and upload programs which are a little too big, or did you just make that up? There are many systems in place to ensure that is not possible, so to me it sounds like a lie.


What would be compelling evidence to me is this:


Get an attiny85, upload micronucleus and do the fuses, but don't disable the reset pin so you can still use an ISP programmer with it. Next, use avrdude to download a copy of the entire chip's firmware. After that, upload something which corrupts it, then use avrdude again to download the firmware. You can dump to a binary file and use a hex editor to find differences between each. If there really is a corruption in the bootloader's code I will be very interested. This is the process I use to verify the bootloader isn't doing anything strange in the way it is storing data, and to verify that the upgrade programs work perfectly. It is certainly not impossible that I have made off by one bugs that allow the bootloader to mess itself up, but it seems very unlikely especially as there are protections in both the host computer and the device.


Till I see some evidence it remains my view that there is no command you can send to micronucleus which causes it to brick itself, except for uploading a program which itself specifically writes over the bootloader section.

jaghvi

  • Newbie
  • *
  • Posts: 29
Re: a smaller, cost-reduced digispark (<$1)
« Reply #31 on: September 14, 2013, 01:13:27 am »
I just thought with what I have learnt so far of microcontrollers, that it might overwrite bootloader in the sense that ,if code is greater than 6k it is likely to occupy the memory used by bootloader until it is locked somehow .I have removed this question for now ,until I am assured of whats correct.and the entire tut is shifted to www.github.com/androportal/anuduino






Sorry for the inconvenience.