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: dynamic HAL_PLATFORM_* values


We have boards with varying versions of FPGA code in them for
various reasons (debug builds, not updated, programming mistake,
etc).

In the FPGA are registers I can read to get the version
numbers.  During hal_platform_init() (or maybe earlier) 
I want to read those registers, format the data into a
fixed length string in .data and somewhere #define 
HAL_PLATFORM_EXTRAS to be a pointer to that string, so
that redboot will print my string out on boot and the string
will reflect the values in the FPGA registers at runtime.
Everything I saw from grepping my tree statically defines
HAL_PLATFORM_* in a cdl file.

where I was running into trouble was in figuring out what the 
"right" way to do this is.  The #define doesn't seem to "belong"
in any of my exisiting platform hal include files (hal_diag, plf_cache,
plf_intr, plf_io, and plf_stub), so I wanted to make a new header
file, figure out how to get it into the install/include heirarchy,
and get it #included into the build headers so when redboot links it
can find my pointer.


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


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