* [ECOS] how to print timestamp in ecos
@ 2009-04-03 7:12 gaurang
2009-04-03 8:20 ` [ECOS] " John Dallaway
2009-04-03 10:08 ` Robert Brusa
0 siblings, 2 replies; 5+ messages in thread
From: gaurang @ 2009-04-03 7:12 UTC (permalink / raw)
To: ecos-discuss
Hi,
I want display and store time and date in flash.So how can
display timestamp in ecos.
Any time api for time stamp.
Thanks,
--
View this message in context: http://www.nabble.com/how-to-print-timestamp-in-ecos-tp22863168p22863168.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ECOS] Re: how to print timestamp in ecos
2009-04-03 7:12 [ECOS] how to print timestamp in ecos gaurang
@ 2009-04-03 8:20 ` John Dallaway
2009-04-03 9:49 ` [ECOS] " gaurang
2009-04-03 10:08 ` Robert Brusa
1 sibling, 1 reply; 5+ messages in thread
From: John Dallaway @ 2009-04-03 8:20 UTC (permalink / raw)
To: gaurang; +Cc: ecos-discuss
gaurang wrote:
> I want display and store time and date in flash.So how can
> display timestamp in ecos.
> Any time api for time stamp.
You will need an eCos wallclock driver for your hardware platform. You
will also need to ensure that the Wallclock I/O package
(CYGPKG_IO_WALLCLOCK) and the ISO C date and time package
(CYGPKG_LIBC_TIME) are part of your eCos configuration. You can then
call the time() function within the eCos C library to obtain calendar time.
I hope this helps
John Dallaway
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] how to print timestamp in ecos
2009-04-03 8:20 ` [ECOS] " John Dallaway
@ 2009-04-03 9:49 ` gaurang
2009-04-03 10:01 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: gaurang @ 2009-04-03 9:49 UTC (permalink / raw)
To: ecos-discuss
Hi,
Any test code of wallclock and how to make makefile.I insert Wallclock
I/O package
(CYGPKG_IO_WALLCLOCK) and the ISO C date and time package
(CYGPKG_LIBC_TIME) in my ecos and I use time() function,but I am not getting
time.
John Dallaway-2 wrote:
>
> gaurang wrote:
>
>> I want display and store time and date in flash.So how can
>> display timestamp in ecos.
>> Any time api for time stamp.
>
> You will need an eCos wallclock driver for your hardware platform. You
> will also need to ensure that the Wallclock I/O package
> (CYGPKG_IO_WALLCLOCK) and the ISO C date and time package
> (CYGPKG_LIBC_TIME) are part of your eCos configuration. You can then
> call the time() function within the eCos C library to obtain calendar
> time.
>
> I hope this helps
>
> John Dallaway
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>
>
--
View this message in context: http://www.nabble.com/how-to-print-timestamp-in-ecos-tp22863168p22865236.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] how to print timestamp in ecos
2009-04-03 9:49 ` [ECOS] " gaurang
@ 2009-04-03 10:01 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2009-04-03 10:01 UTC (permalink / raw)
To: gaurang; +Cc: ecos-discuss
On Fri, Apr 03, 2009 at 02:49:11AM -0700, gaurang wrote:
>
> Hi,
> Any test code of wallclock and how to make makefile.I insert Wallclock
> I/O package
> (CYGPKG_IO_WALLCLOCK) and the ISO C date and time package
> (CYGPKG_LIBC_TIME) in my ecos and I use time() function,but I am not getting
> time.
Are you getting 1 Jan 1970?
Does your board actually know the time?
Does it have a battery backed up real time clock?
Do you have the drivers necessary to access it? This often means I2C
drivers and a specific driver for the RTC hardware.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] how to print timestamp in ecos
2009-04-03 7:12 [ECOS] how to print timestamp in ecos gaurang
2009-04-03 8:20 ` [ECOS] " John Dallaway
@ 2009-04-03 10:08 ` Robert Brusa
1 sibling, 0 replies; 5+ messages in thread
From: Robert Brusa @ 2009-04-03 10:08 UTC (permalink / raw)
To: gaurang, ecos-discuss
On Fri, 03 Apr 2009 09:12:23 +0200, gaurang <gaurang.tamakuwala@yahoo.com>
wrote:
>
> Hi,
> I want display and store time and date in flash.So how can
> display timestamp in ecos.
> Any time api for time stamp.
>
> Thanks,
Date Time ? What sort of? Look at this:
diag_printf("\n%s() of %s %s", __func__, __DATE__, __TIME__);
The three arguments are strings that are generated during compilation of a
module. So even after linking, each module "knows" when it was compiled.
Robert
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-03 10:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-03 7:12 [ECOS] how to print timestamp in ecos gaurang
2009-04-03 8:20 ` [ECOS] " John Dallaway
2009-04-03 9:49 ` [ECOS] " gaurang
2009-04-03 10:01 ` Andrew Lunn
2009-04-03 10:08 ` Robert Brusa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).