Skip to content

Release candidate for mbed-os-5.8.2 #6579

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 48 commits into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
426df19
rtl8195am: fix LogUART Tx interrupt crash
M-ichae-l Mar 21, 2018
16e6c7f
Realtek: serial - line ending fix
0xc0170 Mar 26, 2018
a6e05a0
Avoid incorrect config errors on export
theotherjimmy Mar 22, 2018
ddccbdf
Support v3.0 pin map
cyliangtw Mar 22, 2018
37fbb7c
lwIP: fix some IPv6 errors, eg TCP keepalive
kjbracey Mar 21, 2018
7cd9919
Add missing Doxygen descriptions for Nanostack
Mar 8, 2018
6988e8e
Move filter dot into exporter base class
theotherjimmy Mar 27, 2018
1ea2e57
Minimize include path size in uvision export
theotherjimmy Mar 27, 2018
bb59226
flash: add docs for user defined data
0xc0170 Mar 15, 2018
957e1ce
KL82Z: Fix the clock selection for LPUART module
mmahadevan108 Mar 27, 2018
7360771
Set up the ISR stack pointer in the right location on ARMCC
stevew817 Mar 27, 2018
cd07a81
LPC176X: Fix flash program size
toyowata Mar 21, 2018
8ef66c7
Add alignment check in the flash_program_page
toyowata Mar 27, 2018
ac504f9
Added Support for Toshiba TMPM46B
Jan 22, 2018
704bc6c
Modified ESG reset process
Mar 16, 2018
fb98c9b
CI build - case sensitive include header resolved
Mar 21, 2018
cc29812
Dynamic vector relocation and formatting changes
Mar 23, 2018
f645ba5
Low power consumption mode for deepsleep
Mar 26, 2018
85a1139
Remove unnecessary TIMER_Start in the end of lp_ticker_set_interrupt
ccli8 Mar 26, 2018
f6ac93a
Check timer active flag after enabling timer counting in us_ticker/lp…
ccli8 Mar 26, 2018
0d914a9
Add missing delay in lp_ticker
ccli8 Mar 26, 2018
ae0f38a
Enable tickless mode on Silicon Labs targets
stevew817 Mar 27, 2018
a84d08e
Fixed inconsistent casing issue for SecurityDb
Mar 28, 2018
14892d9
add support for the RAK811
ithinuel Feb 8, 2018
9602e1d
add RF_TXCO_EN on PH1 and set HSI calibration to its default value
ithinuel Feb 19, 2018
c9e37d9
switch to stm32l151cb-a & work around flash size field width.
ithinuel Mar 26, 2018
ea42e6d
add the target to travis build script & sw4stm32 export script.
ithinuel Mar 27, 2018
23ba044
fix device name (an mixed tab/space)
ithinuel Mar 27, 2018
14558c6
add IAR to the supported toolchain
ithinuel Mar 27, 2018
42eda19
Move Mbed 5 support check so that it affects the exporters
theotherjimmy Mar 29, 2018
de417d6
Inrease thread stack size to 1024 bytes in NVStore test for NRF52
Mar 30, 2018
6262664
Fix deep sleep locking for Timeout class
c1728p9 Mar 27, 2018
204aa9f
Test line-ending problems
Apr 3, 2018
5b7e67e
Update mbed-coap to version 4.4.1
Apr 3, 2018
07ea79c
Fix doxygen comments to reflect the deprecated functions
SenRamakri Apr 3, 2018
9bc9f2f
Fix EV_COG_AD4050LZ `us_ticker_fire_interrupt()` minimal time interval
Apr 1, 2018
81445a0
Fix EV_COG_AD3029LZ `us_ticker_fire_interrupt()` minimal time interval
Apr 1, 2018
cc7e16c
Added test for MbedCRC.h
Mar 23, 2018
0c950a6
Default constructor for template class should be part of header file
Mar 23, 2018
9b4491c
Fix IPv4 address parsing due to not-so-portable scanf modifier
forGGe Apr 2, 2018
aa65a10
LoRa: Fixed cflist decoding issue
Apr 6, 2018
5404532
L1 ST CUBE V1.8.1
bcostm Mar 26, 2018
97676e4
Fix typos causing ARM build error
bcostm Mar 28, 2018
e513e64
STM32L1: allow redefinition of FLASH_SIZE macro
bcostm Apr 3, 2018
6d8cb38
Update stm32l151xba.h
bcostm Apr 3, 2018
42a51ef
Error on invalid mbed_lib JSON
theotherjimmy Apr 5, 2018
db78710
Update Mbed version block for patch release
adbridge Apr 9, 2018
153b137
Lora: Fix resetting of max_eirp and antenna_gain values
Mar 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,9 @@ matrix:
STATUSM="$STATUSM ($(python -c "print '%+.2f' % (100*($CURR-$PREV)/$PREV.0)")%)"
fi
- bash -c "$STATUS" success "$STATUSM"

- env:
- NAME=gitattributestest
script:
# Check that no changes after clone. This check that .gitattributes is used right way.
- git diff --exit-code
144 changes: 144 additions & 0 deletions TESTS/mbed_drivers/crc/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@

/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"

#include "mbed.h"

using namespace utest::v1;

void test_supported_polynomials()
{
char test[] = "123456789";
uint32_t crc;

{
MbedCRC<POLY_7BIT_SD, 7> ct;
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0xEA, crc);
}
{
MbedCRC<POLY_8BIT_CCITT, 8> ct;
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0xF4, crc);
}
{
MbedCRC<POLY_16BIT_CCITT, 16> ct;
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0x29B1, crc);
}
{
MbedCRC<POLY_16BIT_IBM, 16> ct;
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0xBB3D, crc);
}
{
MbedCRC<POLY_32BIT_ANSI, 32> ct;
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0xCBF43926, crc);
}
}

void test_partial_crc()
{
char test[] = "123456789";
uint32_t crc;
{
MbedCRC<POLY_16BIT_CCITT, 16> ct;
TEST_ASSERT_EQUAL(0, ct.compute_partial_start(&crc));
TEST_ASSERT_EQUAL(0, ct.compute_partial((void *)&test, 4, &crc));
TEST_ASSERT_EQUAL(0, ct.compute_partial((void *)&test[4], 5, &crc));
TEST_ASSERT_EQUAL(0, ct.compute_partial_stop(&crc));

TEST_ASSERT_EQUAL(0x29B1, crc);
}
}

void test_sd_crc()
{
MbedCRC<POLY_7BIT_SD, 7> crc7;
uint32_t crc;
char test[512];

test[0] = 0x40;
test[1] = 0x00;
test[2] = 0x00;
test[3] = 0x00;
test[4] = 0x00;
TEST_ASSERT_EQUAL(0, crc7.compute((void *)test, 5, &crc));
crc = (crc | 0x1 ) & 0xFF;
TEST_ASSERT_EQUAL(0x95, crc);

test[0] = 0x48;
test[1] = 0x00;
test[2] = 0x00;
test[3] = 0x01;
test[4] = 0xAA;
TEST_ASSERT_EQUAL(0, crc7.compute((void *)test, 5, &crc));
crc = (crc | 0x1 ) & 0xFF;
TEST_ASSERT_EQUAL(0x87, crc);

test[0] = 0x51;
test[1] = 0x00;
test[2] = 0x00;
test[3] = 0x00;
test[4] = 0x00;
TEST_ASSERT_EQUAL(0, crc7.compute((void *)test, 5, &crc));
crc = (crc | 0x1 ) & 0xFF;
TEST_ASSERT_EQUAL(0x55, crc);

MbedCRC<POLY_16BIT_CCITT, 16> crc16(0, 0, false, false);
memset(test, 0xFF, 512);
TEST_ASSERT_EQUAL(0, crc16.compute((void *)test, 512, &crc));
TEST_ASSERT_EQUAL(0x7FA1, crc);
}

void test_any_polynomial()
{
char test[] = "123456789";
uint32_t crc;
{
MbedCRC<0x3D65, 16> ct(0x0, 0xFFFF, 0, 0);
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0xC2B7, crc);
}
{
MbedCRC<0x1EDC6F41, 32> ct(0xFFFFFFFF, 0xFFFFFFFF, 1, 1);
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
TEST_ASSERT_EQUAL(0xE3069283, crc);
}
}

Case cases[] = {
Case("Test supported polynomials", test_supported_polynomials),
Case("Test partial CRC", test_partial_crc),
Case("Test SD CRC polynomials", test_sd_crc),
Case("Test not supported polynomials", test_any_polynomial)
};

utest::v1::status_t greentea_test_setup(const size_t number_of_cases) {
GREENTEA_SETUP(15, "default_auto");
return greentea_test_setup_handler(number_of_cases);
}

Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler);

int main() {
Harness::run(specification);
}
3 changes: 2 additions & 1 deletion doxyfile_options
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,8 @@ EXCLUDE_PATTERNS = */tools/* \
*/features/FEATURE_COMMON_PAL/* \
*/features/FEATURE_LWIP/* \
*/features/FEATURE_UVISOR/* \
*/features/nanostack/* \
*/features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/* \
*/features/nanostack/FEATURE_NANOSTACK/coap-service/* \
*/ble/generic/* \
*/ble/pal/*

Expand Down
2 changes: 1 addition & 1 deletion doxygen_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"PREDEFINED": "DOXYGEN_ONLY DEVICE_ANALOGIN DEVICE_ANALOGOUT DEVICE_CAN DEVICE_ETHERNET DEVICE_EMAC DEVICE_FLASH DEVICE_I2C DEVICE_I2CSLAVE DEVICE_I2C_ASYNCH DEVICE_INTERRUPTIN DEVICE_ITM DEVICE_LOWPOWERTIMER DEVICE_PORTIN DEVICE_PORTINOUT DEVICE_PORTOUT DEVICE_PWMOUT DEVICE_RTC DEVICE_TRNG DEVICE_SERIAL DEVICE_SERIAL_ASYNCH DEVICE_SERIAL_FC DEVICE_SLEEP DEVICE_SPI DEVICE_SPI_ASYNCH DEVICE_SPISLAVE DEVICE_STORAGE \"MBED_DEPRECATED_SINCE(f, g)=\" \"MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M)=\" \"MBED_DEPRECATED(s)=\"",
"EXPAND_AS_DEFINED": "",
"SKIP_FUNCTION_MACROS": "NO",
"EXCLUDE_PATTERNS": "*/tools/* */targets/* */features/mbedtls/* */features/storage/* */features/unsupported/* */BUILD/* */rtos/TARGET_CORTEX/rtx*/* */cmsis/* */features/FEATURE_COMMON_PAL/* */features/FEATURE_LWIP/* */features/FEATURE_UVISOR/* */features/nanostack/* */ble/generic/* */ble/pal/*"
"EXCLUDE_PATTERNS": "*/tools/* */targets/* */features/mbedtls/* */features/storage/* */features/unsupported/* */BUILD/* */rtos/TARGET_CORTEX/rtx*/* */cmsis/* */features/FEATURE_COMMON_PAL/* */features/FEATURE_LWIP/* */features/FEATURE_UVISOR/* */features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/* */features/nanostack/FEATURE_NANOSTACK/coap-service/* */ble/generic/* */ble/pal/*"
}
16 changes: 16 additions & 0 deletions drivers/InterruptManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace mbed {
/** \addtogroup drivers */

/** Use this singleton if you need to chain interrupt handlers.
* @deprecated Do not use this class. This class is not part of the public API of mbed-os and is being removed in the future.
*
* @note Synchronization level: Thread safe
*
Expand Down Expand Up @@ -57,6 +58,8 @@ namespace mbed {
class InterruptManager : private NonCopyable<InterruptManager> {
public:
/** Get the instance of InterruptManager Class
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
* @return the only instance of this class
*/
Expand All @@ -65,12 +68,17 @@ class InterruptManager : private NonCopyable<InterruptManager> {
static InterruptManager* get();

/** Destroy the current instance of the interrupt manager
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
*/
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
"public API of mbed-os and is being removed in the future.")
static void destroy();

/** Add a handler for an interrupt at the end of the handler list
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
* @param function the handler to add
* @param irq interrupt number
Expand All @@ -86,6 +94,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
}

/** Add a handler for an interrupt at the beginning of the handler list
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
* @param function the handler to add
* @param irq interrupt number
Expand All @@ -101,6 +111,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
}

/** Add a handler for an interrupt at the end of the handler list
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
* @param tptr pointer to the object that has the handler function
* @param mptr pointer to the actual handler function
Expand All @@ -118,6 +130,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
}

/** Add a handler for an interrupt at the beginning of the handler list
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
* @param tptr pointer to the object that has the handler function
* @param mptr pointer to the actual handler function
Expand All @@ -135,6 +149,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
}

/** Remove a handler from an interrupt
* @deprecated
* Do not use this function, this class is not part of the public API of mbed-os and is being removed in the future.
*
* @param handler the function object for the handler to remove
* @param irq the interrupt number
Expand Down
7 changes: 0 additions & 7 deletions drivers/MbedCRC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ namespace mbed {

/* Default values for different types of polynomials
*/
template <uint32_t polynomial, uint8_t width>
MbedCRC<polynomial, width>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder), _crc_table(NULL)
{
mbed_crc_ctor();
}

template<>
MbedCRC<POLY_32BIT_ANSI, 32>::MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder):
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data), _reflect_remainder(reflect_remainder),
Expand Down
7 changes: 6 additions & 1 deletion drivers/MbedCRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ class MbedCRC
* polynomials with different intial/final/reflect values
*
*/
MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder);
MbedCRC(uint32_t initial_xor, uint32_t final_xor, bool reflect_data, bool reflect_remainder) :
_initial_value(initial_xor), _final_xor(final_xor), _reflect_data(reflect_data),
_reflect_remainder(reflect_remainder), _crc_table(NULL)
{
mbed_crc_ctor();
}
MbedCRC();
virtual ~MbedCRC()
{
Expand Down
4 changes: 3 additions & 1 deletion drivers/Timeout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
namespace mbed {

void Timeout::handler() {
_function.call();
Callback<void()> local = _function;
detach();
local.call();
}

} // namespace mbed
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef PAL_MEMORY_SECURITY_DB_H_
#define PAL_MEMORY_SECURITY_DB_H_

#include "SecurityDB.h"
#include "SecurityDb.h"

namespace ble {
namespace pal {
Expand Down
4 changes: 2 additions & 2 deletions features/FEATURE_BLE/ble/pal/SecurityDb.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ struct SecurityEntryIdentity_t {
};

/**
* SecurityDB holds the state for active connections and bonded devices.
* SecurityDb holds the state for active connections and bonded devices.
* Keys can be stored in NVM and are returned via callbacks.
* SecurityDB is responsible for serialising any requests and keeping
* SecurityDb is responsible for serialising any requests and keeping
* the store in a consistent state.
* Active connections state must be returned immediately.
*/
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/targets/TARGET_CORDIO/CordioBLE.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "CordioPalGenericAccessService.h"
#include "ble/generic/GenericGap.h"
#include "ble/generic/GenericSecurityManager.h"
#include "ble/pal/MemorySecurityDB.h"
#include "ble/pal/MemorySecurityDb.h"
#include "ble/pal/SimpleEventQueue.h"

namespace ble {
Expand Down
8 changes: 8 additions & 0 deletions features/FEATURE_COMMON_PAL/mbed-coap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## [v4.4.1](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.4.1)
**Closed issues:**
- IOTCLT-2539 Block wise messaging call-backs not working logically

Improve TCP+TLS transport layer to allow send larger messages without blockwising.

-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.4.0...v4.4.1)

## [v4.4.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.4.0)
**New feature:**
- Make sn_coap_protocol_send_rst as public needed for CoAP ping sending
Expand Down
15 changes: 15 additions & 0 deletions features/FEATURE_COMMON_PAL/mbed-coap/mbed-coap/sn_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@
*/
#undef SN_COAP_MAX_INCOMING_MESSAGE_SIZE /* UINT16_MAX */

/**
* \def SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE
* \brief Sets the maximum payload size allowed before blockwising the message.
* This option should only be used when using TCP and TLS as transport
* with known maximum fragment size. This optimizes the number of messages
* if it is possible to send larger than 1kB messages without blockwise transfer.
* If payload length is larger than SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE
* it will be sent using blockwise transfer.
* By default, this feature is disabled, 0 disables the feature, set to positive
* value larger than SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE to enable.
* Note that value should be less than transport layer maximum fragment size.
* Note that value has no effect if blockwise transfer is disabled.
*/
#undef SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE /* 0 */

#ifdef MBED_CLIENT_USER_CONFIG_FILE
#include MBED_CLIENT_USER_CONFIG_FILE
#endif
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_COMMON_PAL/mbed-coap/module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mbed-coap",
"version": "4.4.0",
"version": "4.4.1",
"description": "COAP library",
"keywords": [
"coap",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ struct sn_coap_hdr_;
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 0 /**< Must be 2^x and x is at least 4. Suitable values: 0, 16, 32, 64, 128, 256, 512 and 1024 */
#endif

#ifndef SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE
#define SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE 0
#endif

#ifdef MBED_CONF_MBED_CLIENT_SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
#define SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED MBED_CONF_MBED_CLIENT_SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ uint16_t sn_coap_builder_calc_needed_packet_data_size_2(sn_coap_hdr_s *src_coap_
}
}
#if SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
if ((src_coap_msg_ptr->payload_len > blockwise_payload_size) && (blockwise_payload_size > 0)) {
if ((src_coap_msg_ptr->payload_len > SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE) &&
(src_coap_msg_ptr->payload_len > blockwise_payload_size) &&
(blockwise_payload_size > 0)) {
returned_byte_count += blockwise_payload_size;
} else {
returned_byte_count += src_coap_msg_ptr->payload_len;
Expand Down
Loading