Topics

Zephyr versioning (1.6.0 or 0.1.6?)


Jon Trulson
 

Hi,

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?

Thanks!


--
Jon Trulson

"If we can hit that bull's-eye, the rest of the dominoes will fall
like a house of cards... Checkmate."
-- Zapp Brannigan


Jon Trulson
 

On Mon, 5 Dec 2016, Jon Trulson wrote:

Hi,

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?
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
fine.

Sorry for the noise.

--
Jon Trulson

"If we can hit that bull's-eye, the rest of the dominoes will fall
like a house of cards... Checkmate."
-- Zapp Brannigan


Nashif, Anas
 

On 5 Dec 2016, at 17:20, Jon Trulson <jon(a)radscan.com> wrote:

On Mon, 5 Dec 2016, Jon Trulson wrote:

Hi,

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?
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
fine.

Sorry for the noise.
Here is a snippet:

uint32_t version = sys_kernel_version_get();

printk("Zephyr version %d.%d.%d\n",
SYS_KERNEL_VER_MAJOR(version),
SYS_KERNEL_VER_MINOR(version),
SYS_KERNEL_VER_PATCHLEVEL(version));

This is the correct usage, and yes, KERNEL_VERSION_NUMBER is not the right macro.


Anas


--
Jon Trulson

"If we can hit that bull's-eye, the rest of the dominoes will fall
like a house of cards... Checkmate."
-- Zapp Brannigan


Jon Trulson
 

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:

Hi,

I noticed that a new Zephyr version was tagged, 1.6.0. I am confused a
little bit by the version number though:
[...]

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
fine.

Sorry for the noise.
Here is a snippet:

uint32_t version = sys_kernel_version_get();

printk("Zephyr version %d.%d.%d\n",
SYS_KERNEL_VER_MAJOR(version),
SYS_KERNEL_VER_MINOR(version),
SYS_KERNEL_VER_PATCHLEVEL(version));

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
response!


--
Jon Trulson

"If we can hit that bull's-eye, the rest of the dominoes will fall
like a house of cards... Checkmate."
-- Zapp Brannigan