Skip to content

Commit

Permalink
Merge pull request #5 from ARMmbed/master
Browse files Browse the repository at this point in the history
Up to date
  • Loading branch information
Allmoz authored Sep 1, 2020
2 parents e127bb2 + 4ef38f9 commit b6f76cb
Show file tree
Hide file tree
Showing 1,644 changed files with 177,238 additions and 10,089 deletions.
8 changes: 4 additions & 4 deletions .astyleignore → .codecheckignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
^connectivity/libraries/mbed-coap
^connectivity/libraries/ppp
^connectivity/drivers/emac
^features/cryptocell
^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM
^connectivity/drivers/mbedtls
^connectivity/mbedtls
^features/frameworks
^connectivity/lwipstack/lwip
^connectivity/lwipstack/lwip-sys
^features/mbedtls
^connectivity/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet
^connectivity/nanostack/sal-stack-nanostack-eventloop
^storage/filesystem/fat/ChaN
Expand All @@ -20,6 +18,8 @@
^features/unsupported/
^hal/storage_abstraction
^platform/cxxsupport
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM
^platform/tests/UNITTESTS
^events/tests/UNITTESTS
^rtos/source/TARGET_CORTEX/rtx4
Expand Down
53 changes: 43 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ cache:
pip: true
directories:
- ${HOME}/.cache/deps
- ${HOME}/.ccache


before_install:
Expand All @@ -43,7 +44,7 @@ after_failure:

matrix:
include:

### Basic Tests ###
- &basic-vm
stage: "Basic"
Expand Down Expand Up @@ -125,21 +126,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 connectivity/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"
Expand All @@ -155,6 +157,7 @@ matrix:
make;
sudo make install)
# Create BUILD directory for tests
- ccache -s
- mkdir BUILD
script:
# Assert that the Doxygen build produced no warnings.
Expand All @@ -170,13 +173,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
Expand Down Expand Up @@ -225,7 +256,7 @@ matrix:
env: NAME=tools-py3.7
python: 3.7


### Extended Tests ###
- &extended-vm
stage: "Extended"
Expand Down Expand Up @@ -255,6 +286,7 @@ matrix:
- python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0
# Run profiling tests
- make -C ${EVENTS}/tests/unit prof | tee prof
- ccache -s
after_success:
# Update status, comparing with master if possible.
- |
Expand Down Expand Up @@ -328,6 +360,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.
- |
Expand Down
9 changes: 3 additions & 6 deletions DOXYGEN_FRONTPAGE.md
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Folders containing files under different permissive license than Apache 2.0 are
- [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
- [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
Expand Down
2 changes: 2 additions & 0 deletions TESTS/configs/baremetal.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"psa",
"psa-services",
"mbedtls",
"mbedtls-stm",
"mbedtls-nuvoton",
"psa-compliance-framework",
"filesystem",
"littlefs",
Expand Down
15 changes: 8 additions & 7 deletions UNITTESTS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ set(unittest-includes-base
"${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}/../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}/../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.
Expand Down
4 changes: 2 additions & 2 deletions UNITTESTS/empty_baseline/unittest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
set(unittest-includes ${unittest-includes}
.
..
../features/mbedtls/inc/mbedtls/
../features/mbedtls/platform/inc/
../connectivity/mbedtls/include/mbedtls/
../connectivity/mbedtls/platform/inc/
../features/frameworks/mbed-trace/mbed-trace/
)

Expand Down
2 changes: 1 addition & 1 deletion UNITTESTS/stubs/LoRaMac_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion UNITTESTS/stubs/LoRaWANTimer_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#include "mbed_assert.h"
#include "LoRaWANTimer.h"
#include "system/LoRaWANTimer.h"

#include "LoRaWANTimer_stub.h"

Expand Down
2 changes: 1 addition & 1 deletion UNITTESTS/stubs/LoRaWANTimer_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include "LoRaWANTimer.h"
#include "system/LoRaWANTimer.h"

namespace LoRaWANTimer_stub {
extern lorawan_time_t time_value;
Expand Down
1 change: 1 addition & 0 deletions connectivity/FEATURE_BLE/include/ble/Gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ class Gap {
* to see if the connection was created.
*
* @return BLE_ERROR_NONE if the connection attempt has been requested to be cancelled.
* Returns BLE_ERROR_OPERATION_NOT_PERMITTED if no ongoing connection for last used address found.
*/
ble_error_t cancelConnect();
#endif // BLE_ROLE_CENTRAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,11 @@ class PalAttClient : public interface::PalAttClient {
struct PrepareWriteResponseConverter : ResponseConverter<ATTC_PREPARE_WRITE_RSP> {
static AttPrepareWriteResponse convert(const attEvt_t* event)
{
// WARNING: Not sure if correct, the stack erase the length parameter
return AttPrepareWriteResponse(
event->handle,
to_uint16_t(event->pValue + 2),
// FIXME: the stack set the lenght to 0, the data won't be seen ...
0, /* offset is lost */
make_const_Span(
event->pValue + 4,
event->pValue,
event->valueLen
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "PalGap.h"
#include "hci_api.h"
#include "dm_api.h"
#include "dm_main.h"
#include "dm_conn.h"

namespace ble {

Expand Down Expand Up @@ -322,12 +324,21 @@ ble_error_t PalGap::create_connection(

ble_error_t PalGap::cancel_connection_creation()
{
DmConnClose(
DM_CLIENT_ID_APP,
/* connection handle - invalid */ DM_CONN_ID_NONE,
/* reason - invalid (use success) */ 0x00
);
return BLE_ERROR_NONE;
ble_error_t error = BLE_ERROR_OPERATION_NOT_PERMITTED;

for (uint8_t connection_id = 0; connection_id < DM_CONN_MAX; connection_id++) {
if (dmConnCb.ccb[connection_id].inUse &&
dmConnCb.ccb[connection_id].state == DM_CONN_SM_ST_CONNECTING) {
DmConnClose(
DM_CLIENT_ID_APP,
/* connection handle */ connection_id + 1 /* connection IDs start at 1 */,
/* reason - invalid (use success) */ 0x00
);
}
error = BLE_ERROR_NONE;
}

return error;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void attsProcPrepWriteReq(attsCcb_t *pCcb, uint16_t len, uint8_t *pPacket)
}
/* verify write length, fixed length */
else if (((pAttr->settings & ATTS_SET_VARIABLE_LEN) == 0) &&
(writeLen != pAttr->maxLen))
(writeLen > pAttr->maxLen))
{
err = ATT_ERR_LENGTH;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,6 @@ ble_error_t Gap::cancelConnect()
return _pal_gap.cancel_connection_creation();
}


ble_error_t Gap::readPhy(ble::connection_handle_t connection)
{
return _pal_gap.read_phy(connection);
Expand Down
Loading

0 comments on commit b6f76cb

Please sign in to comment.