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]

Is it possible to use the content of a file in binary format in C and assembly file? thanks


Hi all:
    Is it possible to use the content of another file in pure binary format
in C file?(ARM target)

for example I have a data file as:   data.dat

In the usefile.S assembly file I would like to import the content of
data.dat file in a section as:


datasection_start
      // how to tell the assembler to import the content of data.dat (in
pure binary format)

datasection_end

// use the content in assembly code as:

ldr r0, =datasection_start
ldr r1, [r0]

... etc

and in C file how can I import a file and use the content of the file in
pure binary format? ( any directive can do this kind of job in GNUPro
tools?) can anybody give me some example code thanks a lot.


-- 
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]