Skip to content

Relocated libraries in features/frameworks #13430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor

@artokin artokin Sep 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the mbed-trace directory is renamed as include? (in mbed-trace and randlib)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have mbed-trace/mbed_trace.h inside include/. The change is to do with include path namespacing in the new build system being developed.

"${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
Comment on lines 27 to +36
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As something in drivers (a "core" library available for bare metal), mbed-trace shouldn't be a strict requirement. I made this change to fix bare metal build. @evedon @rajkan01


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.

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}" "")

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.
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.
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

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