Skip to content

Rollup PR: Aleviating intermittent export issues #8675

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
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9e6b124
This commit adds EMAC driver for CM3DS that uses an SMSC LAN 9220
kapi90 Oct 12, 2018
f366c25
Export: Remove DS-5
theotherjimmy Oct 30, 2018
a215d9d
Sync with Atmel RF driver v3.0.5
Oct 31, 2018
135a894
Sync with MCR20a RF driver v1.0.2
Oct 31, 2018
d82990c
Low power timer needs to be reset when setting time.
TacoGrandeTX Aug 21, 2018
0de5ab2
Add a protected HAL set_time() test
TacoGrandeTX Sep 11, 2018
c064726
Sync with Atmel RF driver v3.0.6
Nov 6, 2018
d5df642
Sync with MCR20a RF driver v1.0.3
Nov 6, 2018
9613e0f
Increase background stack size to fix overflows
c1728p9 Oct 25, 2018
71d3574
cellular: fix coding style
0xc0170 Oct 29, 2018
bfb8b72
device key: fix coding style
0xc0170 Oct 29, 2018
5c79ba5
lorawan: fix coding style
0xc0170 Oct 29, 2018
e54ce88
storage: fix astyle coding style
0xc0170 Oct 30, 2018
41c1901
lwipstack: fix astyle coding style
0xc0170 Oct 30, 2018
f2d3097
astyleignore: update nanostack paths
0xc0170 Oct 30, 2018
7bd2581
feature deprecated: fix astyle coding style
0xc0170 Oct 30, 2018
884a774
lorawan: fix astyle coding style
0xc0170 Oct 30, 2018
567eedc
nanostack: fix astyle coding style
0xc0170 Oct 30, 2018
8e64275
netsocket: fix astyle coding style
0xc0170 Oct 30, 2018
c1b772b
AStyle ignore: add BLE
0xc0170 Oct 31, 2018
2e38320
rtos: fix coding style in the boot files
0xc0170 Oct 31, 2018
a288b7a
astyle ignore: add pithy code
0xc0170 Oct 31, 2018
06234f9
tests: fix coding style
0xc0170 Oct 31, 2018
a7a0d52
astyle ignore: add wifi/rf components
0xc0170 Oct 31, 2018
7e53f26
tests: fix coding style
0xc0170 Oct 31, 2018
ff86385
events: fix events coding style
0xc0170 Oct 31, 2018
7e160f1
astyle ignore: add lwip-sys
0xc0170 Oct 31, 2018
aa92a92
littlefs: fix coding style
0xc0170 Oct 31, 2018
542744d
Support erase value in Flash HAL drivers, FlashIAP and block devices
Oct 30, 2018
c78f6fb
Merge branch 'sync_rf_drivers' of ssh://github.com/artokin/mbed-os in…
Nov 8, 2018
9fb9355
Merge branch 'fix_coding_style_features' of ssh://github.com/0xc0170/…
Nov 8, 2018
0f1967d
Merge branch 'rm-ds5' of ssh://github.com/theotherjimmy/mbed into rollup
Nov 8, 2018
c097287
Merge branch 'david_flash_erase_value' of ssh://github.com/davidsaada…
Nov 8, 2018
6567b9b
Merge branch 'fix_background_overflow' of ssh://github.com/c1728p9/mb…
Nov 8, 2018
9680058
Merge branch 'cm3ds_emac' of ssh://github.com/kapi90/mbed-os into rollup
Nov 8, 2018
e0c7e6f
Merge branch 'fix_rtc_settime' of ssh://github.com/TacoGrandeTX/mbed-…
Nov 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .astyleignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ cmsis
features/cryptocell
features/mbedtls
features/lwipstack/lwip
features/lwipstack/lwip-sys
rtos/TARGET_CORTEX/rtx4
features/storage/filesystem/littlefs/littlefs/
features/storage/filesystem/fat/ChaN
features/storage/FEATURE_STORAGE
features/frameworks
features/FEATURE_BLE/targets
features/FEATURE_BLE
features/unsupported/
features/netsocket/emac-drivers
hal/storage_abstraction
FEATURE_NANOSTACK/coap-service
FEATURE_NANOSTACK/sal-stack-nanostack
TESTS/mbed_hal/trng/pithy
features/nanostack/coap-service
features/nanostack/sal-stack-nanostack
rtos/TARGET_CORTEX/rtx5
TESTS/mbed_hal/trng/pithy
targets
components/802.15.4_RF
components/wifi
tools
5 changes: 0 additions & 5 deletions CONTRIBUTING.md

This file was deleted.

18 changes: 14 additions & 4 deletions TESTS/mbed_drivers/flashiap/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ void flashiap_program_test()
TEST_ASSERT_TRUE(sector_size % page_size == 0);
uint32_t prog_size = std::max(page_size, (uint32_t)8);
uint8_t *data = new uint8_t[prog_size + 2];
for (uint32_t i = 0; i < prog_size + 2; i++) {
data[i] = i;
}

// the one before the last sector in the system
uint32_t address = (flash_device.get_flash_start() + flash_device.get_flash_size()) - (sector_size);
Expand All @@ -68,14 +65,27 @@ void flashiap_program_test()
ret = flash_device.erase(address, sector_size);
TEST_ASSERT_EQUAL_INT32(0, ret);

uint8_t erase_val = flash_device.get_erase_value();
memset(data, erase_val, prog_size);

uint8_t *data_flashed = new uint8_t[prog_size];
for (uint32_t i = 0; i < sector_size / prog_size; i++) {
uint32_t page_addr = address + i * prog_size;
ret = flash_device.read(data_flashed, page_addr, prog_size);
TEST_ASSERT_EQUAL_INT32(0, ret);
TEST_ASSERT_EQUAL_UINT8_ARRAY(data, data_flashed, prog_size);
}

for (uint32_t i = 0; i < prog_size + 2; i++) {
data[i] = i;
}

for (uint32_t i = 0; i < sector_size / prog_size; i++) {
uint32_t prog_addr = address + i * prog_size;
ret = flash_device.program(data, prog_addr, prog_size);
TEST_ASSERT_EQUAL_INT32(0, ret);
}

uint8_t *data_flashed = new uint8_t[prog_size];
for (uint32_t i = 0; i < sector_size / prog_size; i++) {
uint32_t page_addr = address + i * prog_size;
ret = flash_device.read(data_flashed, page_addr, prog_size);
Expand Down
5 changes: 3 additions & 2 deletions TESTS/mbed_hal/minimum_requirements/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void minimum_data_test()
}


utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
{
GREENTEA_SETUP(30, "default_auto");
return greentea_test_setup_handler(number_of_cases);
Expand All @@ -66,6 +66,7 @@ Case cases[] = {

Specification specification(greentea_test_setup, cases, greentea_test_teardown_handler);

int main() {
int main()
{
Harness::run(specification);
}
28 changes: 28 additions & 0 deletions TESTS/mbed_hal/rtc_time/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,41 @@ void test_local_time_invalid_param()
TEST_ASSERT_EQUAL(false, _rtc_localtime(1, NULL, RTC_4_YEAR_LEAP_YEAR_SUPPORT));
}

/* Test set_time() function called a few seconds apart.
*
* Given is set_time() function.
* When set_time() is used to set the system time two times.
* Then if the value returned from time() is always correct return true, otherwise return false.
*/
#define NEW_TIME 15
void test_set_time_twice()
{
time_t current_time;

/* Set the time to NEW_TIME and check it */
set_time(NEW_TIME);
current_time = time(NULL);
TEST_ASSERT_EQUAL (true, (current_time == NEW_TIME));

/* Wait 2 seconds */
wait_ms(2000);

/* set the time to NEW_TIME again and check it */
set_time(NEW_TIME);
current_time = time(NULL);
TEST_ASSERT_EQUAL (true, (current_time == NEW_TIME));
}

Case cases[] = {
Case("test is leap year - RTC leap years full support", test_is_leap_year<RTC_FULL_LEAP_YEAR_SUPPORT>),
Case("test is leap year - RTC leap years partial support", test_is_leap_year<RTC_4_YEAR_LEAP_YEAR_SUPPORT>),
Case("test make time boundary values - RTC leap years full support", test_mk_time_boundary<RTC_FULL_LEAP_YEAR_SUPPORT>),
Case("test make time boundary values - RTC leap years partial support", test_mk_time_boundary<RTC_4_YEAR_LEAP_YEAR_SUPPORT>),
Case("test make time - invalid param", test_mk_time_invalid_param),
Case("test local time - invalid param", test_local_time_invalid_param),
#if DEVICE_RTC || DEVICE_LPTICKER
Case("test set_time twice", test_set_time_twice),
#endif
};

utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
Expand Down
4 changes: 2 additions & 2 deletions TESTS/network/wifi/wifi_connect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void wifi_connect(void)
{
WiFiInterface *wifi = get_interface();

char ssid[SSID_MAX_LEN+1] = MBED_CONF_APP_WIFI_UNSECURE_SSID;
char ssid[SSID_MAX_LEN + 1] = MBED_CONF_APP_WIFI_UNSECURE_SSID;

TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->set_credentials(ssid, NULL));
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->connect());
Expand All @@ -42,7 +42,7 @@ void wifi_connect(void)
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->disconnect());

// Driver is expected to cache the credentials
memset(ssid, 0, SSID_MAX_LEN+1);
memset(ssid, 0, SSID_MAX_LEN + 1);

TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->connect());
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->disconnect());
Expand Down
8 changes: 4 additions & 4 deletions TEST_APPS/device/socket_app/cmd_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class SInfo {
{
assert(sock);
}
SInfo(Socket* sock, bool delete_on_exit=true):
SInfo(Socket *sock, bool delete_on_exit = true):
_id(id_count++),
_sock(sock),
_type(SInfo::OTHER),
Expand Down Expand Up @@ -1162,11 +1162,11 @@ static int cmd_socket(int argc, char *argv[])
cmd_printf("Invalid socket id\r\n");
return CMDLINE_RETCODE_FAIL;
}
TCPSocket *new_sock = static_cast<TCPSocket*>(&new_info->socket());
nsapi_error_t ret = static_cast<TCPServer&>(info->socket()).accept(new_sock, &addr);
TCPSocket *new_sock = static_cast<TCPSocket *>(&new_info->socket());
nsapi_error_t ret = static_cast<TCPServer &>(info->socket()).accept(new_sock, &addr);
if (ret == NSAPI_ERROR_OK) {
cmd_printf("TCPServer::accept() new socket sid: %d connection from %s port %d\r\n",
new_info->id(), addr.get_ip_address(), addr.get_port());
new_info->id(), addr.get_ip_address(), addr.get_port());
}
return handle_nsapi_error("TCPServer::accept()", ret);
}
Expand Down
46 changes: 23 additions & 23 deletions UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class my_LoRaPHY : public LoRaPHY {
phy_params.adr_ack_delay = 1;
}

virtual ~my_LoRaPHY()
virtual ~my_LoRaPHY()
{
}

Expand All @@ -40,19 +40,19 @@ class my_LoRaPHY : public LoRaPHY {
class my_radio : public LoRaRadio {
public:

virtual void init_radio(radio_events_t *events)
virtual void init_radio(radio_events_t *events)
{
};

virtual void radio_reset()
virtual void radio_reset()
{
};

virtual void sleep(void)
virtual void sleep(void)
{
};

virtual void standby(void)
virtual void standby(void)
{
};

Expand All @@ -62,31 +62,31 @@ class my_radio : public LoRaRadio {
uint16_t symb_timeout, bool fix_len,
uint8_t payload_len,
bool crc_on, bool freq_hop_on, uint8_t hop_period,
bool iq_inverted, bool rx_continuous)
bool iq_inverted, bool rx_continuous)
{
};

virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
uint32_t bandwidth, uint32_t datarate,
uint8_t coderate, uint16_t preamble_len,
bool fix_len, bool crc_on, bool freq_hop_on,
uint8_t hop_period, bool iq_inverted, uint32_t timeout)
uint8_t hop_period, bool iq_inverted, uint32_t timeout)
{
};

virtual void send(uint8_t *buffer, uint8_t size)
virtual void send(uint8_t *buffer, uint8_t size)
{
};

virtual void receive(void)
virtual void receive(void)
{
};

virtual void set_channel(uint32_t freq)
virtual void set_channel(uint32_t freq)
{
};

virtual uint32_t random(void)
virtual uint32_t random(void)
{
};

Expand All @@ -95,15 +95,15 @@ class my_radio : public LoRaRadio {
return uint8_value;
};

virtual void set_max_payload_length(radio_modems_t modem, uint8_t max)
virtual void set_max_payload_length(radio_modems_t modem, uint8_t max)
{
};

virtual void set_public_network(bool enable)
virtual void set_public_network(bool enable)
{
};

virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
{
};

Expand All @@ -115,7 +115,7 @@ class my_radio : public LoRaRadio {
return bool_value;
};

virtual void start_cad(void)
virtual void start_cad(void)
{
};

Expand All @@ -124,15 +124,15 @@ class my_radio : public LoRaRadio {
return bool_value;
};

virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time)
virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time)
{
};

virtual void lock(void)
virtual void lock(void)
{
};

virtual void unlock(void)
virtual void unlock(void)
{
};

Expand Down Expand Up @@ -422,10 +422,10 @@ TEST_F(Test_LoRaPHY, compute_rx_win_params)
list[0] = 125000;
object->get_phy_params().bandwidths.table = list;
uint8_t list2[1];
list2[0]= 12;
list2[0] = 12;
object->get_phy_params().datarates.table = &list2;
channel_params_t ch_lst[16];
memset(ch_lst, 0, sizeof(channel_params_t)*16);
memset(ch_lst, 0, sizeof(channel_params_t) * 16);
ch_lst[0].band = 0;
ch_lst[0].dr_range.fields.min = DR_0;
ch_lst[0].dr_range.fields.max = DR_5;
Expand Down Expand Up @@ -513,7 +513,7 @@ TEST_F(Test_LoRaPHY, link_ADR_request)

object->get_phy_params().max_channel_cnt = 16;
channel_params_t li[16];
memset(li, 0, sizeof(channel_params_t)*16);
memset(li, 0, sizeof(channel_params_t) * 16);
object->get_phy_params().channels.channel_list = li;
li[0].frequency = 0;
li[1].frequency = 5;
Expand Down Expand Up @@ -673,7 +673,7 @@ TEST_F(Test_LoRaPHY, set_next_channel)
ch = 5;
t1 = 16;
t2 = 32;
memset(b, 0, sizeof(band_t)*4);
memset(b, 0, sizeof(band_t) * 4);
object->get_phy_params().bands.size = 2;
object->get_phy_params().bands.table = &b;
b[0].off_time = 0;
Expand Down Expand Up @@ -767,7 +767,7 @@ TEST_F(Test_LoRaPHY, set_tx_cont_mode)

cw_mode_params_t p;
p.max_eirp = 0;
p.channel=0;
p.channel = 0;
p.tx_power = -1;
p.datarate = 0;
p.antenna_gain = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class my_radio : public LoRaRadio {
uint8_t payload_len,
bool crc_on, bool freq_hop_on, uint8_t hop_period,
bool iq_inverted, bool rx_continuous)
{
{

};
};

virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
uint32_t bandwidth, uint32_t datarate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class RFBits;
class NanostackRfPhyAtmel : public NanostackRfPhy {
public:
NanostackRfPhyAtmel(PinName spi_mosi, PinName spi_miso,
PinName spi_sclk, PinName spi_cs, PinName spi_rst, PinName spi_slp, PinName spi_irq,
PinName i2c_sda, PinName i2c_scl);
PinName spi_sclk, PinName spi_cs, PinName spi_rst, PinName spi_slp, PinName spi_irq,
PinName i2c_sda, PinName i2c_scl);
virtual ~NanostackRfPhyAtmel();
virtual int8_t rf_register();
virtual void rf_unregister();
Expand Down
4 changes: 4 additions & 0 deletions components/802.15.4_RF/atmel-rf-driver/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"provide-default": {
"help": "Provide default NanostackRfpy. [true/false]",
"value": false
},
"irq-thread-stack-size": {
"help": "The stack size of the Thread serving the Atmel RF interrupts",
"value": 1024
}
},
"target_overrides": {
Expand Down
Loading