Skip to content

Release candidate for mbed-os-5.15.1 #12372

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 72 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e7988b0
STM EMAC: compilation issue with ARMC5
jeromecoutant Dec 3, 2019
b87a067
Make ESP8266 compatible with non rtos build
Nov 29, 2019
6650600
Cellular: Fix AT command for COPS manual network selection
Dec 12, 2019
65d4a93
TARGET_STM: add support of board NUCLEO_G071RB
ABOSTM Dec 6, 2019
ce3ab69
Update CMSIS-pack info for STM32G-family
Dec 13, 2019
03b3152
Targets: adapt NUCLEO_G071RB to CMSIS-pack info update
ABOSTM Dec 13, 2019
95c3a81
Fix USTICKER build error for LPC11U35_401
toyowata Dec 19, 2019
ef939df
Fix runtime crash by ARMC6 build
toyowata Dec 19, 2019
8fb5307
Robustify equeue multithread test
kjbracey Dec 17, 2019
4c4f182
Removed a hardcoded timeout in CyH4TransportDriver.cpp
ShuopengDeng Dec 19, 2019
440752f
fix code review ARs
ShuopengDeng Dec 20, 2019
23a23b9
mbed-coap Buffer overflow when paring CoAP message
Dec 17, 2019
ca3a848
Code review fix. Removing extra spaces
Dec 30, 2019
3edd93b
mbed-coap uint16 overflow when calculating packet data size
Dec 17, 2019
b429a6b
Update mbed-coap changelog-md with v5.1.3 information
Dec 30, 2019
27672bd
Updated cypress target code with latest configurator and PDL library …
dustin-crossman Dec 16, 2019
d07d61f
Update psoc6 core_lib with additional documentation and bit manipulat…
dustin-crossman Dec 16, 2019
2e7809f
Update abstraction rtos with improved documentation and utilities.
dustin-crossman Dec 16, 2019
cd86cf9
Update psoc6pdl to version 1.4.0
dustin-crossman Dec 17, 2019
f7fcae9
Adding Samsung Exynos i S111 target code. Adding a new target of HW d…
jh6186 Dec 16, 2019
3d59a56
Removing CMSIS pack connector of from S5JS100.
andrewc-arm Dec 17, 2019
35b176b
Ran astyle on features/mbedtls/targets/TARGET_Samsung.
andrewc-arm Jan 6, 2020
9ea2ce9
tidy up PR comments #1
jh6186 Jan 6, 2020
873fc43
fix Link Script format
jh6186 Jan 6, 2020
cd37b0c
tidy up PR comments #2
jh6186 Jan 6, 2020
6c34771
tidy up PR comments #3
jh6186 Jan 6, 2020
44901f1
Following the IAR dynamic heap policy.
andrewc-arm Jan 6, 2020
31ae3ac
Assign VTOR address '0'
jh6186 Jan 6, 2020
4250f12
Forgot to set the IAR base heap size to minimal.
andrewc-arm Jan 7, 2020
748880e
Revert "Forgot to set the IAR base heap size to minimal."
andrewc-arm Jan 7, 2020
ce3ccb1
Revert "Following the IAR dynamic heap policy."
andrewc-arm Jan 7, 2020
8019057
Removed the unused port_api.c driver code.
andrewc-arm Jan 7, 2020
5307e41
Revert "Removed the unused port_api.c driver code."
andrewc-arm Jan 7, 2020
c877243
Removing CMSIS_NVIC_VIRTUAL from S5JS100 target conf.
andrewc-arm Jan 7, 2020
183ff84
Revert "Removing CMSIS_NVIC_VIRTUAL from S5JS100 target conf."
andrewc-arm Jan 7, 2020
14f2772
Updated the code fix of timer and Mbed TLS.
andrewc-arm Jan 7, 2020
0588b55
Applied the latest astyle.
andrewc-arm Jan 7, 2020
ba604e8
Removed PortIn/Out/InOut from Samsung target for now.
andrewc-arm Jan 8, 2020
cf8666a
Remove Target dependant mbed_error()
jh6186 Jan 10, 2020
e2490ff
error case prints out using mbed_error_printf()
jh6186 Jan 10, 2020
ad2c344
tidy up unused printf
jh6186 Jan 10, 2020
45fd046
tidy up unused comment
jh6186 Jan 10, 2020
dc72c8a
remove .mbedignore list
jh6186 Jan 10, 2020
4356e8c
Minor astyle change.
andrewc-arm Jan 13, 2020
a98d279
Changed 2018 or 2019 copyright to 2020 via sed auto change.
andrewc-arm Jan 13, 2020
398924c
Adding in SPDX Apache 2.0 for the Apache 2 declared Samsung license h…
andrewc-arm Jan 13, 2020
d882552
Update SSS header contents
jh6186 Jan 13, 2020
b15af51
fix header for samsung spi driver
jh6186 Jan 13, 2020
e8b27c2
Default use BEDTLS_SHA512_SMALLER for SW fallback
jh6186 Jan 14, 2020
66887ee
fix typo 'modifyh'
jh6186 Jan 14, 2020
0a0d4f5
fix typo 'modifyh'
jh6186 Jan 14, 2020
2a2d6cf
Tidy up comments
jh6186 Jan 14, 2020
afedfc0
comments the performance of TRNG
jh6186 Jan 14, 2020
89962e6
STM32L5: STM32Cube_FW_L5_V1.0.0 files
jeromecoutant Jan 8, 2020
513eebf
STM32L5: TOOLCHAIN automatic updates
jeromecoutant Jan 8, 2020
a495a6b
STM32L5: add API L5 family files
jeromecoutant Jan 8, 2020
1198943
STM32L5 : update generic STM files for L5
jeromecoutant Jan 8, 2020
cbba284
STM32L5 : Introduce NUCLEO_L552ZE_Q board
jeromecoutant Jan 8, 2020
df72637
Pairing fails when IPv6 enabled in SoftAP intf Issue: udp_sendto() Fa…
Jan 17, 2020
01e1a2c
hani_iot: add target files and update targets.json
pan-pawel2 Feb 3, 2020
feb2952
hani_iot: add spif storage config
pan-pawel2 Feb 3, 2020
9faf661
hani_iot: update licenses dates, remove unnecessary comment
pan-pawel2 Feb 3, 2020
2fe341f
hani_iot: add SPDX identifier to all new ARM copyrighted files
pan-pawel2 Feb 3, 2020
8f937d6
OKDO_ODIN_W2: Reenable lp-ticker and BLE
Feb 4, 2020
817e367
Update Mbed version block
adbridge Feb 5, 2020
d27ace3
Update PSA auto-generated components and services
adbridge Feb 5, 2020
f86022a
Fix indentation levels for comments in psa file
adbridge Feb 5, 2020
aa298c0
Revert "Pairing fails when IPv6 enabled in SoftAP intf"
adbridge Feb 6, 2020
d11aa10
Update psoc6cm0p asset to 1.1.0
cypress-midd Feb 5, 2020
8197d76
STM32 remove unused INITIAL_SP macro
jeromecoutant Dec 19, 2019
dd37ac3
STM32F0: clean main-thread-stack-size setting
jeromecoutant Dec 19, 2019
7b398c0
Samsung: fix incorrect conflict resolution
0xc0170 Feb 7, 2020
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
  •  
  •  
  •  
67 changes: 59 additions & 8 deletions UNITTESTS/events/equeue/test_equeue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,64 @@ static void *multithread_thread(void *p)
return 0;
}

class ecount {
mutable pthread_mutex_t mutex;
pthread_cond_t cond;
uint8_t count;
public:
ecount() : count(0)
{
int err = pthread_mutex_init(&mutex, NULL);
EXPECT_EQ(0, err);
err = pthread_cond_init(&cond, NULL);
EXPECT_EQ(0, err);
}

~ecount()
{
int err = pthread_mutex_destroy(&mutex);
EXPECT_EQ(0, err);
err = pthread_cond_destroy(&cond);
EXPECT_EQ(0, err);
}

void lock() const
{
int err = pthread_mutex_lock(&mutex);
EXPECT_EQ(0, err);
}

void unlock() const
{
int err = pthread_mutex_unlock(&mutex);
EXPECT_EQ(0, err);
}

void touch()
{
lock();
if (count < 200) {
count++;
}
unlock();
int err = pthread_cond_broadcast(&cond);
EXPECT_EQ(0, err);
}

void wait_for_touches(uint8_t n)
{
lock();
while (count < n) {
int err = pthread_cond_wait(&cond, &mutex);
EXPECT_EQ(0, err);
}
unlock();
}
};

static void multithread_func(void *p)
{
if ((*(reinterpret_cast<uint8_t *>(p))) < 200) {
(*(reinterpret_cast<uint8_t *>(p)))++;
}
static_cast<ecount *>(p)->touch();
}

static void background_func(void *p, int ms)
Expand Down Expand Up @@ -665,20 +718,18 @@ TEST_F(TestEqueue, test_equeue_multithread)
int err = equeue_create(&q, TEST_EQUEUE_SIZE);
ASSERT_EQ(0, err);

uint8_t touched = 0;
equeue_call_every(&q, 1, multithread_func, &touched);
ecount t;
equeue_call_every(&q, 1, multithread_func, &t);

pthread_t thread;
err = pthread_create(&thread, 0, multithread_thread, &q);
ASSERT_EQ(0, err);

usleep(10000);
t.wait_for_touches(1);
equeue_break(&q);
err = pthread_join(thread, 0);
ASSERT_EQ(0, err);

EXPECT_TRUE(touched > 1);

equeue_destroy(&q);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"FVP_MPS2": {
"base-address": "0x00200000",
"size": "0x200000"
},
"S5JS100": {
"base-address": "0x40EF5000",
"size": "0x80000"
}
}
}
6 changes: 6 additions & 0 deletions components/storage/blockdevice/COMPONENT_SPIF/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
}
},
"target_overrides": {
"HANI_IOT": {
"SPI_MOSI": "P0_26",
"SPI_MISO": "P1_3",
"SPI_CLK": "P1_2",
"SPI_CS": "P0_20"
},
"LPC54114": {
"SPI_MOSI": "P0_20",
"SPI_MISO": "P0_18",
Expand Down
16 changes: 6 additions & 10 deletions components/wifi/esp8266-driver/ESP8266/ESP8266.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_API_PRESENT)
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
Expand Down Expand Up @@ -57,7 +57,6 @@ ESP8266::ESP8266(PinName tx, PinName rx, bool debug, PinName rts, PinName cts)
_closed(false),
_error(false),
_busy(false),
_reset_check(_rmutex),
_reset_done(false),
_conn_status(NSAPI_STATUS_DISCONNECTED)
{
Expand Down Expand Up @@ -272,14 +271,15 @@ bool ESP8266::reset(void)
continue;
}

_rmutex.lock();
while ((rtos::Kernel::get_ms_count() - start_time < ESP8266_BOOTTIME) && !_reset_done) {
while (!_reset_done) {
_process_oob(ESP8266_RECV_TIMEOUT, true); // UART mutex claimed -> need to check for OOBs ourselves
_reset_check.wait_for(100); // Arbitrary relatively short delay
if (_reset_done || (rtos::Kernel::get_ms_count() - start_time >= ESP8266_BOOTTIME)) {
break;
}
rtos::ThisThread::sleep_for(100);
}

done = _reset_done;
_rmutex.unlock();
if (done) {
break;
}
Expand Down Expand Up @@ -1040,11 +1040,7 @@ void ESP8266::_oob_watchdog_reset()

void ESP8266::_oob_ready()
{

_rmutex.lock();
_reset_done = true;
_reset_check.notify_all();
_rmutex.unlock();

for (int i = 0; i < SOCKET_COUNT; i++) {
_sock_i[i].open = false;
Expand Down
6 changes: 2 additions & 4 deletions components/wifi/esp8266-driver/ESP8266/ESP8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef ESP8266_H
#define ESP8266_H

#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_API_PRESENT)
#include <stdint.h>

#include "drivers/UARTSerial.h"
Expand All @@ -27,8 +27,8 @@
#include "platform/ATCmdParser.h"
#include "platform/Callback.h"
#include "platform/mbed_error.h"
#include "rtos/ConditionVariable.h"
#include "rtos/Mutex.h"
#include "rtos/ThisThread.h"

// Various timeouts for different ESP8266 operations
#ifndef ESP8266_CONNECT_TIMEOUT
Expand Down Expand Up @@ -428,7 +428,6 @@ class ESP8266 {
PinName _serial_rts;
PinName _serial_cts;
rtos::Mutex _smutex; // Protect serial port access
rtos::Mutex _rmutex; // Reset protection

// AT Command Parser
mbed::ATCmdParser _parser;
Expand Down Expand Up @@ -479,7 +478,6 @@ class ESP8266 {
bool _closed;
bool _error;
bool _busy;
rtos::ConditionVariable _reset_check;
bool _reset_done;

// Modem's address info
Expand Down
14 changes: 13 additions & 1 deletion components/wifi/esp8266-driver/ESP8266Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_API_PRESENT)

#include <string.h>
#include <stdint.h>
Expand Down Expand Up @@ -64,7 +64,9 @@ ESP8266Interface::ESP8266Interface()
_pwr_pin(MBED_CONF_ESP8266_PWR),
_ap_sec(NSAPI_SECURITY_UNKNOWN),
_if_blocking(true),
#if MBED_CONF_RTOS_PRESENT
_if_connected(_cmutex),
#endif
_initialized(false),
_connect_retval(NSAPI_ERROR_OK),
_disconnect_retval(NSAPI_ERROR_OK),
Expand Down Expand Up @@ -104,7 +106,9 @@ ESP8266Interface::ESP8266Interface(PinName tx, PinName rx, bool debug, PinName r
_pwr_pin(pwr),
_ap_sec(NSAPI_SECURITY_UNKNOWN),
_if_blocking(true),
#if MBED_CONF_RTOS_PRESENT
_if_connected(_cmutex),
#endif
_initialized(false),
_connect_retval(NSAPI_ERROR_OK),
_disconnect_retval(NSAPI_ERROR_OK),
Expand Down Expand Up @@ -267,7 +271,9 @@ void ESP8266Interface::_connect_async()
_esp.uart_enable_input(false);
_software_conn_stat = IFACE_STATUS_DISCONNECTED;
}
#if MBED_CONF_RTOS_PRESENT
_if_connected.notify_all();
#endif
} else {
// Postpone to give other stuff time to run
_connect_event_id = _global_event_queue->call_in(ESP8266_INTERFACE_CONNECT_INTERVAL_MS,
Expand Down Expand Up @@ -329,10 +335,12 @@ int ESP8266Interface::connect()
"connect(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
}

#if MBED_CONF_RTOS_PRESENT
while (_if_blocking && (_conn_status_to_error() != NSAPI_ERROR_IS_CONNECTED)
&& (_connect_retval == NSAPI_ERROR_NO_CONNECTION)) {
_if_connected.wait();
}
#endif

_cmutex.unlock();

Expand Down Expand Up @@ -418,7 +426,9 @@ void ESP8266Interface::_disconnect_async()

_power_off();
_software_conn_stat = IFACE_STATUS_DISCONNECTED;
#if MBED_CONF_RTOS_PRESENT
_if_connected.notify_all();
#endif

} else {
// Postpone to give other stuff time to run
Expand Down Expand Up @@ -479,11 +489,13 @@ int ESP8266Interface::disconnect()
"disconnect(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
}

#if MBED_CONF_RTOS_PRESENT
while (_if_blocking
&& (_conn_status_to_error() != NSAPI_ERROR_NO_CONNECTION)
&& (_disconnect_retval != NSAPI_ERROR_OK)) {
_if_connected.wait();
}
#endif

_cmutex.unlock();
if (!_if_blocking) {
Expand Down
6 changes: 5 additions & 1 deletion components/wifi/esp8266-driver/ESP8266Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef ESP8266_INTERFACE_H
#define ESP8266_INTERFACE_H

#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_API_PRESENT)
#include "drivers/DigitalOut.h"
#include "drivers/Timer.h"
#include "ESP8266/ESP8266.h"
Expand All @@ -30,7 +30,9 @@
#include "features/netsocket/WiFiAccessPoint.h"
#include "features/netsocket/WiFiInterface.h"
#include "platform/Callback.h"
#if MBED_CONF_RTOS_PRESENT
#include "rtos/ConditionVariable.h"
#endif
#include "rtos/Mutex.h"

#define ESP8266_SOCKET_COUNT 5
Expand Down Expand Up @@ -452,7 +454,9 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface {
struct _channel_info _ch_info;

bool _if_blocking; // NetworkInterface, blocking or not
#if MBED_CONF_RTOS_PRESENT
rtos::ConditionVariable _if_connected;
#endif

// connect status reporting
nsapi_error_t _conn_status_to_error();
Expand Down
Loading