From 224c6fe9be8543ca2f4a39340cd6ea1d854e1284 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Fri, 12 Aug 2016 11:37:21 +0200 Subject: [PATCH 1/2] interface for determining kernel version on app level added --- source/firmware/kernel/interface/kernel.h | 10 +++++++ source/firmware/kernel/version.c | 36 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 source/firmware/kernel/version.c diff --git a/source/firmware/kernel/interface/kernel.h b/source/firmware/kernel/interface/kernel.h index b9d4520..b72e338 100644 --- a/source/firmware/kernel/interface/kernel.h +++ b/source/firmware/kernel/interface/kernel.h @@ -37,6 +37,15 @@ struct thread_context { struct queue_node sem_queue_node; }; +struct kernel_version { + unsigned int kernel_version; + unsigned int major_version; + unsigned int minor_version; + unsigned int build_number; +}; + +int get_kernel_version(struct kernel_version *version); + struct thread_context *thread_create( struct thread_context *thread, stack_t *stack, @@ -45,6 +54,7 @@ struct thread_context *thread_create( void *arg, enum thread_priority priority); + void thread_exit(void); void sleep_ms(unsigned int ms); diff --git a/source/firmware/kernel/version.c b/source/firmware/kernel/version.c new file mode 100644 index 0000000..1de183e --- /dev/null +++ b/source/firmware/kernel/version.c @@ -0,0 +1,36 @@ +/* + * version.c + * + * Created on: Aug 12, 2016 + * Author: tkl + */ +#include +#include +#include +#include + +#include "queue.h" +#include "stack.h" +#include "version.h" +#include "kernel.h" + +int get_kernel_version(struct kernel_version *version) +{ + if(NULL == version) + return -1; + if(strcmp(KERNEL_VERSION, "unknown")) + return -1; + if(strcmp(MAJOR_VERSION, "unknown")) + return -1; + if(strcmp(MINOR_VERSION, "unknown")) + return -1; + if(strcmp(BUILD_NUMBER, "unknown")) + return -1; + version->kernel_version = (unsigned int)atoi(KERNEL_VERSION); + version->major_version = (unsigned int)atoi(MAJOR_VERSION); + version->minor_version = (unsigned int)atoi(MINOR_VERSION); + version->build_number = (unsigned int)atoi(BUILD_NUMBER); + + return 0; +} + From a5b9960b0afa4065ef02b0508f992b00917bb0ba Mon Sep 17 00:00:00 2001 From: tkl Date: Fri, 12 Aug 2016 09:41:47 +0000 Subject: [PATCH 2/2] error in .gitlab-ci.yml fixed --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 116b215..cabef19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,12 +20,12 @@ build_job: except: - tags -check_job: - script: - - "make check BOARD=stm32f4-discovery" - stage: check - except: - - tags +#check_job: +# script: +# - "make check BOARD=stm32f4-discovery" +# stage: check +# except: +# - tags deploy_job: stage: deploy