Go Down

Topic: Optiboot + EEPROM  ?  help please  ! (Read 1 time) previous topic - next topic

spumanti

Hi all

I am using the Optiboot in my arduino project, since it allows me to make use of the internal watchdog in the 328 and also gives me access to reading the actual supply voltage on the Vin pin.

However, the Optiboot cuts off the option to use the EEPROM, which I'd really like to use as well.

In the optiboot project, it is mentioned that it can be re-enabled. So that's what i'd like to do. -yes, I am aware that it will make the bootloader bigger (1k instead of 512 bytes) but thats OK. :)

From the project:
Code: [Select]
/**********************************************************/
/*                                                        */
/* Optional defines:                                      */
/*                                                        */
/**********************************************************/
/*                                                        */
/* BIG_BOOT:                                              */
/* Build a 1k bootloader, not 512 bytes. This turns on    */
/* extra functionality.                                   */
...
/* SUPPORT_EEPROM:                                        */
/* Support reading and writing from EEPROM. This is not   */
/* used by Arduino, so off by default.                    */


From the code I can see that there is a define to enable the EEPROM, but I dont know where to define it, nor do I know how to rebuild the bootloader, and make it work!


I would really appreciate some help on this  :)


Cathedrow

I suggest you take this up with the project author (ie. me) rather than this forum, which I don't regularly monitor. DM is fine, or you can log an issue on the googlecode site.

To clarify - EEPROM works with Optiboot just fine. The only thing that doesn't work is writing EEPROM values during the Arduino 'Upload' process - but then, the Arduino IDE doesn't support that anyway. This is the main reason the EEPROM code was trimmed.

If you want to set EEPROM when using Optiboot, there is a simple workaround - and this works on the original Arduino bootloader too. Upload a sketch that writes the EEPROM as you want it, let it execute, then upload the second sketch with the code you really want.

spumanti

Hi Peter.

Thanks for your reply.


I'm a bit embarrassed  :-[ - I had completely misunderstood the fact that it is possible to use EEPROM read and write in the arduino program with Optiboot.
Therefore I did not even bother to try.

I have now tested eeprom reading and writing, and it works great.


Thanks again, and I do apologize for my ignorance.


Quote
I suggest you take this up with the project author (ie. me) rather than this forum...
will do, if I ever need any other obvious questions answered  ;)

Go Up