Skip to content

Commit

Permalink
Merge pull request #13430 from LDong-Arm/refactor_frameworks
Browse files Browse the repository at this point in the history
Relocated libraries in features/frameworks
  • Loading branch information
0xc0170 authored Sep 7, 2020
2 parents 54f0f56 + 183ca77 commit 41f2ee5
Show file tree
Hide file tree
Showing 50 changed files with 34 additions and 30 deletions.
4 changes: 3 additions & 1 deletion .codecheckignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
^platform/cxxsupport
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM
^platform/mbed-trace
^platform/randlib
^platform/tests/UNITTESTS
^events/tests/UNITTESTS
^rtos/source/TARGET_CORTEX/rtx4
Expand All @@ -31,4 +33,4 @@
^UNITTESTS
^storage/blockdevice/tests/UNITTESTS
^storage/kvstore/tests/UNITTESTS
^drivers/tests/UNITTESTS
^drivers/tests/UNITTESTS
2 changes: 1 addition & 1 deletion UNITTESTS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../features"
"${PROJECT_SOURCE_DIR}/../platform/include"
"${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/fat/include"
"${PROJECT_SOURCE_DIR}/../storage/blockdevice/include"
Expand All @@ -132,7 +133,6 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../events/source"
"${PROJECT_SOURCE_DIR}/../rtos/include"
"${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/mbed-client-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include"
Expand Down
2 changes: 1 addition & 1 deletion UNITTESTS/empty_baseline/unittest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
..
../connectivity/mbedtls/include/mbedtls/
../connectivity/mbedtls/platform/inc/
../features/frameworks/mbed-trace/mbed-trace/
../platform/mbed-trace/include/mbed-trace/
)

set(unittest-test-sources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT
../connectivity/cellular/include/cellular/framework/device
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib
../drivers
../hal
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib
)

# Source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib
)

# Source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib
)

# Source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib
)

# Source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib
)

# Source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/tests/UNITTESTS/framework/common/util
../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib
../platform/randlib/include/mbed-client-randlib

)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The STMOD+ Connector specification can be found [here](https://www.st.com/conten

## 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:

Expand Down
8 changes: 7 additions & 1 deletion drivers/source/SFDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@

#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"
#else // MBED_CONF_MBED_TRACE_ENABLE
#define tr_info(...)
#define tr_error(...)
#define tr_debug(...)
#endif // MBED_CONF_MBED_TRACE_ENABLE

namespace {

Expand Down
2 changes: 0 additions & 2 deletions features/frameworks/mbed-client-randlib/.mbedignore

This file was deleted.

1 change: 0 additions & 1 deletion features/frameworks/mbed-client-randlib/.yotta_ignore

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ set (MBED_TRACE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/source/mbed_trace.c)


CREATE_LIBRARY(mbedTrace "${MBED_TRACE_SRC}" "")

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def morpheusBuildStep(target, compilerLabel, toolchain) {
execute("mbed --version")
execute("echo https://github.com/armmbed/mbed-os/#6a0a86538c0b9b2bfcc4583b1e2b7fea8f4e71e9 > mbed-os.lib")
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")
setBuildStatus('SUCCESS', "build ${buildName}", "build done")
} catch (err) {
Expand All @@ -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("mbed new .")
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/test")
execute("mbed compile -t ${toolchain} -m ${target}")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions platform/randlib/.mbedignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
linux/*
tests/unit/*
1 change: 1 addition & 0 deletions platform/randlib/.yotta_ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/unit/*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ clean:
else
DIRS := $(filter-out ./, $(sort $(dir $(shell find . -name 'Makefile'))))

all:
all:
for dir in $(DIRS); do \
cd $$dir; make gcov; cd ..;\
done

clean:
for dir in $(DIRS); do \
cd $$dir; make clean; cd ..;\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ ifeq ($(CPPUTEST_USE_MEM_LEAK_DETECTION), N)
CPPUTEST_CPPFLAGS += -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED
else
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
ifndef CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h
Expand All @@ -270,7 +270,7 @@ endif

ifeq ($(CPPUTEST_ENABLE_DEBUG), Y)
CPPUTEST_CXXFLAGS += -g
CPPUTEST_CFLAGS += -g
CPPUTEST_CFLAGS += -g
CPPUTEST_LDFLAGS += -g
endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ TEST_SRC_FILES = \
include ../MakefileWorker.mk

CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT -DRANDLIB_PRNG

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ int main(int ac, char **av)
}

IMPORT_TEST_GROUP(randLIB);

Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ bool test_randLIB_randomise_base();
#endif

#endif // TEST_RANDLIB_H

File renamed without changes.
2 changes: 1 addition & 1 deletion storage/kvstore/source/FileSystemStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdlib.h>

#include "mbed_trace.h"
#include "mbed-trace/mbed_trace.h"
#define TRACE_GROUP "FSST"

#define FSST_REVISION 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set(unittest-includes ${unittest-includes}
.
..
../features/frameworks/mbed-trace/mbed-trace
../platform/mbed-trace/mbed-trace
)

set(unittest-sources
Expand All @@ -15,7 +15,7 @@ set(unittest-sources
../storage/filesystem/source/Dir.cpp
../storage/filesystem/source/File.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.c
../platform/source/FileBase.cpp
Expand Down
4 changes: 2 additions & 2 deletions storage/kvstore/tests/UNITTESTS/TDBStore/unittest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
set(unittest-includes ${unittest-includes}
.
..
../features/frameworks/mbed-trace/mbed-trace
../platform/mbed-trace/mbed-trace
)

set(unittest-sources
../storage/blockdevice/source/FlashSimBlockDevice.cpp
../storage/blockdevice/source/HeapBlockDevice.cpp
../storage/blockdevice/source/BufferedBlockDevice.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_assert_stub.cpp
stubs/mbed_error.c
Expand Down

0 comments on commit 41f2ee5

Please sign in to comment.