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)
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.
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
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***
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, ...
Well you could get four times the memory by using an atmage328 instead of atmega8