This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Supporting Paged Flash in eCos/RedBoot


Jonathan Larmour wrote:
Ian Campbell wrote:

Hi,

Attached is a rough first draft of a patch to implement an improved
flash interface -- It's a first pass and I certainly wouldn't expect you
to apply it as is...

The main bulk of the patch modifies the API of cyg/io/flash.h such that
each function takes a struct flash_info * as it's first parameter and
all addresses are described as unsigned long offsets


NB The flash drivers were written when Gary thought he could get away with using things like ints and longs instead of the normal eCos-y types like cyg_uint32 etc.

Just to be clear, at the time the intention was only to get flash drivers for RedBoot, so things like namespacing were irrelevant as it was just RedBoot, right? :-); and (I've always assumed) ints/longs were sufficient rather than the eCos-y types because it wasn't at that point intended for RedBoot to work on a target where sizeof(int) != 4, or sizeof(long) isn't the same size as a function or data address[1]. Besides, as always, there were deadlines to meet...


However eCos has always been intended to be more portable than that and we need to address that if we can, even if not all at once, at least if we change the API, we should do the right thing in that API, coz APIs tend to stick around :-).

Jifl
[1] Some obscure targets do have differently sized function and data pointers, primarily harvard architectures, scarily enough.
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine



-- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]