Skip to content

Mbed os 5.15 aligned with PR #12223. #12714

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

Closed
Closed
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
197260e
STM EMAC: compilation issue with ARMC5
jeromecoutant Dec 3, 2019
14cf3d3
Make ESP8266 compatible with non rtos build
Nov 29, 2019
d55bbd1
Cellular: Fix AT command for COPS manual network selection
Dec 12, 2019
2a25dfc
TARGET_STM: add support of board NUCLEO_G071RB
ABOSTM Dec 6, 2019
99461f3
Update CMSIS-pack info for STM32G-family
Dec 13, 2019
2f230be
Targets: adapt NUCLEO_G071RB to CMSIS-pack info update
ABOSTM Dec 13, 2019
4f4f3d3
Fix USTICKER build error for LPC11U35_401
toyowata Dec 19, 2019
84ab9ff
Fix runtime crash by ARMC6 build
toyowata Dec 19, 2019
45c0b45
Robustify equeue multithread test
kjbracey Dec 17, 2019
9945dd7
Removed a hardcoded timeout in CyH4TransportDriver.cpp
ShuopengDeng Dec 19, 2019
4742f90
fix code review ARs
ShuopengDeng Dec 20, 2019
7b1a2e1
mbed-coap Buffer overflow when paring CoAP message
Dec 17, 2019
05cf048
Code review fix. Removing extra spaces
Dec 30, 2019
2ce32bc
mbed-coap uint16 overflow when calculating packet data size
Dec 17, 2019
7c8ddc3
Update mbed-coap changelog-md with v5.1.3 information
Dec 30, 2019
322da1f
Updated cypress target code with latest configurator and PDL library …
dustin-crossman Dec 16, 2019
1ac6c02
Update psoc6 core_lib with additional documentation and bit manipulat…
dustin-crossman Dec 16, 2019
4d7c85d
Update abstraction rtos with improved documentation and utilities.
dustin-crossman Dec 16, 2019
38aa012
Update psoc6pdl to version 1.4.0
dustin-crossman Dec 17, 2019
7c2ac56
Adding Samsung Exynos i S111 target code. Adding a new target of HW d…
jh6186 Dec 16, 2019
ceaddd7
Removing CMSIS pack connector of from S5JS100.
andrewc-arm Dec 17, 2019
a08e80b
Ran astyle on features/mbedtls/targets/TARGET_Samsung.
andrewc-arm Jan 6, 2020
bd3cd3a
tidy up PR comments #1
jh6186 Jan 6, 2020
ba50e02
fix Link Script format
jh6186 Jan 6, 2020
4953591
tidy up PR comments #2
jh6186 Jan 6, 2020
f3a5399
tidy up PR comments #3
jh6186 Jan 6, 2020
98b5a35
Following the IAR dynamic heap policy.
andrewc-arm Jan 6, 2020
8250123
Assign VTOR address '0'
jh6186 Jan 6, 2020
4e386e9
Forgot to set the IAR base heap size to minimal.
andrewc-arm Jan 7, 2020
c3b5565
Revert "Forgot to set the IAR base heap size to minimal."
andrewc-arm Jan 7, 2020
68e43fc
Revert "Following the IAR dynamic heap policy."
andrewc-arm Jan 7, 2020
52c1076
Removed the unused port_api.c driver code.
andrewc-arm Jan 7, 2020
74b9569
Revert "Removed the unused port_api.c driver code."
andrewc-arm Jan 7, 2020
ed70616
Removing CMSIS_NVIC_VIRTUAL from S5JS100 target conf.
andrewc-arm Jan 7, 2020
30479fd
Revert "Removing CMSIS_NVIC_VIRTUAL from S5JS100 target conf."
andrewc-arm Jan 7, 2020
6f89b25
Updated the code fix of timer and Mbed TLS.
andrewc-arm Jan 7, 2020
7245356
Applied the latest astyle.
andrewc-arm Jan 7, 2020
6b35b7d
Removed PortIn/Out/InOut from Samsung target for now.
andrewc-arm Jan 8, 2020
1843d98
Remove Target dependant mbed_error()
jh6186 Jan 10, 2020
ae21154
error case prints out using mbed_error_printf()
jh6186 Jan 10, 2020
60220a6
tidy up unused printf
jh6186 Jan 10, 2020
ee83a8c
tidy up unused comment
jh6186 Jan 10, 2020
287a7bf
remove .mbedignore list
jh6186 Jan 10, 2020
5ec42c5
Minor astyle change.
andrewc-arm Jan 13, 2020
8d47409
Changed 2018 or 2019 copyright to 2020 via sed auto change.
andrewc-arm Jan 13, 2020
d22a7fe
Adding in SPDX Apache 2.0 for the Apache 2 declared Samsung license h…
andrewc-arm Jan 13, 2020
78110dd
Update SSS header contents
jh6186 Jan 13, 2020
e556de6
fix header for samsung spi driver
jh6186 Jan 13, 2020
d56b647
Default use BEDTLS_SHA512_SMALLER for SW fallback
jh6186 Jan 14, 2020
a9554fa
fix typo 'modifyh'
jh6186 Jan 14, 2020
fc0c2c8
fix typo 'modifyh'
jh6186 Jan 14, 2020
f2961c4
Tidy up comments
jh6186 Jan 14, 2020
5b08efb
comments the performance of TRNG
jh6186 Jan 14, 2020
003fb67
STM32L5: STM32Cube_FW_L5_V1.0.0 files
jeromecoutant Jan 8, 2020
8ab6f95
STM32L5: TOOLCHAIN automatic updates
jeromecoutant Jan 8, 2020
8bd850a
STM32L5: add API L5 family files
jeromecoutant Jan 8, 2020
30425ee
STM32L5 : update generic STM files for L5
jeromecoutant Jan 8, 2020
7d1b2e2
STM32L5 : Introduce NUCLEO_L552ZE_Q board
jeromecoutant Jan 8, 2020
88c9dd8
Pairing fails when IPv6 enabled in SoftAP intf Issue: udp_sendto() Fa…
Jan 17, 2020
7465480
hani_iot: add target files and update targets.json
pan-pawel2 Feb 3, 2020
574894e
hani_iot: add spif storage config
pan-pawel2 Feb 3, 2020
1a02c97
hani_iot: update licenses dates, remove unnecessary comment
pan-pawel2 Feb 3, 2020
91fce86
hani_iot: add SPDX identifier to all new ARM copyrighted files
pan-pawel2 Feb 3, 2020
aa95db8
OKDO_ODIN_W2: Reenable lp-ticker and BLE
Feb 4, 2020
99229ed
Update Mbed version block
adbridge Feb 5, 2020
9085237
Update PSA auto-generated components and services
adbridge Feb 5, 2020
67c2f73
Fix indentation levels for comments in psa file
adbridge Feb 5, 2020
b1560d2
Revert "Pairing fails when IPv6 enabled in SoftAP intf"
adbridge Feb 6, 2020
0eebaea
Update psoc6cm0p asset to 1.1.0
cypress-midd Feb 5, 2020
5d04c21
STM32 remove unused INITIAL_SP macro
jeromecoutant Dec 19, 2019
4bfdc57
STM32F0: clean main-thread-stack-size setting
jeromecoutant Dec 19, 2019
eef1728
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