Merge pull request #13430 from LDong-Arm/refactor_frameworks

Relocated libraries in features/frameworks
pull/13546/head
Martin Kojtal 2020-09-07 09:10:56 +01:00 committed by GitHub
commit 41f2ee54f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 34 additions and 30 deletions

View File

@ -22,6 +22,8 @@
^platform/cxxsupport ^platform/cxxsupport
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV ^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM ^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM
^platform/mbed-trace
^platform/randlib
^platform/tests/UNITTESTS ^platform/tests/UNITTESTS
^events/tests/UNITTESTS ^events/tests/UNITTESTS
^rtos/source/TARGET_CORTEX/rtx4 ^rtos/source/TARGET_CORTEX/rtx4
@ -31,4 +33,4 @@
^UNITTESTS ^UNITTESTS
^storage/blockdevice/tests/UNITTESTS ^storage/blockdevice/tests/UNITTESTS
^storage/kvstore/tests/UNITTESTS ^storage/kvstore/tests/UNITTESTS
^drivers/tests/UNITTESTS ^drivers/tests/UNITTESTS

View File

@ -114,6 +114,7 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../features" "${PROJECT_SOURCE_DIR}/../features"
"${PROJECT_SOURCE_DIR}/../platform/include" "${PROJECT_SOURCE_DIR}/../platform/include"
"${PROJECT_SOURCE_DIR}/../platform/include/platform" "${PROJECT_SOURCE_DIR}/../platform/include/platform"
"${PROJECT_SOURCE_DIR}/../platform/mbed-trace/include"
"${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include"
"${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include"
"${PROJECT_SOURCE_DIR}/../storage/blockdevice/include" "${PROJECT_SOURCE_DIR}/../storage/blockdevice/include"
@ -132,7 +133,6 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../events/source" "${PROJECT_SOURCE_DIR}/../events/source"
"${PROJECT_SOURCE_DIR}/../rtos/include" "${PROJECT_SOURCE_DIR}/../rtos/include"
"${PROJECT_SOURCE_DIR}/../features/frameworks" "${PROJECT_SOURCE_DIR}/../features/frameworks"
"${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace"
"${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include" "${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include"

View File

@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
.. ..
../connectivity/mbedtls/include/mbedtls/ ../connectivity/mbedtls/include/mbedtls/
../connectivity/mbedtls/platform/inc/ ../connectivity/mbedtls/platform/inc/
../features/frameworks/mbed-trace/mbed-trace/ ../platform/mbed-trace/include/mbed-trace/
) )
set(unittest-test-sources set(unittest-test-sources

View File

@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/device
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
../drivers ../drivers
../hal ../hal
) )

View File

@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
) )
# Source files # Source files

View File

@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
) )
# Source files # Source files

View File

@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
) )
# Source files # Source files

View File

@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
) )
# Source files # Source files

View File

@ -7,7 +7,7 @@
set(unittest-includes ${unittest-includes} set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
) )
# Source files # Source files

View File

@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../platform/randlib/include/mbed-client-randlib
) )

View File

@ -13,7 +13,7 @@ The STMOD+ Connector specification can be found [here](https://www.st.com/conten
## Debug print ## Debug print
mbed_trace feature is used: https://github.com/ARMmbed/mbed-os/blob/master/features/frameworks/mbed-trace/README.md mbed_trace feature is used: https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed-trace/README.md
Enable it in your mbed_app.json file: Enable it in your mbed_app.json file:

View File

@ -26,8 +26,14 @@
#if (DEVICE_SPI || DEVICE_QSPI) #if (DEVICE_SPI || DEVICE_QSPI)
#include "features/frameworks/mbed-trace/mbed-trace/mbed_trace.h" #if MBED_CONF_MBED_TRACE_ENABLE
#include "mbed-trace/mbed_trace.h"
#define TRACE_GROUP "SFDP" #define TRACE_GROUP "SFDP"
#else // MBED_CONF_MBED_TRACE_ENABLE
#define tr_info(...)
#define tr_error(...)
#define tr_debug(...)
#endif // MBED_CONF_MBED_TRACE_ENABLE
namespace { namespace {

View File

@ -1,2 +0,0 @@
linux/*
test/*

View File

@ -15,4 +15,3 @@ set (MBED_TRACE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/source/mbed_trace.c)
CREATE_LIBRARY(mbedTrace "${MBED_TRACE_SRC}" "") CREATE_LIBRARY(mbedTrace "${MBED_TRACE_SRC}" "")

View File

@ -82,7 +82,7 @@ def morpheusBuildStep(target, compilerLabel, toolchain) {
execute("mbed --version") execute("mbed --version")
execute("echo https://github.com/armmbed/mbed-os/#6a0a86538c0b9b2bfcc4583b1e2b7fea8f4e71e9 > mbed-os.lib") execute("echo https://github.com/armmbed/mbed-os/#6a0a86538c0b9b2bfcc4583b1e2b7fea8f4e71e9 > mbed-os.lib")
execute("mbed deploy") execute("mbed deploy")
execute("rm -rf ./mbed-os/features/frameworks/mbed-trace") execute("rm -rf ./mbed-os/platform/mbed-trace")
execute("mbed compile -m ${target} -t ${toolchain} --library") execute("mbed compile -m ${target} -t ${toolchain} --library")
setBuildStatus('SUCCESS', "build ${buildName}", "build done") setBuildStatus('SUCCESS', "build ${buildName}", "build done")
} catch (err) { } catch (err) {
@ -102,7 +102,7 @@ def morpheusBuildStep(target, compilerLabel, toolchain) {
execute("echo \"https://github.com/ARMmbed/mbed-trace#${env.GIT_COMMIT_HASH}\" > mbed-trace.lib") execute("echo \"https://github.com/ARMmbed/mbed-trace#${env.GIT_COMMIT_HASH}\" > mbed-trace.lib")
execute("mbed new .") execute("mbed new .")
execute("mbed deploy") execute("mbed deploy")
execute("rm -rf ./mbed-os/features/frameworks/mbed-trace") execute("rm -rf ./mbed-os/platform/mbed-trace")
execute("rm -rf ./mbed-trace/example") execute("rm -rf ./mbed-trace/example")
execute("rm -rf ./mbed-trace/test") execute("rm -rf ./mbed-trace/test")
execute("mbed compile -t ${toolchain} -m ${target}") execute("mbed compile -t ${toolchain} -m ${target}")

View File

@ -0,0 +1,2 @@
linux/*
tests/unit/*

View File

@ -0,0 +1 @@
tests/unit/*

View File

@ -5,11 +5,11 @@ clean:
else else
DIRS := $(filter-out ./, $(sort $(dir $(shell find . -name 'Makefile')))) DIRS := $(filter-out ./, $(sort $(dir $(shell find . -name 'Makefile'))))
all: all:
for dir in $(DIRS); do \ for dir in $(DIRS); do \
cd $$dir; make gcov; cd ..;\ cd $$dir; make gcov; cd ..;\
done done
clean: clean:
for dir in $(DIRS); do \ for dir in $(DIRS); do \
cd $$dir; make clean; cd ..;\ cd $$dir; make clean; cd ..;\

View File

@ -261,7 +261,7 @@ ifeq ($(CPPUTEST_USE_MEM_LEAK_DETECTION), N)
CPPUTEST_CPPFLAGS += -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED CPPUTEST_CPPFLAGS += -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED
else else
ifndef CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE ifndef CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h
endif endif
ifndef CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE ifndef CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h
@ -270,7 +270,7 @@ endif
ifeq ($(CPPUTEST_ENABLE_DEBUG), Y) ifeq ($(CPPUTEST_ENABLE_DEBUG), Y)
CPPUTEST_CXXFLAGS += -g CPPUTEST_CXXFLAGS += -g
CPPUTEST_CFLAGS += -g CPPUTEST_CFLAGS += -g
CPPUTEST_LDFLAGS += -g CPPUTEST_LDFLAGS += -g
endif endif

View File

@ -15,4 +15,3 @@ TEST_SRC_FILES = \
include ../MakefileWorker.mk include ../MakefileWorker.mk
CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT -DRANDLIB_PRNG CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT -DRANDLIB_PRNG

View File

@ -12,4 +12,3 @@ int main(int ac, char **av)
} }
IMPORT_TEST_GROUP(randLIB); IMPORT_TEST_GROUP(randLIB);

View File

@ -32,4 +32,3 @@ bool test_randLIB_randomise_base();
#endif #endif
#endif // TEST_RANDLIB_H #endif // TEST_RANDLIB_H

View File

@ -26,7 +26,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "mbed_trace.h" #include "mbed-trace/mbed_trace.h"
#define TRACE_GROUP "FSST" #define TRACE_GROUP "FSST"
#define FSST_REVISION 1 #define FSST_REVISION 1

View File

@ -5,7 +5,7 @@
set(unittest-includes ${unittest-includes} set(unittest-includes ${unittest-includes}
. .
.. ..
../features/frameworks/mbed-trace/mbed-trace ../platform/mbed-trace/mbed-trace
) )
set(unittest-sources set(unittest-sources
@ -15,7 +15,7 @@ set(unittest-sources
../storage/filesystem/source/Dir.cpp ../storage/filesystem/source/Dir.cpp
../storage/filesystem/source/File.cpp ../storage/filesystem/source/File.cpp
../storage/filesystem/source/FileSystem.cpp ../storage/filesystem/source/FileSystem.cpp
../features/frameworks/mbed-trace/source/mbed_trace.c ../platform/mbed-trace/source/mbed_trace.c
../storage/filesystem/littlefs/littlefs/lfs_util.c ../storage/filesystem/littlefs/littlefs/lfs_util.c
../storage/filesystem/littlefs/littlefs/lfs.c ../storage/filesystem/littlefs/littlefs/lfs.c
../platform/source/FileBase.cpp ../platform/source/FileBase.cpp

View File

@ -6,7 +6,7 @@
set(unittest-includes ${unittest-includes} set(unittest-includes ${unittest-includes}
. .
.. ..
../features/frameworks/mbed-trace/mbed-trace ../platform/mbed-trace/mbed-trace
) )
set(unittest-sources set(unittest-sources
@ -14,7 +14,7 @@ set(unittest-sources
../storage/blockdevice/source/HeapBlockDevice.cpp ../storage/blockdevice/source/HeapBlockDevice.cpp
../storage/blockdevice/source/BufferedBlockDevice.cpp ../storage/blockdevice/source/BufferedBlockDevice.cpp
../storage/kvstore/source/TDBStore.cpp ../storage/kvstore/source/TDBStore.cpp
../features/frameworks/mbed-trace/source/mbed_trace.c ../platform/mbed-trace/source/mbed_trace.c
stubs/mbed_atomic_stub.c stubs/mbed_atomic_stub.c
stubs/mbed_assert_stub.cpp stubs/mbed_assert_stub.cpp
stubs/mbed_error.c stubs/mbed_error.c