Skip to content

Commit eca67ca

Browse files
authored
Merge pull request #5767 from ARMmbed/release-candidate
Release candidate for mbed-os-5.7.2
2 parents 2b4ff78 + 431b2d1 commit eca67ca

File tree

154 files changed

+18345
-18623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+18345
-18623
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,5 @@ matrix:
188188
env: NAME=mbed2-ATMEL
189189
- <<: *mbed-2
190190
env: NAME=mbed2-NUVOTON
191+
- <<: *mbed-2
192+
env: NAME=mbed2-RENESAS

TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#if defined(TARGET_CORTEX_A)
19-
  #error [NOT_SUPPORTED] This function not supported for this target
19+
#error [NOT_SUPPORTED] This function not supported for this target
2020
#endif
2121

2222
#include <stdio.h>

TESTS/mbedmicro-rtos-mbed/malloc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ volatile bool thread_should_continue = true;
3232
#define THREAD_MALLOC_SIZE 100
3333

3434
#if defined(__CORTEX_A9)
35-
#define THREAD_STACK_SIZE DEFAULT_STACK_SIZE
35+
#define THREAD_STACK_SIZE 512
3636
#else
3737
#define THREAD_STACK_SIZE 256
3838
#endif

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
#endif
2727

2828
#define THREAD_STACK_SIZE 512
29+
#if defined(__CORTEX_A9)
30+
#define PARALLEL_THREAD_STACK_SIZE 512
31+
#else
2932
#define PARALLEL_THREAD_STACK_SIZE 384
33+
#endif
3034
#define CHILD_THREAD_STACK_SIZE 384
3135

3236
using namespace utest::v1;

TESTS/network/wifi/get_interface.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ WiFiInterface *get_interface()
5050
{
5151
static WiFiInterface *interface = NULL;
5252

53-
if (interface)
54-
delete interface;
53+
if (interface) {
54+
interface->disconnect();
55+
return interface;
56+
}
5557

5658
#if MBED_CONF_APP_WIFI_DRIVER == INTERNAL
5759
interface = new DRIVER();

TESTS/network/wifi/get_security.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright (c) 2017, ARM Limited, All Rights Reserved
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
6+
* not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include <cstring>
19+
#include "mbed.h"
20+
#include "nsapi_types.h"
21+
22+
nsapi_security get_security()
23+
{
24+
#if defined MBED_CONF_APP_WIFI_SECURE_PROTOCOL
25+
static const char *SEC_WEP = "WEP";
26+
static const char *SEC_WPA = "WPA";
27+
static const char *SEC_WPA2 = "WPA2";
28+
static const char *SEC_WPA_WPA2 = "WPA/WPA2";
29+
30+
if (strcmp(MBED_CONF_APP_WIFI_SECURE_PROTOCOL, SEC_WEP) == 0) {
31+
return NSAPI_SECURITY_WEP;
32+
}
33+
if (strcmp(MBED_CONF_APP_WIFI_SECURE_PROTOCOL, SEC_WPA) == 0) {
34+
return NSAPI_SECURITY_WPA;
35+
}
36+
if (strcmp(MBED_CONF_APP_WIFI_SECURE_PROTOCOL, SEC_WPA2) == 0) {
37+
return NSAPI_SECURITY_WPA2;
38+
}
39+
if (strcmp(MBED_CONF_APP_WIFI_SECURE_PROTOCOL, SEC_WPA_WPA2) == 0) {
40+
return NSAPI_SECURITY_WPA_WPA2;
41+
}
42+
#endif
43+
return NSAPI_SECURITY_NONE;
44+
}

TESTS/network/wifi/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
!defined(MBED_CONF_APP_WIFI_PASSWORD) || \
3131
!defined(MBED_CONF_APP_WIFI_RX) || \
3232
!defined(MBED_CONF_APP_WIFI_SECURE_SSID) || \
33-
!defined(MBED_CONF_APP_WIFI_TX)
33+
!defined(MBED_CONF_APP_WIFI_TX) || \
34+
!defined MBED_CONF_APP_WIFI_SECURE_PROTOCOL
3435
#error [NOT_SUPPORTED] Requires parameters from mbed_app.json (for secure connections)
3536
#endif
3637
#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID)
@@ -58,6 +59,7 @@ utest::v1::status_t test_setup(const size_t number_of_cases) {
5859
// Test cases
5960
Case cases[] = {
6061
Case("WIFI-CONSTRUCTOR", wifi_constructor),
62+
Case("WIFI-CONNECT-NOCREDENTIALS", wifi_connect_nocredentials),
6163
Case("WIFI-SET-CREDENTIAL", wifi_set_credential),
6264
Case("WIFI-SET-CHANNEL", wifi_set_channel),
6365
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
@@ -72,7 +74,6 @@ Case cases[] = {
7274
Case("WIFI-CONNECT-PARAMS-CHANNEL", wifi_connect_params_channel),
7375
Case("WIFI-CONNECT-PARAMS-CHANNEL-FAIL", wifi_connect_params_channel_fail),
7476
#endif
75-
Case("WIFI-CONNECT-NOCREDENTIALS", wifi_connect_nocredentials),
7677
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
7778
Case("WIFI-CONNECT", wifi_connect),
7879
#endif

TESTS/network/wifi/template_mbed_app.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"help": "WiFi Password",
1313
"value": "\"PASSWORD\""
1414
},
15+
"wifi-secure-protocol": {
16+
"help": "WiFi security protocol, valid values are WEP, WPA, WPA2, WPA/WPA2",
17+
"value": "\"WPA/WPA2\""
18+
},
1519
"wifi-ch-secure": {
1620
"help": "Channel number of secure SSID",
1721
"value": 1

TESTS/network/wifi/wifi_connect_nocredentials.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ void wifi_connect_nocredentials(void)
2828
WiFiInterface *wifi = get_interface();
2929
nsapi_error_t error;
3030
error = wifi->connect();
31-
wifi->disconnect();
32-
TEST_ASSERT(error == NSAPI_ERROR_PARAMETER);
31+
TEST_ASSERT(error == NSAPI_ERROR_NO_SSID || error == NSAPI_ERROR_PARAMETER);
3332
}

TESTS/network/wifi/wifi_connect_params_channel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void wifi_connect_params_channel(void)
3434
return;
3535
}
3636

37-
nsapi_error_t error = wifi->connect(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, NSAPI_SECURITY_WPA2, MBED_CONF_APP_WIFI_CH_SECURE);
37+
nsapi_error_t error = wifi->connect(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, get_security(), MBED_CONF_APP_WIFI_CH_SECURE);
3838
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, error);
3939
}
4040

0 commit comments

Comments
 (0)