On Sat, 10 Dec 2016, Nashif, Anas wrote:
On 5 Dec 2016, at 17:20, Jon Trulson <jon(a)radscan.com> wrote:
On Mon, 5 Dec 2016, Jon Trulson wrote:
I noticed that a new Zephyr version was tagged, 1.6.0. I am confused a
little bit by the version number though:
Here is a snippet:
Responding to my own post - clearly KERNEL_VERSION_NUMBER is the wrong
macro. It seems like KERNELVERSION is supposed to be the correct one
for these macros? A little confusing.
Anyway, I just decided to use KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR, and KERNEL_PATCHLEVEL directly. This works
Sorry for the noise.
uint32_t version = sys_kernel_version_get();
printk("Zephyr version %d.%d.%d\n",
This is the correct usage, and yes, KERNEL_VERSION_NUMBER is not the right macro.
Yes, I had seen sys_kernel_version_get(), but what I was trying to do
was get this information at compile time so that some timer code I was
using could be supported in both 1.5 and 1.6 versions of Zephyr
(nanotimer vs. k_timer).
Using the macros I mentioned previously works fine. Thanks for the
"If we can hit that bull's-eye, the rest of the dominoes will fall
like a house of cards... Checkmate."
-- Zapp Brannigan