Merge branch 'master' into feature/f412xg-crash-ram

pull/13723/head
Bora Özgen 2020-10-09 08:52:26 +02:00 committed by GitHub
commit abb5b1221f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5925 changed files with 408237 additions and 30507 deletions

View File

@ -1,29 +0,0 @@
^BUILD
^cmsis
^features/cryptocell
^features/FEATURE_BLE
^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM
^features/frameworks
^features/lwipstack/lwip
^features/lwipstack/lwip-sys
^features/mbedtls
^features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet
^features/nanostack/targets
^features/netsocket/emac-drivers
^features/netsocket/ppp/include
^features/netsocket/ppp/polarssl
^features/netsocket/ppp/source
^features/storage/filesystem/fat/ChaN
^features/storage/filesystem/littlefs/littlefs/
^features/storage/filesystem/littlefsv2/littlefs/
^features/unsupported/
^hal/storage_abstraction
^platform/cxxsupport
^rtos/source/TARGET_CORTEX/rtx4
^rtos/source/TARGET_CORTEX/rtx5
^targets
^TESTS/mbed_hal/trng/pithy
^TESTS/mbed_hal/trng/pithy
^tools
^UNITTESTS

36
.codecheckignore Normal file
View File

@ -0,0 +1,36 @@
^BUILD
^cmsis
^connectivity/drivers/ble
^connectivity/FEATURE_BLE
^connectivity/libraries/mbed-coap
^connectivity/libraries/ppp
^connectivity/drivers/emac
^connectivity/drivers/mbedtls
^connectivity/mbedtls
^features/frameworks
^connectivity/lwipstack/lwip
^connectivity/lwipstack/lwip-sys
^connectivity/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet
^connectivity/nanostack/sal-stack-nanostack-eventloop
^storage/filesystem/fat/ChaN
^storage/filesystem/littlefs/littlefs/
^storage/filesystem/littlefsv2/littlefs/
^features/unsupported/
^hal/storage_abstraction
^hal/tests/TESTS/mbed_hal/trng/pithy
^hal/tests/TESTS/mbed_hal/trng/pithy
^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
^rtos/source/TARGET_CORTEX/rtx5
^targets
^tools
^UNITTESTS
^storage/blockdevice/tests/UNITTESTS
^storage/kvstore/tests/UNITTESTS
^drivers/tests/UNITTESTS

View File

@ -21,13 +21,14 @@ dist: xenial
env:
global:
- deps_url="https://mbed-os-ci.s3-eu-west-1.amazonaws.com/jenkins-ci/deps"
- deps_url="https://mbed-os-ci-public.s3-eu-west-1.amazonaws.com/jenkins-ci/deps"
- deps_dir="${HOME}/.cache/deps"
cache:
pip: true
directories:
- ${HOME}/.cache/deps
- ${HOME}/.ccache
before_install:
@ -43,7 +44,7 @@ after_failure:
matrix:
include:
### Basic Tests ###
- &basic-vm
stage: "Basic"
@ -58,9 +59,12 @@ matrix:
language: python
python: 3.6.8 # scancode-toolkit v3.1.1 requires v3.6.8
install:
# workaround for https://github.com/ARMmbed/mbed-os/issues/13322
- pip install pdfminer.six==20200517
- pip install scancode-toolkit==3.1.1
before_script:
- mkdir -p SCANCODE
- mkdir -p SCANCODE_NEW_FILES
# Fetch remaining information needed for branch comparison
- git fetch --all --unshallow --tags
- git fetch origin "${TRAVIS_BRANCH}"
@ -68,25 +72,42 @@ matrix:
# scancode does not support list of files, only one file or directory
# we use SCANCODE directory for all changed files (their copies with full tree)
- >-
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
git diff --name-only --diff-filter=ad FETCH_HEAD..HEAD \
| ( grep '.\(c\|cpp\|h\|hpp\|py\)$' || true ) \
| ( grep -v '^tools/test/toolchains/api_test.py' || true ) \
| while read file; do cp --parents "${file}" SCANCODE; done
- scancode -l --json-pp scancode.json SCANCODE
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json || true
# run the same but for new files. All new files must have SPDX
- >-
git diff --name-only --diff-filter=A FETCH_HEAD..HEAD \
| ( grep '.\(c\|cpp\|h\|hpp\|py\)$' || true ) \
| ( grep -v '^tools/test/toolchains/api_test.py' || true ) \
| while read file; do cp --parents "${file}" SCANCODE_NEW_FILES; done
- scancode -l --json-pp scancode_new_files.json SCANCODE_NEW_FILES
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode_new_files.json || true
after_success:
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json
- cat scancode-evaluate.log
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode_new_files.json
- cat scancode-evaluate.log
- COUNT_NEW_FILES=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
- |
if [ $COUNT == 0 ]; then
if [ $COUNT == 0 ] && [ $COUNT_NEW_FILES == 0 ]; then
echo "License check OK";
STATUSM="All licenses OK";
set_status "success" "$STATUSM";
elif [ $COUNT_NEW_FILES != 0 ]; then
echo "License check failed, files with the license issues found";
STATUSM="Needs review, license issues in modified files: ${COUNT}, new files: ${COUNT_NEW_FILES}";
set_status "failure" "$STATUSM";
false;
else
echo "License check failed, please review license issues found";
echo "License check failed, please review license issues found in modified files";
STATUSM="Needs review, ${COUNT} license issues found";
set_status "success" "$STATUSM";
false;
fi
@ -98,7 +119,8 @@ matrix:
- |
! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \
':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*'
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*' \
':!*events/tests/*' ':!*drivers/tests/*'
### Docs Tests ###
@ -108,7 +130,7 @@ matrix:
env: NAME=astyle
install:
- >-
curl -L0 https://mbed-os.s3-eu-west-1.amazonaws.com/builds/deps/astyle_3.1_linux.tar.gz --output astyle.tar.gz;
curl -L0 https://mbed-os-ci-public.s3-eu-west-1.amazonaws.com/jenkins-ci/deps/astyle_3.1_linux.tar.gz --output astyle.tar.gz;
mkdir -p BUILD && tar xf astyle.tar.gz -C BUILD;
cd BUILD/astyle/build/gcc;
make;
@ -122,21 +144,22 @@ matrix:
- >-
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
| ( grep '.*\.\(c\|cpp\|h\|hpp\)$' || true ) \
| ( grep -v -f .astyleignore || true ) \
| ( grep -v -f .codecheckignore || true ) \
| while read file; do astyle -n --options=.astylerc "${file}"; done
- git diff --exit-code --diff-filter=d --color
- <<: *docs-vm
name: "spellcheck"
env: NAME=doxy-spellcheck
install:
- source_pkg aspell
script:
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket
# TODO: run checks on all directories once all mispellings are fixed
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos .codecheckignore
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket .codecheckignore
- <<: *docs-vm
name: "doxygen"
@ -152,6 +175,7 @@ matrix:
make;
sudo make install)
# Create BUILD directory for tests
- ccache -s
- mkdir BUILD
script:
# Assert that the Doxygen build produced no warnings.
@ -167,13 +191,41 @@ matrix:
find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" |
tee BUILD/badlibs |
sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ]
# Assert that all assebler files are named correctly
# Assert that all assembler files are named correctly
# The strange command below asserts that there are exactly 0 libraries
# that do end with .s
- >
find -name "*.s" | tee BUILD/badasm |
sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
- <<: *docs-vm
name: "Frozen tools check"
env: NAME=frozen_tools_check
script:
# Reject any changes to tools that would require a re-release of the
# tools for the online compiler.
- >-
frozen_files=`\
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
| egrep \
-e "^tools/build_api*" \
-e "^tools/config*" \
-e "^tools/export*" \
-e "^tools/notifier*" \
-e "^tools/paths*" \
-e "^tools/resources*" \
-e "^tools/targets*" \
-e "^tools/toolchains*" \
-e "^tools/utils*" \
-e "^$"`
if [ -z "$frozen_files" ]; then
echo "Success!";
else
echo -e "Failure: Frozen files were modified\n$frozen_files";
echo -e "Please see https://os.mbed.com/blog/entry/Introducing-the-new-Mbed-Tools/" \
"\nfor why we've frozen the legacy tools.";
false;
fi
### Python Tests ###
- &pytools-vm
@ -222,7 +274,7 @@ matrix:
env: NAME=tools-py3.7
python: 3.7
### Extended Tests ###
- &extended-vm
stage: "Extended"
@ -246,14 +298,13 @@ matrix:
# Check that example compiles without rtos
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp
- |
rm -r rtos/source/TARGET_CORTEX drivers/source/usb features/cellular features/netsocket features/nanostack \
features/lwipstack features/frameworks/greentea-client \
features/frameworks/utest features/frameworks/unity components BUILD
- python tools/make.py -t GCC_ARM -m NUCLEO_F412ZG --source=. --build=BUILD/NUCLEO_F412ZG/GCC_ARM -j0
# Run local equeue tests
- make -C ${EVENTS}/source test
rm -r cmsis/CMSIS_5/CMSIS/RTOS2 cmsis/device/rtos drivers/source/usb connectivity/cellular connectivity/drivers/cellular \
connectivity/libraries/ppp connectivity/netsocket connectivity/nanostack connectivity/lwipstack features/frameworks/greentea-client \
features/frameworks/utest features/frameworks/unity BUILD
- python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0
# Run profiling tests
- make -C ${EVENTS}/source prof | tee prof
- make -C ${EVENTS}/tests/unit prof | tee prof
- ccache -s
after_success:
# Update status, comparing with master if possible.
- |
@ -271,7 +322,7 @@ matrix:
- <<: *extended-vm
name: "littlefs"
env: NAME=littlefs LITTLEFS=features/storage/filesystem/littlefs
env: NAME=littlefs LITTLEFS=storage/filesystem/littlefs
install:
# Install gcc
- source_pkg gcc
@ -327,6 +378,7 @@ matrix:
OBJ="$(ls lfs*.o | tr '\n' ' ')"
CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR"
| tee sizes
- ccache -s
after_success:
# Update status, comparing with master if possible.
- |

View File

@ -1,8 +1,5 @@
# mbed OS code base
# Mbed OS code base
This is the code documentation for mbed OS.
This is the code documentation for Mbed OS.
For more information, please see:
* [The mbed OS API References](https://docs.mbed.com/docs/mbed-os-api-reference/)
* [The mbed OS Handbook](https://docs.mbed.com/docs/mbed-os-handbook/)
For more information, please see [the Mbed OS API references](https://os.mbed.com/docs/mbed-os/latest/apis/index.html) and [the full list of tutorials and examples](https://os.mbed.com/docs/mbed-os/latest/tutorials/index.html).

View File

@ -4,20 +4,22 @@ as can be found in: LICENSE-apache-2.0.txt
Folders containing files under different permissive license than Apache 2.0 are listed below. Each folder should contain its own README file with license specified for its files. The original license text is included in those source files.
- [cmsis](./cmsis) - MIT, BSD-3-Clause
- [components/802.15.4_RF/mcr20a-rf-driver](./components/802.15.4_RF/mcr20a-rf-driver) - BSD-3-Clause
- [connectivity/drivers/802.15.4_RF/mcr20a-rf-driver](./connectivity/drivers/802.15.4_RF/mcr20a-rf-driver) - BSD-3-Clause
- [connectivity/drivers/emac](./connectivity/drivers/emac) - BSD-style
- [features/cryptocell/FEATURE_CRYPTOCELL310](./features/cryptocell/FEATURE_CRYPTOCELL310) - ARM Object Code and Header Files License
- [features/FEATURE_BOOTLOADER](./features/FEATURE_BOOTLOADER) - PBL
- [features/FEATURE_BLE/targets](./features/FEATURE_BLE/targets) - BSD-style, PBL, MIT-style
- [features/FEATURE_PSA/FEATURE_TFM](./features/FEATURE_PSA/FEATURE_TFM) - BSD-3-Clause
- [features/FEATURE_PSA/FEATURE_MBED_PSA_SRV/services/attestation](./features/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation) - BSD-3-Clause
- [features/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor](./features/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor) - BSD-3-Clause
- [features/lorawan](./features/lorawan) - Revised BSD
- [features/lwipstack](./features/lwipstack) - BSD-style, MIT-style
- [features/nanostack/sal-stack-nanostack](./features/nanostack/sal-stack-nanostack) - BSD-3-Clause
- [features/storage](./features/storage) - BSD-style, MIT
- [features/netsocket/emac-drivers](./features/netsocket/emac-drivers) - BSD-style
- [connectivity/lorawan](./connectivity/lorawan) - Revised BSD
- [connectivity/lwipstack](./connectivity/lwipstack) - BSD-style, MIT-style
- [connectivity/nanostack/sal-stack-nanostack](./connectivity/nanostack/sal-stack-nanostack) - BSD-3-Clause
- [features/frameworks/unity/unity](./features/frameworks/unity/unity) - MIT
- [features/unsupported](./features/unsupported) - MIT-style, BSD-style
- [storage/blockdevice](./storage/blockdevice) - Apache 2.0, MIT
- [storage/filesystem/littlefs](.storage/filesystem/littlefs) - [BSD-3-Clause](https://github.com/ARMmbed/littlefs/blob/master/LICENSE.md)
- [storage/filesystem/fat/ChaN](.storage/filesystem/fat/ChaN) - BSD-style, 1 clause, [Copyright ChaN](http://www.elm-chan.org/fsw/ff/doc/appnote.html)
- [rtos](./rtos) - MIT
- [drivers](./drivers) - MIT
- [TESTS/mbed_hal/trng/pithy](./TESTS/mbed_hal/trng/pithy) - BSD-3-Clause

View File

@ -7,11 +7,12 @@
"psa",
"psa-services",
"mbedtls",
"mbedtls-stm",
"mbedtls-nuvoton",
"psa-compliance-framework",
"filesystem",
"littlefs",
"littlefs2",
"mbed-trace",
"device_key",
"storage_tdb_internal",
"storage_filesystem",
@ -22,15 +23,12 @@
"network-emac",
"flashiap-block-device",
"system-storage",
"filesystemstore",
"SecureStore",
"storage",
"kv-map",
"kv-global-api",
"direct-access-devicekey",
"tdbstore",
"kv-config",
"events",
"kv-global-api",
"sd",
"qspif",
"spif-driver",
@ -39,7 +37,6 @@
],
"target_overrides": {
"*": {
"mbed-trace.fea-ipv6": false,
"target.c_lib": "small"
}
}

View File

@ -103,48 +103,58 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNITTEST")
# Set include dirs.
set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/target_h"
"${PROJECT_SOURCE_DIR}/target_h/events"
"${PROJECT_SOURCE_DIR}/target_h/events/equeue"
"${PROJECT_SOURCE_DIR}/../events/tests/UNITTESTS/target_h"
"${PROJECT_SOURCE_DIR}/../events/tests/UNITTESTS/target_h/equeue"
"${PROJECT_SOURCE_DIR}/target_h/platform"
"${PROJECT_SOURCE_DIR}/target_h/platform/cxxsupport"
"${PROJECT_SOURCE_DIR}/target_h/drivers"
"${PROJECT_SOURCE_DIR}/target_h/rtos/include"
"${PROJECT_SOURCE_DIR}/stubs"
"${PROJECT_SOURCE_DIR}/.."
"${PROJECT_SOURCE_DIR}/../features"
"${PROJECT_SOURCE_DIR}/../features/netsocket"
"${PROJECT_SOURCE_DIR}/../platform"
"${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"
"${PROJECT_SOURCE_DIR}/../storage/filesystem/include"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/include"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/kv_config"
"${PROJECT_SOURCE_DIR}/../storage/kvstore/kv_config/include"
"${PROJECT_SOURCE_DIR}/../drivers"
"${PROJECT_SOURCE_DIR}/../drivers/include"
"${PROJECT_SOURCE_DIR}/../drivers/include/drivers"
"${PROJECT_SOURCE_DIR}/../drivers/include/drivers/internal"
"${PROJECT_SOURCE_DIR}/../hal"
"${PROJECT_SOURCE_DIR}/../events"
"${PROJECT_SOURCE_DIR}/../hal/include"
"${PROJECT_SOURCE_DIR}/../events/include"
"${PROJECT_SOURCE_DIR}/../events/include/events/internal"
"${PROJECT_SOURCE_DIR}/../events/source"
"${PROJECT_SOURCE_DIR}/../events/internal"
"${PROJECT_SOURCE_DIR}/../rtos"
"${PROJECT_SOURCE_DIR}/../rtos/TARGET_CORTEX"
"${PROJECT_SOURCE_DIR}/../rtos/TARGET_CORTEX/rtx5/Include"
"${PROJECT_SOURCE_DIR}/../cmsis"
"${PROJECT_SOURCE_DIR}/../rtos/include"
"${PROJECT_SOURCE_DIR}/../features/frameworks"
"${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace"
"${PROJECT_SOURCE_DIR}/../features/frameworks/nanostack-libservice"
"${PROJECT_SOURCE_DIR}/../features/frameworks/nanostack-libservice/mbed-client-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include"
"${PROJECT_SOURCE_DIR}/../features/filesystem/fat"
"${PROJECT_SOURCE_DIR}/../features/filesystem/fat/ChaN"
"${PROJECT_SOURCE_DIR}/../features/filesystem/bd"
"${PROJECT_SOURCE_DIR}/../features/filesystem/"
"${PROJECT_SOURCE_DIR}/../features/filesystem/littlefs"
"${PROJECT_SOURCE_DIR}/../features/filesystem/littlefs/littlefs"
"${PROJECT_SOURCE_DIR}/../features/cellular/framework/API"
"${PROJECT_SOURCE_DIR}/../features/cellular/framework/AT"
"${PROJECT_SOURCE_DIR}/../features/cellular/framework/device"
"${PROJECT_SOURCE_DIR}/../features/cellular/framework"
"${PROJECT_SOURCE_DIR}/../features/cellular/framework/common"
"${PROJECT_SOURCE_DIR}/../features/lorawan"
"${PROJECT_SOURCE_DIR}/../features/lorawan/lorastack"
"${PROJECT_SOURCE_DIR}/../features/lorawan/lorastack/mac"
"${PROJECT_SOURCE_DIR}/../features/lorawan/lorastack/phy"
"${PROJECT_SOURCE_DIR}/../features/lorawan/system"
"${PROJECT_SOURCE_DIR}/../features/mbedtls"
"${PROJECT_SOURCE_DIR}/../features/mbedtls/inc"
"${PROJECT_SOURCE_DIR}/../features/storage/kvstore/conf"
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework/API"
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework/AT"
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework/device"
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework"
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework/common"
"${PROJECT_SOURCE_DIR}/../connectivity"
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/include/lorawan"
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/lorastack"
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/lorastack/mac"
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/lorastack/phy"
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan"
"${PROJECT_SOURCE_DIR}/../connectivity/mbedtls"
"${PROJECT_SOURCE_DIR}/../connectivity/mbedtls/include"
)
# Create a list for test suites.
@ -152,7 +162,7 @@ set(TEST_SUITES)
# Get all matched tests.
file(GLOB_RECURSE unittest-file-list
"unittest.cmake"
"../unittest.cmake" # matches any ../**/unittest.cmake
)
if ("${unittest-file-list}" STREQUAL "")
@ -178,7 +188,7 @@ foreach(testfile ${unittest-file-list})
file(RELATIVE_PATH
TEST_SUITE_NAME # output
${PROJECT_SOURCE_DIR} # root
"${PROJECT_SOURCE_DIR}/.." # root
${TEST_SUITE_DIR} #abs dirpath
)

View File

@ -6,40 +6,9 @@
set(unittest-includes ${unittest-includes}
.
..
../features/mbedtls/inc/mbedtls/
../features/mbedtls/platform/inc/
../features/frameworks/mbed-trace/mbed-trace/
)
set(unittest-sources
../features/device_key/source/DeviceKey.cpp
../components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp
../components/storage/blockdevice/COMPONENT_I2CEE/I2CEEBlockDevice.cpp
../components/storage/blockdevice/COMPONENT_DATAFLASH/DataFlashBlockDevice.cpp
../components/storage/blockdevice/COMPONENT_FLASHIAP/FlashIAPBlockDevice.cpp
../components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp
../components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp
../features/storage/filesystem/Dir.cpp
../features/storage/filesystem/FileSystem.cpp
../features/storage/filesystem/File.cpp
../features/storage/kvstore/global_api/kvstore_global_api.cpp
../features/storage/kvstore/securestore/SecureStore.cpp
../features/storage/kvstore/kv_map/KVMap.cpp
../features/storage/kvstore/tdbstore/TDBStore.cpp
../features/storage/kvstore/direct_access_devicekey/DirectAccessDevicekey.cpp
../features/storage/kvstore/conf/kv_config.cpp
../features/storage/kvstore/filesystemstore/FileSystemStore.cpp
../features/storage/system_storage/SystemStorage.cpp
../features/storage/blockdevice/ChainingBlockDevice.cpp
../features/storage/blockdevice/ReadOnlyBlockDevice.cpp
../features/storage/blockdevice/SlicingBlockDevice.cpp
../features/storage/blockdevice/MBRBlockDevice.cpp
../features/storage/blockdevice/HeapBlockDevice.cpp
../features/storage/blockdevice/FlashSimBlockDevice.cpp
../features/storage/blockdevice/ObservingBlockDevice.cpp
../features/storage/blockdevice/ProfilingBlockDevice.cpp
../features/storage/blockdevice/BufferedBlockDevice.cpp
../features/storage/blockdevice/ExhaustibleBlockDevice.cpp
../connectivity/mbedtls/include/mbedtls/
../connectivity/mbedtls/platform/inc/
../platform/mbed-trace/include/mbed-trace/
)
set(unittest-test-sources

View File

@ -1,27 +0,0 @@
####################
# UNIT TESTS
####################
list(REMOVE_ITEM unittest-includes ${PROJECT_SOURCE_DIR}/target_h/events ${PROJECT_SOURCE_DIR}/target_h/events/equeue)
set(unittest-includes ${unittest-includes}
../events/source
../events
../events/internal
)
set(unittest-sources
../events/source/equeue.c
)
set(unittest-test-sources
events/equeue/test_equeue.cpp
stubs/EqueuePosix_stub.c
)
set(unittest-test-flags
-pthread
-DEQUEUE_PLATFORM_POSIX
)

View File

@ -1,22 +0,0 @@
####################
# UNIT TESTS
####################
# Add test specific include paths
set(unittest-includes ${unittest-includes}
features/cellular/framework/common/util
../features/cellular/framework/common
../features/frameworks/mbed-client-randlib/mbed-client-randlib
)
# Source files
set(unittest-sources
../features/cellular/framework/common/CellularUtil.cpp
)
# Test files
set(unittest-test-sources
features/cellular/framework/common/util/utiltest.cpp
stubs/randLIB_stub.cpp
)

View File

@ -1,44 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/InternetDatagramSocket.cpp
../features/netsocket/UDPSocket.cpp
../features/netsocket/DTLSSocket.cpp
../features/netsocket/DTLSSocketWrapper.cpp
../features/netsocket/TLSSocketWrapper.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/DTLSSocket/test_DTLSSocket.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/Kernel_stub.cpp
stubs/SocketStats_Stub.cpp
)
set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/DTLSSocket/dtls_test_config.h\"")
set_source_files_properties(features/netsocket/DTLSSocket/test_DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})

View File

@ -1,42 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/InternetDatagramSocket.cpp
../features/netsocket/UDPSocket.cpp
../features/netsocket/DTLSSocketWrapper.cpp
../features/netsocket/TLSSocketWrapper.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/Kernel_stub.cpp
stubs/SocketStats_Stub.cpp
)
set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/DTLSSocketWrapper/dtls_test_config.h\"")
set_source_files_properties(features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})

View File

@ -1,38 +0,0 @@
####################
# UNIT TESTS
####################
# Unit test suite name
set(TEST_SUITE_NAME "features_netsocket_EthernetInterface")
# Source files
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/EthernetInterface.cpp
../features/netsocket/EMACInterface.cpp
../features/netsocket/NetworkInterface.cpp
../features/netsocket/NetworkStack.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
../features/frameworks/nanostack-libservice/source/libList/ns_list.c
)
# Test files
set(unittest-test-sources
features/netsocket/EthernetInterface/test_EthernetInterface.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/NetworkStack_stub.cpp
stubs/NetworkInterfaceDefaults_stub.cpp
stubs/SocketStats_Stub.cpp
stubs/mbed_error.c
)

View File

@ -1,34 +0,0 @@
####################
# UNIT TESTS
####################
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_NSAPI_DNS_ADDRESSES_LIMIT=10")
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/InternetSocket/test_InternetSocket.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_error.c
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/SocketStats_Stub.cpp
)

View File

@ -1,34 +0,0 @@
####################
# UNIT TESTS
####################
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_PLATFORM_CALLBACK_COMPARABLE")
# Source files
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/NetworkInterface.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
../features/frameworks/nanostack-libservice/source/libList/ns_list.c
)
# Test files
set(unittest-test-sources
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
features/netsocket/NetworkInterface/test_NetworkInterface.cpp
stubs/NetworkInterfaceDefaults_stub.cpp
stubs/SocketStats_Stub.cpp
stubs/mbed_error.c
)

View File

@ -1,33 +0,0 @@
####################
# UNIT TESTS
####################
# Unit test suite name
set(TEST_SUITE_NAME "features_netsocket_NetworkStack")
# Source files
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/NetworkInterface.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
# Test files
set(unittest-test-sources
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_error.c
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
features/netsocket/NetworkStack/test_NetworkStack.cpp
stubs/SocketStats_Stub.cpp
)

View File

@ -1,39 +0,0 @@
####################
# UNIT TESTS
####################
# Unit test suite name
set(TEST_SUITE_NAME "features_netsocket_PPPInterface")
# Source files
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/PPPInterface.cpp
../features/netsocket/EMACInterface.cpp
../features/netsocket/NetworkInterface.cpp
../features/netsocket/NetworkStack.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
../features/frameworks/nanostack-libservice/source/libList/ns_list.c
)
# Test files
set(unittest-test-sources
features/netsocket/PPPInterface/test_PPPInterface.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/FileHandle_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/NetworkStack_stub.cpp
stubs/NetworkInterfaceDefaults_stub.cpp
stubs/SocketStats_Stub.cpp
stubs/mbed_error.c
)

View File

@ -1,22 +0,0 @@
####################
# UNIT TESTS
####################
# Unit test suite name
set(TEST_SUITE_NAME "features_netsocket_SocketAddress")
# Source files
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
# Test files
set(unittest-test-sources
features/netsocket/SocketAddress/test_SocketAddress.cpp
)

View File

@ -1,33 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/TCPSocket.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/TCPSocket/test_TCPSocket.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_error.c
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/SocketStats_Stub.cpp
)

View File

@ -1,41 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/TCPSocket.cpp
../features/netsocket/TLSSocket.cpp
../features/netsocket/TLSSocketWrapper.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/TLSSocket/test_TLSSocket.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/SocketStats_Stub.cpp
)
set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/TLSSocket/tls_test_config.h\"")
set_source_files_properties(features/netsocket/TLSSocket/test_TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})

View File

@ -1,37 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/TCPSocket.cpp
../features/netsocket/TLSSocketWrapper.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/SocketStats_Stub.cpp
)
set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/TLSSocketWrapper/tls_test_config.h\"")
set_source_files_properties(features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})

View File

@ -1,34 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/InternetDatagramSocket.cpp
../features/netsocket/UDPSocket.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/UDPSocket/test_UDPSocket.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_error.c
stubs/mbed_shared_queues_stub.cpp
stubs/EventFlags_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/SocketStats_Stub.cpp
)

View File

@ -1,12 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/WiFiAccessPoint.cpp
)
set(unittest-test-sources
features/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp
)

View File

@ -1,47 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkInterface.cpp
../features/netsocket/NetworkInterfaceDefaults.cpp
../features/netsocket/NetworkStack.cpp #nsapi_create_stack
../features/netsocket/InternetSocket.cpp
../features/netsocket/TCPSocket.cpp
../features/netsocket/InternetDatagramSocket.cpp
../features/netsocket/UDPSocket.cpp
../features/netsocket/SocketStats.cpp
../features/netsocket/EthernetInterface.cpp
../features/netsocket/EMACInterface.cpp
../features/netsocket/nsapi_dns.cpp
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
../features/frameworks/nanostack-libservice/source/libip6string/ip6tos.c
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
../features/frameworks/nanostack-libservice/source/libip6string/stoip6.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
../features/frameworks/nanostack-libservice/source/libBits/common_functions.c
../features/frameworks/nanostack-libservice/source/libList/ns_list.c
)
set(unittest-test-sources
moduletests/features/netsocket/IfaceDnsSocket/moduletest.cpp
stubs/MeshInterface_stub.cpp
stubs/CellularInterface_stub.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/mbed_rtos_rtx_stub.c
stubs/equeue_stub.c
stubs/EventQueue_stub.cpp
stubs/Kernel_stub.cpp
stubs/mbed_error.c
stubs/mbed_shared_queues_stub.cpp
stubs/rtx_mutex_stub.c
stubs/EventFlags_stub.cpp
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEVICE_EMAC -DMBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=ETHERNET -DMBED_CONF_NSAPI_DNS_RESPONSE_WAIT_TIME=10000 -DMBED_CONF_NSAPI_DNS_RETRIES=1 -DMBED_CONF_NSAPI_DNS_TOTAL_ATTEMPTS=10 -DMBED_CONF_NSAPI_DNS_CACHE_SIZE=5")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEVICE_EMAC -DMBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=ETHERNET -DMBED_CONF_NSAPI_DNS_RESPONSE_WAIT_TIME=10000 -DMBED_CONF_NSAPI_DNS_RETRIES=1 -DMBED_CONF_NSAPI_DNS_TOTAL_ATTEMPTS=10 -DMBED_CONF_NSAPI_DNS_CACHE_SIZE=5")

View File

@ -1,20 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-includes ${unittest-includes}
.
..
)
set(unittest-sources
../features/storage/blockdevice/SlicingBlockDevice.cpp
../features/storage/blockdevice/HeapBlockDevice.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_assert_stub.cpp
)
set(unittest-test-sources
moduletests/storage/blockdevice/SlicingBlockDevice/moduletest.cpp
)

View File

@ -1,40 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-includes ${unittest-includes}
.
..
../features/frameworks/mbed-trace/mbed-trace
)
set(unittest-sources
../features/storage/blockdevice/HeapBlockDevice.cpp
../features/storage/kvstore/filesystemstore/FileSystemStore.cpp
../features/storage/filesystem/littlefs/LittleFileSystem.cpp
../features/storage/filesystem/Dir.cpp
../features/storage/filesystem/File.cpp
../features/storage/filesystem/FileSystem.cpp
../features/frameworks/mbed-trace/source/mbed_trace.c
../features/storage/filesystem/littlefs/littlefs/lfs_util.c
../features/storage/filesystem/littlefs/littlefs/lfs.c
../platform/source/FileBase.cpp
../platform/source/FileSystemHandle.cpp
../platform/source/FileHandle.cpp
)
set(unittest-test-sources
moduletests/storage/kvstore/FileSystemStore/moduletest.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_assert_stub.cpp
stubs/mbed_error.c
stubs/kv_config_stub.cpp
stubs/mbed_retarget_stub.cpp
)
set(unittest-test-flags
-DMBED_LFS_READ_SIZE=64
-DMBED_LFS_PROG_SIZE=64
-DMBED_LFS_BLOCK_SIZE=512
-DMBED_LFS_LOOKAHEAD=512
)

View File

@ -1,27 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-includes ${unittest-includes}
.
..
../features/frameworks/mbed-trace/mbed-trace
)
set(unittest-sources
../features/storage/blockdevice/FlashSimBlockDevice.cpp
../features/storage/blockdevice/HeapBlockDevice.cpp
../features/storage/blockdevice/BufferedBlockDevice.cpp
../features/storage/kvstore/tdbstore/TDBStore.cpp
../features/frameworks/mbed-trace/source/mbed_trace.c
stubs/mbed_atomic_stub.c
stubs/mbed_assert_stub.cpp
stubs/mbed_error.c
)
set(unittest-test-sources
moduletests/storage/kvstore/TDBStore/moduletest.cpp
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

View File

@ -16,7 +16,7 @@
*/
#include <ctype.h>
#include "nsapi_types.h"
#include "netsocket/nsapi_types.h"
#include "events/EventQueue.h"
#include "ATHandler_stub.h"

View File

@ -18,7 +18,7 @@
#include "stdint.h"
#include "stdbool.h"
#include <cstddef>
#include "nsapi_types.h"
#include "netsocket/nsapi_types.h"
#include "ATHandler.h"
#include "FileHandle_stub.h"
#include "Callback.h"

View File

@ -16,7 +16,7 @@
*/
#include "AT_CellularInformation.h"
#include "nsapi_types.h"
#include "netsocket/nsapi_types.h"
using namespace mbed;

View File

@ -20,7 +20,7 @@
#include "CellularUtil.h"
#include "CellularLog.h"
#include "FileHandle.h"
#include "nsapi_types.h"
#include "netsocket/nsapi_types.h"
using namespace mbed;
using namespace mbed_cellular_util;

View File

@ -16,7 +16,7 @@
*/
#include "CellularUtil.h"
#include "ThisThread.h"
#include "rtos/ThisThread.h"
#include "AT_ControlPlane_netif.h"
#include "CellularLog.h"

View File

@ -20,7 +20,7 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "features/storage/blockdevice/BlockDevice.h"
#include "blockdevice/BlockDevice.h"
class BlockDeviceMock : public BlockDevice {
public:

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "CellularInterface.h"
#include "netsocket/CellularInterface.h"
MBED_WEAK CellularInterface *CellularInterface::get_target_default_instance()
{

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "ControlPlane_netif.h"
#include "netsocket/ControlPlane_netif.h"
#include <list>
namespace mbed {

View File

@ -20,7 +20,7 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "features/netsocket/EMAC.h"
#include "netsocket/EMAC.h"
class MockEMAC : public EMAC {
public:

View File

@ -17,7 +17,7 @@
#ifndef EMULATEDSD_H
#define EMULATEDSD_H
#include "features/storage/blockdevice/BlockDevice.h"
#include "blockdevice/BlockDevice.h"
class EmulatedSD_Private;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "Kernel.h"
#include "rtos/Kernel.h"
namespace rtos {

View File

@ -20,7 +20,7 @@
#include <cstddef>
#include "lorawan_types.h"
#include "lorawan_data_structures.h"
#include "system/lorawan_data_structures.h"
namespace LoRaMac_stub {
extern bool bool_value;

View File

@ -16,7 +16,7 @@
*/
#include "mbed_assert.h"
#include "LoRaWANTimer.h"
#include "system/LoRaWANTimer.h"
#include "LoRaWANTimer_stub.h"

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "LoRaWANTimer.h"
#include "system/LoRaWANTimer.h"
namespace LoRaWANTimer_stub {
extern lorawan_time_t time_value;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "MeshInterface.h"
#include "netsocket/MeshInterface.h"
MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance()
{

View File

@ -15,9 +15,9 @@
* limitations under the License.
*/
#include "netsocket/NetworkInterface.h"
#include "WiFiInterface.h"
#include "CellularInterface.h"
#include "MeshInterface.h"
#include "netsocket/WiFiInterface.h"
#include "netsocket/CellularInterface.h"
#include "netsocket/MeshInterface.h"
MBED_WEAK WiFiInterface *WiFiInterface::get_default_instance()
{

View File

@ -15,8 +15,8 @@
* limitations under the License.
*/
#include "NetworkStack.h"
#include "nsapi_dns.h"
#include "netsocket/NetworkStack.h"
#include "netsocket/nsapi_dns.h"
#include "mbed.h"
#include "stddef.h"
#include <new>

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "Semaphore.h"
#include "rtos/Semaphore.h"
#include "Semaphore_stub.h"
int Semaphore_stub::wait_return_value = 0;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "SocketAddress.h"
#include "netsocket/SocketAddress.h"
SocketAddress::SocketAddress(const nsapi_addr_t &addr, uint16_t port)

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "SocketStats.h"
#include "netsocket/SocketStats.h"
#if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED
int SocketStats::get_entry_position(const Socket *const reference_id)

View File

@ -17,7 +17,7 @@
#ifndef THREAD_STUB_H_
#define THREAD_STUB_H_
#include "Thread.h"
#include "rtos/Thread.h"
namespace Thread_stub {
extern osStatus osStatus_value;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "equeue.h"
#include "events/equeue.h"
#include <stdlib.h>
#include "equeue_stub.h"

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "features/storage/kvstore/conf/kv_config.h"
#include "kv_config/kv_config.h"
const char *get_filesystemstore_folder_path()
{

View File

@ -51,6 +51,11 @@ void pwmout_period_us(pwmout_t *obj, int us)
{
}
int pwmout_read_period_us(pwmout_t *obj)
{
return 0;
}
void pwmout_pulsewidth(pwmout_t *obj, float seconds)
{
}
@ -63,4 +68,9 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us)
{
}
int pwmout_read_pulsewidth_us(pwmout_t *obj)
{
return 0;
}
#endif // DEVICE_PWMOUT

View File

@ -17,7 +17,7 @@
#include "stdlib.h"
#include "us_ticker_api.h"
#include "hal/us_ticker_api.h"
const ticker_data_t *get_us_ticker_data(void)
{

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "watchdog_api.h"
#include "hal/watchdog_api.h"
#if DEVICE_WATCHDOG

View File

@ -47,6 +47,6 @@ typedef enum {
#ifdef __cplusplus
}
#endif
#include "pinmap.h"
#include "hal/pinmap.h"
#endif

View File

@ -18,8 +18,8 @@
#define __MUTEX_H__
#include <inttypes.h>
#include "mbed_rtos_types.h"
#include "mbed_rtos1_types.h"
#include "rtos/mbed_rtos_types.h"
#include "rtos/internal/mbed_rtos1_types.h"
namespace rtos {

View File

@ -19,6 +19,7 @@
#include <stdint.h>
#include "cmsis_os2.h"
#include "rtos/Kernel.h"
namespace rtos {
class Semaphore {
@ -28,8 +29,13 @@ public:
void acquire();
bool try_acquire();
bool try_acquire_for(uint32_t millisec);
bool try_acquire_for(Kernel::Clock::duration_u32 rel_time);
bool try_acquire_until(uint64_t millisec);
bool try_acquire_until(Kernel::Clock::time_point abs_time);
osStatus release(void);
~Semaphore();
private:
void constructor(int32_t count, uint16_t max_count);
};
}

View File

@ -25,6 +25,9 @@
#include <stdint.h>
#include "cmsis_os.h"
#include "platform/Callback.h"
#define OS_STACK_SIZE 0
namespace rtos {
@ -43,12 +46,10 @@ public:
{
}
osStatus start(mbed::Callback<void()> task) {
return 0;
}
osStatus start(mbed::Callback<void()> task);
osStatus join() {return 0;};
osStatus terminate(){return 0;};
osStatus terminate();
osStatus set_priority(osPriority priority){return 0;};
osPriority get_priority() const{return osPriorityNormal;};
uint32_t flags_set(uint32_t flags){return 0;};
@ -97,6 +98,14 @@ public:
osThreadId_t get_id() const {
return 0;
};
virtual ~Thread();
private:
// Required to share definitions without
// delegated constructors
void constructor(osPriority priority = osPriorityNormal,
uint32_t stack_size = OS_STACK_SIZE,
unsigned char *stack_mem = nullptr,
const char *name = nullptr);
};
}
#endif

Some files were not shown because too many files have changed in this diff Show More