From 8d353084d6cf614677edc1a548d068cffae02842 Mon Sep 17 00:00:00 2001 From: Caoruihong Date: Thu, 29 Apr 2021 12:03:31 +0800 Subject: [PATCH] remove symlinks which is not supported on windows platform use submodules instead of symlinks for bounds_checking_function and cmsis_os2.h Change-Id: I105c3d2c537d9c3c725adf1265a3312df4286916 --- .gitmodules | 12 ------- components/bounds_checking_function | 1 - kal/cmsis/cmsis_os2.h | 33 ++++++++++++++++++- .../cortex-m7_nucleo_f767zi_gcc/liteos_m.mk | 7 ++-- third_party/FatFs | 1 - third_party/bounds_checking_function | 1 - third_party/cmsis | 1 - 7 files changed, 36 insertions(+), 20 deletions(-) delete mode 100644 .gitmodules delete mode 120000 components/bounds_checking_function mode change 120000 => 100644 kal/cmsis/cmsis_os2.h delete mode 160000 third_party/FatFs delete mode 160000 third_party/bounds_checking_function delete mode 160000 third_party/cmsis diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index be682f53..00000000 --- a/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "third_party/cmsis"] - path = third_party/cmsis - url = ../third_party_cmsis.git - branch = . -[submodule "third_party/bounds_checking_function"] - path = third_party/bounds_checking_function - url = ../third_party_bounds_checking_function.git - branch = . -[submodule "third_party/FatFs"] - path = third_party/FatFs - url = ../third_party_FatFs.git - branch = . diff --git a/components/bounds_checking_function b/components/bounds_checking_function deleted file mode 120000 index 795e1a77..00000000 --- a/components/bounds_checking_function +++ /dev/null @@ -1 +0,0 @@ -../../../third_party/bounds_checking_function/ \ No newline at end of file diff --git a/kal/cmsis/cmsis_os2.h b/kal/cmsis/cmsis_os2.h deleted file mode 120000 index c98551bc..00000000 --- a/kal/cmsis/cmsis_os2.h +++ /dev/null @@ -1 +0,0 @@ -../../../../third_party/cmsis/CMSIS/RTOS2/Include/cmsis_os2.h \ No newline at end of file diff --git a/kal/cmsis/cmsis_os2.h b/kal/cmsis/cmsis_os2.h new file mode 100644 index 00000000..b149eba4 --- /dev/null +++ b/kal/cmsis/cmsis_os2.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors may be used + * to endorse or promote products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "../../../../third_party/cmsis/CMSIS/RTOS2/Include/cmsis_os2.h" diff --git a/targets/cortex-m7_nucleo_f767zi_gcc/liteos_m.mk b/targets/cortex-m7_nucleo_f767zi_gcc/liteos_m.mk index c39aa8e4..0e679b14 100644 --- a/targets/cortex-m7_nucleo_f767zi_gcc/liteos_m.mk +++ b/targets/cortex-m7_nucleo_f767zi_gcc/liteos_m.mk @@ -5,17 +5,18 @@ LITEOSTOPDIR := $(realpath $(LITEOSTOPDIR)) C_SOURCES += $(wildcard $(LITEOSTOPDIR)/kernel/src/*.c) \ $(wildcard $(LITEOSTOPDIR)/kernel/src/mm/*.c) \ $(wildcard $(LITEOSTOPDIR)/components/cpup/*.c) \ - $(wildcard $(LITEOSTOPDIR)/third_party/bounds_checking_function/src/*.c) \ + $(wildcard $(LITEOSTOPDIR)/../../third_party/bounds_checking_function/src/*.c) \ $(wildcard $(LITEOSTOPDIR)/utils/*.c) \ + $(wildcard $(LITEOSTOPDIR)/kal/cmsis/*.c) \ $(wildcard $(LITEOSTOPDIR)/kal/posix/src/*.c) \ Core/Src/task_sample.c C_INCLUDES += -I$(LITEOSTOPDIR)/utils \ + -I$(LITEOSTOPDIR)/kal/cmsis \ -I$(LITEOSTOPDIR)/kal/posix/include \ -I$(LITEOSTOPDIR)/kernel/include \ -I$(LITEOSTOPDIR)/components/cpup \ - -I$(LITEOSTOPDIR)/third_party/cmsis/CMSIS/RTOS2/Include \ - -I$(LITEOSTOPDIR)/third_party/bounds_checking_function/include + -I$(LITEOSTOPDIR)/../../third_party/bounds_checking_function/include # Related to arch ASM_SOURCES += $(wildcard $(LITEOSTOPDIR)/kernel/arch/arm/cortex-m7/gcc/*.s) diff --git a/third_party/FatFs b/third_party/FatFs deleted file mode 160000 index c9c6b40b..00000000 --- a/third_party/FatFs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c9c6b40b5ce3cc87735229cd2b4b25eab98efb78 diff --git a/third_party/bounds_checking_function b/third_party/bounds_checking_function deleted file mode 160000 index 7052dd04..00000000 --- a/third_party/bounds_checking_function +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7052dd04a101eaf6a8f5acba8b675cdda4778d0a diff --git a/third_party/cmsis b/third_party/cmsis deleted file mode 160000 index 2ab5422f..00000000 --- a/third_party/cmsis +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ab5422fccd0ac2583fb616ee52051f6a043506a