Hi,I'm looking forward to reduce the size of the standard serial bootloader in order to make some room for a custom calibration routine. Is there any thing that may be removed/commented from the standard source file without altering the normal use of the bootloader? This is for a custom Atmega328p board running from the internal RC oscilator. Hence my wish to do some calibrations from the bootloader.Thanks in advance!Daniel.
Thanks Lefty,I'm using the old 2KB bootloader, with support for the WDT, since I was unable to make optiboot work on my board.
I'm pretty sure the uno bootloader for the 328p handles WDT correctly. Probably you should try and figure out why you can't burn and run optiboot on your 328p chip rather then trying to add a function to your old bootloader.
And again why not just run your calibration function inside the setup function in your sketch?
Quote from: retrolefty on Aug 31, 2012, 05:25 pmI'm pretty sure the uno bootloader for the 328p handles WDT correctly. Probably you should try and figure out why you can't burn and run optiboot on your 328p chip rather then trying to add a function to your old bootloader.Not sure why but the bootloader didn't like running at 8MHz, at least from the internal RC oscillator. I even posted a question some time ago but nobody seemed to be using those settings with optiboot.That is a problem, as the standard arduino optiboot is hard coded to run at 16mhz, so the baudrate would be wrong if you run it at 8mhz. You would need a modified optiboot recompiled to run at 8mhz.QuoteAnd again why not just run your calibration function inside the setup function in your sketch?This is how I'm running it right now. I just wondered if running the calibration tasks from the bootloader was something possible, mainly because I wanted to run them before comms start.Well just place your calibrate function inside your setup function before the comm statements, even add a delay if you wish or need before you execute the comm start statements. You are making a problem where one does not exist I think. Thanks again!Daniel.
Here you go, optiboot for 8MHz for the 328p. It uses 115200Baud