EmbDev.net

Forum: µC & Digital Electronics Extend Flash Memory


Author: cogadh (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi everybody,
I am currently totally into OS dev but got very soon to memory 
restrictions (not enough flash memory) on my ATmega8. Is there a way 
(maybe a code trick) to extend the flash memory using an eeprom, SD,... 
besides transfering to a bigger ATmega? I read some stuff about the 
bootloader and SPM (though I have not fully understand everything)?! 
(already using -fshort-enums, -Os in gcc but -mint8 is not an option for 
me - results in creepy code crashes!)
(P.S.: don't wanna do a small sized OS or RTOS)

Author: c-hater (Guest)
Posted on:

Rate this post
1 useful
not useful
cogadh wrote:

> I am currently totally into OS dev but got very soon to memory
> restrictions (not enough flash memory) on my ATmega8.

???

This sentence doesn't yield much sense. Querying my crystal ball I 
assume the code (flash) memory of your ATmega8 is simply to small to 
contain the whole nonsense shit you want to write into it.

> Is there a way
> (maybe a code trick) to extend the flash memory using an eeprom, SD,...
> besides transfering to a bigger ATmega?

Not in the first approach.

> I read some stuff about the
> bootloader

Yes, "bootloader" (better: self programming) mechanisms owns the might 
to virtually extend the flash. But not in the context of OS stuff. The 
limited count of possible flash erase/write cycles will prohibit this 
kind of usage. In the best case the flash write limits are wide enough 
to "load" rarely used applications on demand (superseding other rarely 
used applications).

You can do the game appr. 10.000 times, then the flash will die. Refer 
datasheet if you don't trust me.

Author: fchk (Guest)
Posted on:

Rate this post
0 useful
not useful
Wrong architecture!

AVR can only execute code from its internal flash. Period. And 
repeatedly rewriting this flash is not an option, either. So the answer 
is no.

On other architectures like ARM, MIPS (PIC32), or MPS430 (especially the 
FRAM based ones) this would be no problem at all.

fchk

Author: Kilian K. (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks for your responses!

c-hater wrote:
> This sentence doesn't yield much sense. Querying my crystal ball I
> assume the code (flash) memory of your ATmega8 is simply to small to
> contain the whole nonsense shit you want to write into it.

Yeah, that's true! :)

I probably should switch to ARM with AVR as special purpose hardware 
extension...

***CLOSED***

Author: asdfasd (Guest)
Posted on:

Rate this post
0 useful
not useful
Well, you could put a virtual machine in flash which then executes byte 
code from an external eeprom.  Will be slow but gets you as much memory 
as you want.  Some systems using this technique: Basic STAMP, 
Propeller's SPIN, ...

Author: Max (Guest)
Posted on:

Rate this post
0 useful
not useful
Well you could get four times the memory by using an atmage328 instead 
of atmega8

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.