On 5 Dec 2016, at 17:20, Jon Trulson <jon(a)radscan.com> wrote:
On Mon, 5 Dec 2016, Jon Trulson wrote:
Hi,Responding to my own post - clearly KERNEL_VERSION_NUMBER is the wrong
I noticed that a new Zephyr version was tagged, 1.6.0. I am confused a
little bit by the version number though:
Is it really Version 1.6.0? Or 0.1.6?
If you look at (and I tested this with a simple example) the results of
the version macros (SYS_KERNEL_VER_MAJOR(), et. al.) and the kernel
version (KERNEL_VERSION_NUMBER), I get the following results:
SYS_KERNEL_VER_MAJOR(KERNEL_VERSION_NUMBER) == 0
SYS_KERNEL_VER_MINOR(KERNEL_VERSION_NUMBER) == 1
SYS_KERNEL_VER_PATCHLEVEL(KERNEL_VERSION_NUMBER) == 6
So, this implies the "real" version is 0.1.6. Am I missing something?
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.
Here is a snippet:
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.
"If we can hit that bull's-eye, the rest of the dominoes will fall
like a house of cards... Checkmate."
-- Zapp Brannigan