Skip to content

Release candidate for mbed-os-5.9.3 #7518

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 106 commits into from
Jul 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
f32d86f
Include symbols in dumped build profiles
theotherjimmy Jun 28, 2018
b567934
build_api.py : add comment about separate_names
jeromecoutant Jun 29, 2018
603adcf
Cellular: Fixed set_sim_pin method calling
mudassar-ublox Jun 28, 2018
ca4fd71
STM32: add lpuart_clock_source config
bcostm Jun 20, 2018
21fe483
astyle
bcostm Jun 29, 2018
e409f48
Fix race condition in serial_api.c for NRF52 series
Jun 28, 2018
6166005
Fix typo in NRF52 series README.md
Jun 28, 2018
6216551
Correcting doxygen
Jun 27, 2018
59097d0
Copy edit LoRaWANinterface.h
Jun 29, 2018
1f15529
Copy edit LoRaWANBase.h
Jun 29, 2018
7e68ac0
netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
TeroJaasko Jun 15, 2018
ae68c9a
Meet new us_ticker HAL spec (Mbed OS 5.9)
ccli8 May 23, 2018
95d0e51
Meet new lp_ticker HAL spec (Mbed OS 5.9)
ccli8 May 23, 2018
3bacccb
Fix CLK_Idle incorrectly enters into deep sleep mode
ccli8 May 25, 2018
3034630
Adjust static/dynamic memory allocation for IAR toolchain to pass Gre…
ccli8 May 25, 2018
65a15a3
Fix Greentea test code
ccli8 May 24, 2018
6e808c7
Reduce blocking code in lp_ticker
ccli8 Jun 1, 2018
e20d259
Synchronize lp_ticker code to us_ticker
ccli8 Jun 1, 2018
acef3f6
Fix trap in lp_ticker ISR with non-blocking "clear interrupt flag"
ccli8 Jun 11, 2018
afe5c7d
Synchronize lp_ticker code to us_ticker
ccli8 Jun 11, 2018
70a1e3a
Remove special handling for dummy interrupt in lp_ticker
ccli8 Jun 28, 2018
e80622b
Synchronize lp_ticker code to us_ticker
ccli8 Jun 28, 2018
aad7092
drivers: astyle update
0xc0170 May 24, 2018
fd528ff
AStyle: ignore hal storage abstraction
0xc0170 Jun 20, 2018
5db427a
hal: astyle update
0xc0170 Jun 20, 2018
e2ee137
platform: astyle update
0xc0170 Jun 27, 2018
cff8651
Use Component section for ARM compiler version
theotherjimmy Jun 28, 2018
5773e80
Add a test for MDK pro version detection
theotherjimmy Jun 28, 2018
83cd02e
Improve the process for Cortex-A9 in mbed_application
TomoYamanaka Jun 26, 2018
6de4b35
Fix memory leakage with MBR on exiting error path
ccli8 Jul 2, 2018
8cb0baf
LPC546XX: Fix UART mux setting in the LPCXpresso board
mmahadevan108 Jul 2, 2018
cef5dbb
add kernel ticker test
maciejbocianski Jun 26, 2018
1c26b2e
DISCO_L496AG: change LED1 and LED2 pins
bcostm Jun 29, 2018
57762fb
DISCO_L496AG: update LEDs comments in PeripheralPins.c
bcostm Jul 2, 2018
573fd4f
Summarize memory map when --stats-depth is 0
theotherjimmy Jun 29, 2018
4dfc20c
Use defaultdict in the other place
theotherjimmy Jul 3, 2018
9d1b292
Make clock source changeable over mbed_app.json
steinerphilipp Jul 2, 2018
b77da51
DISCO STM32L4 : Add TWO_RAM_REGIONS macro
jeromecoutant Jul 2, 2018
7b7d9cc
Fix interrupt initialization for NRF52 series
Jul 2, 2018
dc297a3
Fix target definition for NRF52 series
Jul 2, 2018
3a01d3f
Fix wrong config binding
SenRamakri Jul 3, 2018
6cc1de1
Modified Wiced drivers EMAC instance get
Jun 29, 2018
b110ef4
Improve efficiency and formatting of ITM output
kjbracey Jun 29, 2018
d8f9c98
MIMXRT1050_EVK: Fix the GPIO IRQ number assignements
mmahadevan108 Jul 4, 2018
94a36b5
MIMXRT1050_EVK: Move clock enable after check of pin
mmahadevan108 Jul 4, 2018
98b0621
Change PLL clock source to HIRC instead of HXT
ccli8 Jun 26, 2018
fa73e7d
MXRT1050: Ensure the pins are in input mode for analogin
mmahadevan108 Jul 5, 2018
a65e92e
FatFs 0.13b hotfix - fix readdir() never terminates when dir is full.
bmcdonnell-ionx Jul 3, 2018
878ce6f
Use us_ticker_read while SDK is not ready
bcostm Jun 27, 2018
5bfabde
HAL_GetTick returns elapsed time
bcostm Jul 3, 2018
f2d824a
Re-enable IT CC1 after deepsleep
bcostm Jul 4, 2018
c6ad478
Use elapsed time only for 16bit timer
bcostm Jul 4, 2018
0f9a956
save/restore timer registers before/after deepsleep
bcostm Jul 4, 2018
b0f31e3
Recognize ".cc" and ".hh" source file extensions
snej Jul 6, 2018
3f03919
Move exporter alias handling into CLI
theotherjimmy Jul 3, 2018
cfcf9a1
Reformat part of project.py
theotherjimmy Jul 3, 2018
05bcc16
Simplify main function
theotherjimmy Jul 6, 2018
d6d3b51
Correct argv usage
theotherjimmy Jul 6, 2018
63a075f
Correct -E help
theotherjimmy Jul 6, 2018
acf278a
Add aliases to example exporter options
theotherjimmy Jul 9, 2018
de2290a
Cellular: Fix for ATHandler's read string and hexstring NULL termination
Jun 28, 2018
0d52fc3
Cellular: More unit tests for ATHandler's read routines
Jun 28, 2018
f9c25ee
Correct string usage in version checking
theotherjimmy Jul 10, 2018
4deeb4c
Disable LSE for MTB_USI_WM_BN_BM_22
Jul 9, 2018
c5a2f3c
Don't print error reports in release builds
SenRamakri Jul 2, 2018
3eaca32
Remove error reporting for release builds
SenRamakri Jul 5, 2018
a2e7424
Remove white space in config files for NRF52 series
Jul 9, 2018
542d784
Fix inconsistent SWI configuration in NRF52 series
Jul 9, 2018
e44efbb
Change NRF52 series UART to only use one SWI channel
Jul 9, 2018
7474dae
Flash API: Enable Flash api on CM3DS
Apr 18, 2018
44e2a00
Partial revert of "CMSIS/RTX: Adapt Mbed OS to CMSIS/RTX device suppo…
theotherjimmy Jul 9, 2018
1b0f38d
Add _RTX_ define where it's needed and used
theotherjimmy Jul 9, 2018
609ade7
stm32 ticker: rename files and move functions
bcostm Jun 20, 2018
92fe07f
stm32 ticker: rename macro and update ST HAL Tick functions
bcostm Jun 20, 2018
9a480e3
stm32 ticker: rename hal_tick.h in us_ticker_data.h
bcostm Jun 20, 2018
ccb5385
stm32 ticker: change license
bcostm Jun 20, 2018
d3e35ab
stm32 ticker: typo corrections
bcostm Jun 20, 2018
fcad2a6
stm32 ticker: corrections in order to pass tests
bcostm Jun 26, 2018
9f73ba1
stm32 ticker: change th eplace where timer init in done, fix overflow…
bcostm Jul 10, 2018
e952918
STM32 RTC : bypass shadow registers
jeromecoutant Jun 29, 2018
c94bab0
Allow STDIO pins to be NC in NRF52 series
Jul 12, 2018
23cf0ed
Add option to make Nanostack use global event queue
kjbracey Jun 4, 2018
063092f
Add Apache licenses to ns_hal files
kjbracey Jul 2, 2018
5b3f54f
Fix linker script for NRF52840/IAR
Jul 11, 2018
c930875
Ensure that files generated have a directory
theotherjimmy Jul 12, 2018
e900d42
Cellular: HSI set to be source clock for WISE_1570
Jul 12, 2018
b305890
tests-mbed_drivers-lp_timer: change delay method
mprse Jul 11, 2018
594e528
Cellular: Removed max_packet_size
Jun 25, 2018
5d05e44
Cellular: Fix socket_send unit test
Jul 11, 2018
9c58d99
Separate version header file to get version updates in Mbed OS
Jul 6, 2018
3950834
Raytac: target removal
0xc0170 Jul 10, 2018
b6fbb97
LoRaWAN: Handling re-joining when already Joined
Jul 6, 2018
000adb0
Updating docs
Jul 9, 2018
5d50cf1
Streamlining connect() API with posix like retcodes
Jul 10, 2018
31db58a
Fix linker script for NRF52840/ARM
Jul 12, 2018
9b224fe
NRF52832 linker script: formatting fix
Jul 12, 2018
4d31fcb
tests-mbed_hal-lp_ticker: change implementation of the delay before d…
mprse Jul 12, 2018
f730d49
Fix Python3 bug with `mbed export -S`
theotherjimmy Jul 11, 2018
e672a3e
Correct cmse lib creation for the make_gcc_arm
theotherjimmy Jul 12, 2018
c37190e
Drop quotes from command line make
theotherjimmy Jul 12, 2018
2e0139e
Tools: Correct release version "parsing" for py3
theotherjimmy Jul 11, 2018
62990b4
Update stats to fetch Mbed OS version info
Jul 6, 2018
ddc39b3
STM32 LPTICKER with LPTIM minor update
jeromecoutant Jul 12, 2018
0eafe2c
Skip target lookup in test builds.
theotherjimmy Jul 9, 2018
f1550ae
stm32 lpuart: enable lse and hsi if not done
bcostm Jul 12, 2018
627be9b
Update Mbed version block
Jul 16, 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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .astyleignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ features/FEATURE_BLE/targets
features/FEATURE_LWIP/lwip-interface/lwip
features/unsupported/
features/FEATURE_COMMON_PAL/
hal/storage_abstraction
FEATURE_NANOSTACK/coap-service
FEATURE_NANOSTACK/sal-stack-nanostack
rtos/TARGET_CORTEX/rtx5
Expand Down
38 changes: 25 additions & 13 deletions TESTS/mbed_drivers/lp_timer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ extern uint32_t SystemCoreClock;
#define DELTA_MS(delay_ms) (1 + ((delay_ms) * US_PER_MSEC / 20 / US_PER_MSEC))
#define DELTA_S(delay_ms) (0.000500f + (((float)(delay_ms)) / MSEC_PER_SEC / 20))

void busy_wait_us(int us)
{
const ticker_data_t *const ticker = get_us_ticker_data();
uint32_t start = ticker_read(ticker);
while ((ticker_read(ticker) - start) < (uint32_t)us);
}

void busy_wait_ms(int ms)
{
busy_wait_us(ms * US_PER_MSEC);
}

/* This test verifies if low power timer is stopped after
* creation.
*
Expand All @@ -74,7 +86,7 @@ void test_lptimer_creation()

/* Wait 10 ms.
* After that operation timer read routines should still return 0. */
wait_ms(10);
busy_wait_ms(10);

/* Check results. */
TEST_ASSERT_EQUAL_FLOAT(0, lp_timer.read());
Expand Down Expand Up @@ -102,7 +114,7 @@ void test_lptimer_time_accumulation()
lp_timer.start();

/* Wait 10 ms. */
wait_ms(10);
busy_wait_ms(10);

/* Stop the timer. */
lp_timer.stop();
Expand All @@ -116,15 +128,15 @@ void test_lptimer_time_accumulation()
/* Wait 50 ms - this is done to show that time elapsed when
* the timer is stopped does not have influence on the
* timer counted time. */
wait_ms(50);
busy_wait_ms(50);

/* ------ */

/* Start the timer. */
lp_timer.start();

/* Wait 20 ms. */
wait_ms(20);
busy_wait_ms(20);

/* Stop the timer. */
lp_timer.stop();
Expand All @@ -145,7 +157,7 @@ void test_lptimer_time_accumulation()
lp_timer.start();

/* Wait 30 ms. */
wait_ms(30);
busy_wait_ms(30);

/* Stop the timer. */
lp_timer.stop();
Expand All @@ -159,15 +171,15 @@ void test_lptimer_time_accumulation()
/* Wait 50 ms - this is done to show that time elapsed when
* the timer is stopped does not have influence on the
* timer time. */
wait_ms(50);
busy_wait_ms(50);

/* ------ */

/* Start the timer. */
lp_timer.start();

/* Wait 1 sec. */
wait_ms(1000);
busy_wait_ms(1000);

/* Stop the timer. */
lp_timer.stop();
Expand Down Expand Up @@ -196,7 +208,7 @@ void test_lptimer_reset()
lp_timer.start();

/* Wait 10 ms. */
wait_ms(10);
busy_wait_ms(10);

/* Stop the timer. */
lp_timer.stop();
Expand All @@ -214,7 +226,7 @@ void test_lptimer_reset()
lp_timer.start();

/* Wait 20 ms. */
wait_ms(20);
busy_wait_ms(20);

/* Stop the timer. */
lp_timer.stop();
Expand All @@ -241,13 +253,13 @@ void test_lptimer_start_started_timer()
lp_timer.start();

/* Wait 10 ms. */
wait_ms(10);
busy_wait_ms(10);

/* Now start timer again. */
lp_timer.start();

/* Wait 20 ms. */
wait_ms(20);
busy_wait_ms(20);

/* Stop the timer. */
lp_timer.stop();
Expand All @@ -274,7 +286,7 @@ void test_lptimer_float_operator()
lp_timer.start();

/* Wait 10 ms. */
wait_ms(10);
busy_wait_ms(10);

/* Stop the timer. */
lp_timer.stop();
Expand Down Expand Up @@ -302,7 +314,7 @@ void test_lptimer_time_measurement()
lp_timer.start();

/* Wait <wait_val_us> us. */
wait_us(wait_val_us);
busy_wait_us(wait_val_us);

/* Stop the timer. */
lp_timer.stop();
Expand Down
1 change: 1 addition & 0 deletions TESTS/mbed_hal/common_tickers/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ unsigned int ticker_overflow_delta;

/* Auxiliary function to count ticker ticks elapsed during execution of N cycles of empty while loop.
* Parameter <step> is used to disable compiler optimisation. */
MBED_NOINLINE
uint32_t count_ticks(uint32_t cycles, uint32_t step)
{
register uint32_t reg_cycles = cycles;
Expand Down
36 changes: 29 additions & 7 deletions TESTS/mbed_hal/lp_ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,38 @@ using namespace utest::v1;

volatile int intFlag = 0;

#define US_PER_MS 1000

#define TICKER_GLITCH_TEST_TICKS 1000

#define TICKER_INT_VAL 500
#define TICKER_DELTA 10

#define LP_TICKER_OV_LIMIT 4000

/* Flush serial buffer before deep sleep
*
* Since deepsleep() may shut down the UART peripheral, we wait for some time
* to allow for hardware serial buffers to completely flush.
*
* Take NUMAKER_PFM_NUC472 as an example:
* Its UART peripheral has 16-byte Tx FIFO. With baud rate set to 9600, flush
* Tx FIFO would take: 16 * 8 * 1000 / 9600 = 13.3 (ms). So set wait time to
* 20ms here for safe.
*
* This should be replaced with a better function that checks if the
* hardware buffers are empty. However, such an API does not exist now,
* so we'll use the busy_wait_ms() function for now.
*/
#define SERIAL_FLUSH_TIME_MS 20

void busy_wait_ms(int ms)
{
const ticker_data_t *const ticker = get_us_ticker_data();
uint32_t start = ticker_read(ticker);
while ((ticker_read(ticker) - start) < (uint32_t)(ms * US_PER_MS));
}

/* Since according to the ticker requirements min acceptable counter size is
* - 12 bits for low power timer - max count = 4095,
* then all test cases must be executed in this time windows.
Expand Down Expand Up @@ -72,11 +97,6 @@ void ticker_event_handler_stub(const ticker_data_t * const ticker)
lp_ticker_disable_interrupt();
}

void wait_cycles(volatile unsigned int cycles)
{
while (cycles--);
}

/* Test that the ticker has the correct frequency and number of bits. */
void lp_ticker_info_test()
{
Expand All @@ -97,8 +117,10 @@ void lp_ticker_deepsleep_test()

lp_ticker_init();

/* Wait for green tea UART transmission before entering deep-sleep mode. */
wait_cycles(400000);
/* Give some time Green Tea to finish UART transmission before entering
* deep-sleep mode.
*/
busy_wait_ms(SERIAL_FLUSH_TIME_MS);

overflow_protect();

Expand Down
1 change: 1 addition & 0 deletions TESTS/mbed_platform/stats_sys/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void test_sys_info()
mbed_stats_sys_t stats;
mbed_stats_sys_get(&stats);

TEST_ASSERT_NOT_EQUAL(0, stats.os_version);
#if defined(__CORTEX_M)
TEST_ASSERT_NOT_EQUAL(0, stats.cpu_id);
#endif
Expand Down
119 changes: 119 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/kernel_tick_count/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-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 "greentea-client/test_env.h"
#include "utest/utest.h"
#include "unity/unity.h"

#include "rtos/Kernel.h"
#include "mbed.h"


using utest::v1::Case;

#define TEST_REPEAT_COUNT 1000
#define NUM_WAIT_TICKS 1000

// all in [us]
#define ONE_SECOND 1000000
#define SMALL_DELTA 1500 // 0.15%
#define BIG_DELTA 15000 // 1.5%

/** Test if kernel ticker frequency is 1kHz

Given a RTOS kernel ticker
When check it frequency
Then the the frequency is 1kHz
*/
void test_frequency()
{
uint32_t freq = osKernelGetTickFreq();
TEST_ASSERT_EQUAL_UINT32_MESSAGE(1000, freq, "Expected SysTick frequency is 1kHz");
}

/** Test if kernel ticker increments by one

Given a RTOS kernel ticker
When perform subsequent calls of @a rtos::Kernel::get_ms_count
Then subsequent reads should not differ by more than one
*/
void test_increment(void)
{
for (uint32_t i = 0; i < TEST_REPEAT_COUNT; i++) {
const uint64_t start = rtos::Kernel::get_ms_count();
while (true) {
uint64_t diff = rtos::Kernel::get_ms_count() - start;
if (diff != 0) {
TEST_ASSERT_EQUAL_UINT64(1, diff);
break;
}
}
}
}

/** Test if kernel ticker interval is 1ms

Given a RTOS kernel ticker
When perform subsequent calls of @a rtos::Kernel::get_ms_count
Then the ticker interval should be 1ms
*/
void test_interval()
{
uint64_t start, stop;
Timer timer;

start = rtos::Kernel::get_ms_count();
// wait for tick
do {
stop = rtos::Kernel::get_ms_count();
} while ((stop - start) == 0);
timer.start();
start = stop;

// wait for NUM_WAIT_TICKS ticks
do {
stop = rtos::Kernel::get_ms_count();
} while ((stop - start) != NUM_WAIT_TICKS);
timer.stop();
TEST_ASSERT_EQUAL_UINT64(NUM_WAIT_TICKS, (stop - start));

#if defined(NO_SYSTICK) || defined(MBED_TICKLESS)
// On targets with NO_SYSTICK/MBED_TICKLESS enabled, systick is emulated by lp_ticker what makes it less accurate
// for more details https://os.mbed.com/docs/latest/reference/tickless.html
TEST_ASSERT_UINT64_WITHIN(BIG_DELTA, ONE_SECOND, timer.read_high_resolution_us());
#else
TEST_ASSERT_UINT64_WITHIN(SMALL_DELTA, ONE_SECOND, timer.read_high_resolution_us());
#endif
}

// Test cases
Case cases[] = {
Case("Test kernel ticker frequency", test_frequency),
Case("Test if kernel ticker increments by one", test_increment),
Case("Test if kernel ticker interval is 1ms", test_interval)
};

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

utest::v1::Specification specification(greentea_test_setup, cases);

int main()
{
return !utest::v1::Harness::run(specification);
}
Loading