EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

RCM3700 Serial Flash Usage

Started by aintnoprobs May 11, 2004
Hi,
This is a very simple question but I haven't found a solution as yet.

RCM 3700 boasts a 1Meg Serial Flash (AT45DB081B to be precise).

It holds the following parameters.

sf_blocks = 4095; //last page cannot be used
sf_prefixsize = 8;
sf_blocksize = 264;
sf_addressbytes = 3;
sf_pagebitshift = 9; I want to use the serial flash to hold some of my webpages along
with the images that are included in the web pages.
Eg:
webpages\
|
----INDEX.HTML
----OTHER.HTML
----IMAGES\
|----SOMETHING.GIF
----SOMETHINGELSE.GIF

Currenlty I am using #ximport commands to import the files. Rather
if I am able to store these static files on serial flash I can use
the actual flash (512K) for code.

Any input would be appreciated.
Thanks
Nil-



I'm not familiar with the 3700, but it sounds like you could represent
the static files you want stored in the serial flash as dynamic, and
provide a blob of C code to pass them out in a CGI function.

--- In rabbit-semi@rabb..., "aintnoprobs" <nilkamal@h...> wrote:
> Hi,
> This is a very simple question but I haven't found a solution as yet.
>
> RCM 3700 boasts a 1Meg Serial Flash (AT45DB081B to be precise).
>
> It holds the following parameters.
>
> sf_blocks = 4095; //last page cannot be used
> sf_prefixsize = 8;
> sf_blocksize = 264;
> sf_addressbytes = 3;
> sf_pagebitshift = 9; > I want to use the serial flash to hold some of my webpages along
> with the images that are included in the web pages.
> Eg:
> webpages\
> |
> ----INDEX.HTML
> ----OTHER.HTML
> ----IMAGES\
> |----SOMETHING.GIF
> ----SOMETHINGELSE.GIF
>
> Currenlty I am using #ximport commands to import the files. Rather
> if I am able to store these static files on serial flash I can use
> the actual flash (512K) for code.
>
> Any input would be appreciated.
> Thanks
> Nil-




Hi,
What about all the image files?. the main point is to try and use
the serial flash chip to store webpages, given a directory structure.

Has anyone succeed in write webpages to the serial flash chip of a
RCM3700?
--- In rabbit-semi@rabb..., "hwrd389" <hwrd389@y...> wrote:
> I'm not familiar with the 3700, but it sounds like you could
represent
> the static files you want stored in the serial flash as dynamic,
and
> provide a blob of C code to pass them out in a CGI function.
>
> --- In rabbit-semi@rabb..., "aintnoprobs" <nilkamal@h...>
wrote:
> > Hi,
> > This is a very simple question but I haven't found a solution as
yet.
> >
> > RCM 3700 boasts a 1Meg Serial Flash (AT45DB081B to be precise).
> >
> > It holds the following parameters.
> >
> > sf_blocks = 4095; //last page cannot be used
> > sf_prefixsize = 8;
> > sf_blocksize = 264;
> > sf_addressbytes = 3;
> > sf_pagebitshift = 9;
> >
> >
> > I want to use the serial flash to hold some of my webpages along
> > with the images that are included in the web pages.
> > Eg:
> > webpages\
> > |
> > ----INDEX.HTML
> > ----OTHER.HTML
> > ----IMAGES\
> > |----SOMETHING.GIF
> > ----SOMETHINGELSE.GIF
> >
> > Currenlty I am using #ximport commands to import the files.
Rather
> > if I am able to store these static files on serial flash I can
use
> > the actual flash (512K) for code.
> >
> > Any input would be appreciated.
> > Thanks
> > Nil-




Passing data back from a CGI function is pretty straightforward and
there several excellent examples in the compiler sample code.
Assuming that you take one of these sample CGI code chunks and set it
up in your code to return prestored data, you'd just have it read the
data from ther serial flash instead of a structure in the main flash.

Getting it in the serial flash would require that you run some code.
The compiler isn't going to do it for you. I would start by writing a
separate program that takes in your image files and packs them into
the serial flash. You'll have to either concoct a simple directory
structure or just hardcode in the position and length of each image.

Obce you've got the flash loaded, run your app that includes the CGI
function. When the web server accesses the page, it will call on the
CGI function to spit out the image. Instead of returning data in a
simple array somewhere in RAM of main flash, have it read from the
serial flash, starting at the locations that you learned when you ran
the packing program previously.

Maybe someone here has some examples for the 3700 that would help
you - I was working with a 3220.

--- In rabbit-semi@rabb..., "aintnoprobs" <nilkamal@h...>
wrote:
> Hi,
> What about all the image files?. the main point is to try and use
> the serial flash chip to store webpages, given a directory
structure.
>
> Has anyone succeed in write webpages to the serial flash chip of a
> RCM3700? >
> --- In rabbit-semi@rabb..., "hwrd389" <hwrd389@y...> wrote:
> > I'm not familiar with the 3700, but it sounds like you could
> represent
> > the static files you want stored in the serial flash as dynamic,
> and
> > provide a blob of C code to pass them out in a CGI function.
> >
> > --- In rabbit-semi@rabb..., "aintnoprobs" <nilkamal@h...>
> wrote:
> > > Hi,
> > > This is a very simple question but I haven't found a solution
as
> yet.
> > >
> > > RCM 3700 boasts a 1Meg Serial Flash (AT45DB081B to be precise).
> > >
> > > It holds the following parameters.
> > >
> > > sf_blocks = 4095; //last page cannot be used
> > > sf_prefixsize = 8;
> > > sf_blocksize = 264;
> > > sf_addressbytes = 3;
> > > sf_pagebitshift = 9;
> > >
> > >
> > > I want to use the serial flash to hold some of my webpages
along
> > > with the images that are included in the web pages.
> > > Eg:
> > > webpages\
> > > |
> > > ----INDEX.HTML
> > > ----OTHER.HTML
> > > ----IMAGES\
> > > |----SOMETHING.GIF
> > > ----SOMETHINGELSE.GIF
> > >
> > > Currenlty I am using #ximport commands to import the files.
> Rather
> > > if I am able to store these static files on serial flash I can
> use
> > > the actual flash (512K) for code.
> > >
> > > Any input would be appreciated.
> > > Thanks
> > > Nil-




Hi hwrd389,
Thanks for the reply, I guess the images should be load to xmem and
then be read back to determine size and starting memory locations.
Then be trf'd to serial flash and saved.

Looks like the serial flash chip on the RCM3700 is more useful to
store data (or HTML sets of code), rather than a directory
structures thats already present.
--- In rabbit-semi@rabb..., "hwrd389" <hwrd389@y...> wrote:
> Passing data back from a CGI function is pretty straightforward
and
> there several excellent examples in the compiler sample code.
> Assuming that you take one of these sample CGI code chunks and set
it
> up in your code to return prestored data, you'd just have it read
the
> data from ther serial flash instead of a structure in the main
flash.
>
> Getting it in the serial flash would require that you run some
code.
> The compiler isn't going to do it for you. I would start by
writing a
> separate program that takes in your image files and packs them
into
> the serial flash. You'll have to either concoct a simple directory
> structure or just hardcode in the position and length of each
image.
>
> Obce you've got the flash loaded, run your app that includes the
CGI
> function. When the web server accesses the page, it will call on
the
> CGI function to spit out the image. Instead of returning data in a
> simple array somewhere in RAM of main flash, have it read from the
> serial flash, starting at the locations that you learned when you
ran
> the packing program previously.
>
> Maybe someone here has some examples for the 3700 that would help
> you - I was working with a 3220.
>
> --- In rabbit-semi@rabb..., "aintnoprobs" <nilkamal@h...>
> wrote:
> > Hi,
> > What about all the image files?. the main point is to try and
use
> > the serial flash chip to store webpages, given a directory
> structure.
> >
> > Has anyone succeed in write webpages to the serial flash chip of
a
> > RCM3700?
> >
> >
> >
> > --- In rabbit-semi@rabb..., "hwrd389" <hwrd389@y...>
wrote:
> > > I'm not familiar with the 3700, but it sounds like you could
> > represent
> > > the static files you want stored in the serial flash as
dynamic,
> > and
> > > provide a blob of C code to pass them out in a CGI function.
> > >
> > > --- In rabbit-semi@rabb..., "aintnoprobs"
<nilkamal@h...>
> > wrote:
> > > > Hi,
> > > > This is a very simple question but I haven't found a
solution
> as
> > yet.
> > > >
> > > > RCM 3700 boasts a 1Meg Serial Flash (AT45DB081B to be
precise).
> > > >
> > > > It holds the following parameters.
> > > >
> > > > sf_blocks = 4095; //last page cannot be used
> > > > sf_prefixsize = 8;
> > > > sf_blocksize = 264;
> > > > sf_addressbytes = 3;
> > > > sf_pagebitshift = 9;
> > > >
> > > >
> > > > I want to use the serial flash to hold some of my webpages
> along
> > > > with the images that are included in the web pages.
> > > > Eg:
> > > > webpages\
> > > > |
> > > > ----INDEX.HTML
> > > > ----OTHER.HTML
> > > > ----IMAGES\
> > > > |----SOMETHING.GIF
> > > > ----SOMETHINGELSE.GIF
> > > >
> > > > Currenlty I am using #ximport commands to import the files.
> > Rather
> > > > if I am able to store these static files on serial flash I
can
> > use
> > > > the actual flash (512K) for code.
> > > >
> > > > Any input would be appreciated.
> > > > Thanks
> > > > Nil-





The 2024 Embedded Online Conference