From: Simon Wright <simon@pushface.org>
Subject: Duration for GNAT on ARM
Date: Tue, 23 Dec 2014 21:21:57 +0000
Date: 2014-12-23T21:21:57+00:00 [thread overview]
Message-ID: <ly7fxi5afe.fsf@pushface.org> (raw)
You use -gnatS to get GNAT to output a representation of package
Standard.
If you do this with a native compiler, you get (typically)
type Duration is delta 0.000000001
range -((2 ** 63 - 1) * 0.000000001) ..
+((2 ** 63 - 1) * 0.000000001);
for Duration'Small use 0.000000001;
However, if I do this with both GNAT GPL 2014 and FSF GCC 4.9.1
cross-compiling to arm-eabi for the STM32F4 family (Cortex M4), I get
type Duration is delta 0.020
range -((2 ** 31 - 1) * 0.020) ..
+((2 ** 31 - 1) * 0.020);
for Duration'Small use 0.020;
I can understand the 32-bit vs 64-bit part - a misguided attempt at
efficiency, perhaps - but who gets to say that the clock runs at 50 Hz?
On the STM32's with STMicroelectronics' HAL, the tick is 1 kHz.
next reply other threads:[~2014-12-23 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 21:21 Simon Wright [this message]
2014-12-23 22:42 ` Duration for GNAT on ARM Dmitry A. Kazakov
2014-12-23 22:52 ` J-P. Rosen
2014-12-24 0:27 ` Simon Wright
2014-12-24 9:40 ` Simon Wright
2014-12-24 0:04 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox