add third_party FatFs and fix BUILD.gn

Change-Id: I456530ca5282d6c4b0904d04ae0a0a5ff155391a
This commit is contained in:
Caoruihong 2021-04-22 17:06:41 +08:00
parent 23360db35c
commit ad1e09ff77
17 changed files with 28 additions and 33 deletions

8
.gitmodules vendored
View File

@ -1,8 +1,12 @@
[submodule "third_party/cmsis"]
path = third_party/cmsis
url = ../third_party_cmsis.git
url = https://gitee.com/openharmony/third_party_cmsis.git
branch = .
[submodule "third_party/bounds_checking_function"]
path = third_party/bounds_checking_function
url = ../third_party_bounds_checking_function.git
url = https://gitee.com/openharmony/third_party_bounds_checking_function.git
branch = .
[submodule "third_party/FatFs"]
path = third_party/FatFs
url = https://gitee.com/openharmony/third_party_FatFs.git
branch = .

View File

@ -38,9 +38,9 @@ declare_args() {
group("kernel") {
deps = [
"components/bounds_checking_function:sec",
"kernel:kernel",
"utils:utils",
"//third_party/bounds_checking_function:libsec_static",
]
if (enable_ohos_kernel_liteos_m_cppsupport == true) {
deps += [ "components/cppsupport:cppsupport" ]

View File

@ -34,7 +34,6 @@ static_library("backtrace") {
"../../kernel/include",
"../../kernel/arch/include",
"../../utils",
"./",
"//third_party/bounds_checking_function/include",
"../../third_party/bounds_checking_function/include",
]
}

View File

@ -30,8 +30,5 @@
static_library("cppsupport") {
sources = [ "los_cppsupport.c" ]
include_dirs = [
"../../utils",
"./",
]
include_dirs = [ "../../utils" ]
}

View File

@ -34,7 +34,6 @@ static_library("cpup") {
"../../kernel/include",
"../../kernel/arch/include",
"../../utils",
"./",
"//third_party/bounds_checking_function/include",
"../../third_party/bounds_checking_function/include",
]
}

View File

@ -36,7 +36,6 @@ static_library("exchook") {
"../../kernel/arch/include",
"../../kernel/include",
"../../utils",
"./",
"//third_party/bounds_checking_function/include",
"../../third_party/bounds_checking_function/include",
]
}

View File

@ -29,6 +29,10 @@
static_library("fatfs") {
sources = [
"../../../third_party/FatFs/source/diskio.c",
"../../../third_party/FatFs/source/ff.c",
"../../../third_party/FatFs/source/ffsystem.c",
"../../../third_party/FatFs/source/ffunicode.c",
"fatfs.c",
"fs.c",
]
@ -38,10 +42,8 @@ static_library("fatfs") {
"../../../kernel/include",
"../../../utils",
"../../../kal/cmsis",
"../../../kal",
"../../../kal/posix/include",
"./",
"//third_party/bounds_checking_function/include",
"//third_party/FatFs/source/",
"../../../third_party/bounds_checking_function/include",
"../../../third_party/FatFs/source/",
]
}

View File

@ -41,7 +41,7 @@
#include "securec.h"
#include "los_compiler.h"
#include "los_debug.h"
#include "cmsis_os.h"
#include "cmsis_os2.h"
#define FS_SUCCESS 0
#define FS_FAILURE (-1)

View File

@ -35,7 +35,6 @@ declare_args() {
}
lite_component("kal") {
features = []
if (enable_ohos_kernel_liteos_m_cmsis == true) {

View File

@ -34,10 +34,10 @@ static_library("posix") {
"src/malloc.c",
"src/pthread.c",
"src/pthread_attr.c",
"src/pthread_cond.c",
"src/pthread_mutex.c",
"src/semaphore.c",
"src/time.c",
"src/pthread_cond.c",
]
include_dirs = [
@ -45,6 +45,6 @@ static_library("posix") {
"../../kernel/arch/include",
"../../kernel/include",
"../../utils",
"//third_party/bounds_checking_function/include",
"../../third_party/bounds_checking_function/include",
]
}

View File

@ -47,7 +47,7 @@ static_library("kernel") {
"../components/cpup",
"../components/exchook",
"../utils",
"//third_party/bounds_checking_function/include",
"../third_party/bounds_checking_function/include",
]
if ("$board_cpu" == "cortex-m3") {

View File

@ -40,7 +40,6 @@ static_library("arch") {
"../../../../../kernel/arch/include",
"../../../../../kernel/include",
"../../../../../utils",
"./",
"//third_party/bounds_checking_function/include",
"../../../../../third_party/bounds_checking_function/include",
]
}

View File

@ -41,7 +41,6 @@ static_library("arch") {
"../../../../../kernel/arch/include",
"../../../../../kernel/include",
"../../../../../utils",
"./",
"//third_party/bounds_checking_function/include",
"../../../../../third_party/bounds_checking_function/include",
]
}

View File

@ -40,7 +40,6 @@ static_library("arch") {
"../../../../../kernel/arch/include",
"../../../../../kernel/include",
"../../../../../utils",
"./",
"//third_party/bounds_checking_function/include",
"../../../../../third_party/bounds_checking_function/include",
]
}

View File

@ -40,8 +40,7 @@ static_library("arch") {
"../../../../../kernel/arch/include",
"../../../../../kernel/include",
"../../../../../utils",
"./",
"./asm",
"//third_party/bounds_checking_function/include",
"asm",
"../../../../../third_party/bounds_checking_function/include",
]
}

1
third_party/FatFs vendored Submodule

@ -0,0 +1 @@
Subproject commit fb2d8394023a6eef12c5bd3eda8978f5e294e070

View File

@ -36,7 +36,6 @@ static_library("utils") {
include_dirs = [
"../kernel/include",
"../kernel/arch/include",
"./",
"//third_party/bounds_checking_function/include",
"../third_party/bounds_checking_function/include",
]
}