Flash counter?

Understanding the language, error messages, etc.

Flash counter?

Postby Hark0 » Tue Sep 02, 2014 6:48 am

Anyway to view the number of Atmega flashes? Are possible?

I think are a good idea to add in settings info page:

Flashed: xxxx/10000


TIA
User avatar
Hark0
 
Posts: 55
Joined: Wed Apr 09, 2014 4:45 am
Location: Cornella de Llobregat, Barcelona

Re: Flash counter?

Postby rodot » Tue Sep 02, 2014 10:16 am

As I explained in this post, there is no hard limit at 10 000 flashes, and it's likely to be way more than than.
This feature could be done by the bootloader by incrementing a variable stored in EEPROM. Problem are... I'm not sure it would fit in the bootloader, and users could mistakenly (or on purposely) overwrite it. Moreover using the bootloader you can flash just one page (not the whole memory), so this count would be inacurate.
That's a good idea though :)
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Flash counter?

Postby Hark0 » Tue Sep 02, 2014 11:28 am

Well, in this case.... personally I suggest this Flash / memory info page for settings.hex app.

Flash Counter:
Program Memory: xxxx
EEPROM: xxxx

Free RAM: xxxx /2048 bytes


Yes? :-P
User avatar
Hark0
 
Posts: 55
Joined: Wed Apr 09, 2014 4:45 am
Location: Cornella de Llobregat, Barcelona

Re: Flash counter?

Postby rodot » Tue Sep 02, 2014 4:39 pm

You sincerely are not likely to wear out your flash memory neither you EEPROM, so I doubt the utility of such a counter. The free ram indicator is pretty pointless because it changes depending on when and where in your code you measure it.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Flash counter?

Postby Hark0 » Tue Sep 02, 2014 4:44 pm

rodot wrote:You sincerely are not likely to wear out your flash memory neither you EEPROM, so I doubt the utility of such a counter. The free ram indicator is pretty pointless because it changes depending on when and where in your code you measure it.



IMHO, I think this is an "advanced" feature for developers... :-P
User avatar
Hark0
 
Posts: 55
Joined: Wed Apr 09, 2014 4:45 am
Location: Cornella de Llobregat, Barcelona

Re: Flash counter?

Postby rodot » Tue Sep 02, 2014 4:57 pm

For EEPROM you would have to store the flash count of each byte, because people are not likely to write the whole eeprom each time. So it would take more space than the EEPROM itself. Moreover the only way to store that would be on the SD, which would make this so cumbersome you wouldn't have any space left to run you game on you Gamebuino.

The RAM counter would be pretty useless as I explained previously.

Although, storing the flash count at the end of the EEPROM might be possible and interesting (But it won't take into account the fact that you could flash only a page of the memory). If anybody want to update the bootloader with that feature why not, but I personally have higher priorities on the Gamebuino project ^^
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France


Return to Programming Questions

Who is online

Users browsing this forum: No registered users and 7 guests