This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Access version number string of eCos to check the compile date
- From: Carlos Sobrinho <duckman at epilog dot ath dot cx>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Sat, 8 Jan 2005 16:19:44 +0000
- Subject: Re: [ECOS] Access version number string of eCos to check the compile date
- References: <200501070440.45475.duckman@epilog.ath.cx> <20050107093717.GH31791@lunn.ch>
- Reply-to: duckman at epilog dot ath dot cx
On Sexta 07 Janeiro 2005 09:37, Andrew Lunn wrote:
> If you take a look at packages/hal/arm/arch/current/src/vectors.S you
> will see
>
> //
> // Identification - useful to find out when a system was configured
> _eCos_id:
> .asciz "eCos : " __DATE__
>
> However, it does not appear to be a global symbol. So actually
> accessing it from another file will be difficult.
You are right. This seems a little difficult because it gets included in
vectors.o but not on the main library. The linker must remove it because it
doesn't seem used anywhere.
> What you might want to do is
>
> diag_printf(__DATA__);
But this, if located on my compile tree and not ecos tree, would show me the
main program date and not eCos build date.
Could I add a function like:
cyg_kernel_version(char* buffer) or
cyg_version(char* buffer)
that would return a string with the date (as per CVS $ID$/$DATE$) and the
version, maybe ($ID$ of changelog?)
also a ROM/RAM enabled version?
With a CDL option to enable/disable it?
>
> Getting the version string is hard. Most versions of eCos don't have a
> version, they are just the "current" anoncvs.
A version if its a release, a CVS version of Changelog (seems to be the most
updated file) or other file if its CVS?
----------------------------------------------------------------
File: ChangeLog Status: Up-to-date
Working revision: 1.122
Repository revision:
1.122 /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
----------------------------------------------------------------
So cyg_(kernel_)version would return something like:
"eCos v1.122 (Compiled on xx/01/2005 for ROM(/RAM))"
Is this possible for inclusion?
With best regards
Carlos Sobrinho
--
#############################################################################
# You mean you don't want to watch WRESTLING from ATLANTA? #
#############################################################################
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss