This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: dynamic HAL_PLATFORM_* values
- From: "Andy Dyer" <adyer at righthandtech dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Sun, 11 Apr 2004 22:44:02 -0500
- Subject: RE: [ECOS] 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