add support for the version info
This commit is contained in:
@@ -17,7 +17,7 @@ __weak void application_entry(void *arg)
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
board_init();
|
board_init();
|
||||||
printf("Welcome to TencentOS tiny\r\n");
|
printf("Welcome to TencentOS tiny(%s)\r\n", TOS_VERSION);
|
||||||
osKernelInitialize(); // TOS Tiny kernel initialize
|
osKernelInitialize(); // TOS Tiny kernel initialize
|
||||||
osThreadCreate(osThread(application_entry), NULL); // Create TOS Tiny task
|
osThreadCreate(osThread(application_entry), NULL); // Create TOS Tiny task
|
||||||
osKernelStart(); // Start TOS Tiny
|
osKernelStart(); // Start TOS Tiny
|
||||||
|
@@ -67,6 +67,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include <tos_global.h>
|
#include <tos_global.h>
|
||||||
|
#include <tos_version.h>
|
||||||
|
|
||||||
#endif /* _TOS_K_H_ */
|
#endif /* _TOS_K_H_ */
|
||||||
|
|
||||||
|
32
kernel/core/include/tos_version.h
Normal file
32
kernel/core/include/tos_version.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
* Tencent is pleased to support the open source community by making TencentOS
|
||||||
|
* available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
* If you have downloaded a copy of the TencentOS binary from Tencent, please
|
||||||
|
* note that the TencentOS binary is licensed under the BSD 3-Clause License.
|
||||||
|
*
|
||||||
|
* If you have downloaded a copy of the TencentOS source code from Tencent,
|
||||||
|
* please note that TencentOS source code is licensed under the BSD 3-Clause
|
||||||
|
* License, except for the third-party components listed below which are
|
||||||
|
* subject to different license terms. Your integration of TencentOS into your
|
||||||
|
* own projects may require compliance with the BSD 3-Clause License, as well
|
||||||
|
* as the other licenses applicable to the third-party components included
|
||||||
|
* within TencentOS.
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef _TOS_VERSION_H_
|
||||||
|
#define _TOS_VERSION_H_
|
||||||
|
|
||||||
|
// the format of the tencentos-tiny version is major.minor.patch
|
||||||
|
// major is updated for major changes that will need user code changes
|
||||||
|
// minor is updated for minor changes/bug fixes that may need user code changes
|
||||||
|
// patch is updated for patch changes/bug fixes that should not need user code changes
|
||||||
|
|
||||||
|
#define TOS_VERSION_MAJOR 0x02
|
||||||
|
#define TOS_VERSION_MINOR 0x02
|
||||||
|
#define TOS_VERSION_PATCH 0x00
|
||||||
|
#define TOS_VERSION "2.2.0"
|
||||||
|
|
||||||
|
#endif /* _TOS_VERSION_H_ */
|
||||||
|
|
Reference in New Issue
Block a user