[Tremor] Implementing Tremor on low-end ARM
hb at x256.org
Sun Nov 23 02:48:27 PST 2008
I am implementing an open hardware/software portable Ogg player. From
the messages I have read in the archive for this mailing list, the CPU I
have chosen should be sufficient:
AT91SAM7S (ARM7) : 55MHz, 64kB single cycle RAM, 256kB flash.
I believe it will take around 40kB of the RAM. Including decoding
buffers (it will need to be double buffered), 48kB is fine. My file
system code is under 8kB, and that will leave 8kB for display/user
If necessary I think it would be possible to store some tables in flash
and read them out directly.
Is this correct?
I've been looking through the Tremor code and I notice that it uses
dynamic memory allocation. Since I only need to be able to decode one
file at a time, I imagine I should be able to use (mostly) static
allocation. Has anybody done this before?
Also, since the chip won't be running any kind of operating system, I'm
tempted to remove calls to most C library functions (fread, fseek,
ftell, fwrite, fprintf, malloc, realloc, free). The file operations just
seem to be some defaults in helper functions so I imagine I can just
remove them. Changing to static allocation wherever possible should
reduce/eliminate the calls to memory allocation. I suppose I could get a
heap implementation from somewhere and point it to all the spare memory.
If someone can comment as to whether this is a good idea vs. statically
allocating, please let me know.
More information about the Tremor