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: Filesystem


ganglu@ustc.edu wrote:
> 
> Hi,
> 
> I have built a RAM file system and the test passed.
> But I found that I can not use "fopen" to create a file.
> The test code use "open", "read".
> Can not I use the standard file library like "fopen, fprint, fread"?

Yes that should work. If it doesn't, we'll need more info!

> I need to test an  algorithm in the board. The code used a lot of data in
> files.
> If I port the code to the board, how can I put those files on the file
> system? I know we can put data on ROM, but how can the program access
> those data like files?

Unless the data changes every time you run the program, it would probably
be easiest to put them in a ROMFS, and program them into flash. Then you
can instantiate the ROMFS using the flash address as a base.
 
> And how can we use physical address in the program to access the ROM?

There isn't an API to do that (nor would there be really). You're welcome
to fiddle in the FS code though - that's why it's there!

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
--[ "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]