Skip to content

Release candidate for mbed-os-5.9.3 #7515

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 113 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
dac03f2
Include symbols in dumped build profiles
theotherjimmy Jun 28, 2018
b6e0dd6
build_api.py : add comment about separate_names
jeromecoutant Jun 29, 2018
8c998e9
Cellular: Fixed set_sim_pin method calling
mudassar-ublox Jun 28, 2018
16af4a8
STM32: add lpuart_clock_source config
bcostm Jun 20, 2018
bf94385
astyle
bcostm Jun 29, 2018
527aa1e
Fix race condition in serial_api.c for NRF52 series
Jun 28, 2018
1eb7836
Fix typo in NRF52 series README.md
Jun 28, 2018
80c60ed
Correcting doxygen
Jun 27, 2018
7ce7196
Copy edit LoRaWANinterface.h
Jun 29, 2018
85f7349
Copy edit LoRaWANBase.h
Jun 29, 2018
ca1e050
netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
TeroJaasko Jun 15, 2018
cf1186f
Meet new us_ticker HAL spec (Mbed OS 5.9)
ccli8 May 23, 2018
9a3c14a
Meet new lp_ticker HAL spec (Mbed OS 5.9)
ccli8 May 23, 2018
d88534b
Fix CLK_Idle incorrectly enters into deep sleep mode
ccli8 May 25, 2018
15a75c8
Adjust static/dynamic memory allocation for IAR toolchain to pass Gre…
ccli8 May 25, 2018
2b87cb9
Fix Greentea test code
ccli8 May 24, 2018
27c29cf
Reduce blocking code in lp_ticker
ccli8 Jun 1, 2018
ab6f5fd
Synchronize lp_ticker code to us_ticker
ccli8 Jun 1, 2018
b182194
Fix trap in lp_ticker ISR with non-blocking "clear interrupt flag"
ccli8 Jun 11, 2018
c344ccf
Synchronize lp_ticker code to us_ticker
ccli8 Jun 11, 2018
28a58c9
Remove special handling for dummy interrupt in lp_ticker
ccli8 Jun 28, 2018
50df865
Synchronize lp_ticker code to us_ticker
ccli8 Jun 28, 2018
88dcf7d
drivers: astyle update
0xc0170 May 24, 2018
565153c
AStyle: ignore hal storage abstraction
0xc0170 Jun 20, 2018
5c8d417
hal: astyle update
0xc0170 Jun 20, 2018
ca2c492
platform: astyle update
0xc0170 Jun 27, 2018
2a2f0fb
Use Component section for ARM compiler version
theotherjimmy Jun 28, 2018
6675af3
Add a test for MDK pro version detection
theotherjimmy Jun 28, 2018
15e3de9
Improve the process for Cortex-A9 in mbed_application
TomoYamanaka Jun 26, 2018
80bad76
Fix memory leakage with MBR on exiting error path
ccli8 Jul 2, 2018
e61f623
LPC546XX: Fix UART mux setting in the LPCXpresso board
mmahadevan108 Jul 2, 2018
9b625d9
Persist config errors until validation occurs
theotherjimmy Jun 20, 2018
052d7dd
Make sure that there is always a config_errors member
theotherjimmy Jun 21, 2018
3815813
Skip invalid undefined errors
theotherjimmy Jun 21, 2018
73d412e
Allow missing "bootloader_supported" key
theotherjimmy Jun 28, 2018
601cae6
add kernel ticker test
maciejbocianski Jun 26, 2018
2d95dbf
DISCO_L496AG: change LED1 and LED2 pins
bcostm Jun 29, 2018
8e75271
DISCO_L496AG: update LEDs comments in PeripheralPins.c
bcostm Jul 2, 2018
7057c25
Summarize memory map when --stats-depth is 0
theotherjimmy Jun 29, 2018
9044dd8
Use defaultdict in the other place
theotherjimmy Jul 3, 2018
5e20343
Make clock source changeable over mbed_app.json
steinerphilipp Jul 2, 2018
3ddbbf9
DISCO STM32L4 : Add TWO_RAM_REGIONS macro
jeromecoutant Jul 2, 2018
15456d9
Bug fix for receive windows
Jul 2, 2018
fcfb791
Fix interrupt initialization for NRF52 series
Jul 2, 2018
05e3986
Fix target definition for NRF52 series
Jul 2, 2018
3d52ba4
Fix wrong config binding
SenRamakri Jul 3, 2018
79d3a0a
Modified Wiced drivers EMAC instance get
Jun 29, 2018
e9fb5e7
Improve efficiency and formatting of ITM output
kjbracey Jun 29, 2018
94f52f6
MIMXRT1050_EVK: Fix the GPIO IRQ number assignements
mmahadevan108 Jul 4, 2018
7940c19
MIMXRT1050_EVK: Move clock enable after check of pin
mmahadevan108 Jul 4, 2018
3986810
Change PLL clock source to HIRC instead of HXT
ccli8 Jun 26, 2018
bd5489c
MXRT1050: Ensure the pins are in input mode for analogin
mmahadevan108 Jul 5, 2018
a83f9d1
FatFs 0.13b hotfix - fix readdir() never terminates when dir is full.
bmcdonnell-ionx Jul 3, 2018
e1e1eb2
Use us_ticker_read while SDK is not ready
bcostm Jun 27, 2018
4218315
HAL_GetTick returns elapsed time
bcostm Jul 3, 2018
37efec5
Re-enable IT CC1 after deepsleep
bcostm Jul 4, 2018
5c498a5
Use elapsed time only for 16bit timer
bcostm Jul 4, 2018
06c7c65
save/restore timer registers before/after deepsleep
bcostm Jul 4, 2018
221df6f
Recognize ".cc" and ".hh" source file extensions
snej Jul 6, 2018
fb88ce0
Move exporter alias handling into CLI
theotherjimmy Jul 3, 2018
4622694
Reformat part of project.py
theotherjimmy Jul 3, 2018
e0d5875
Simplify main function
theotherjimmy Jul 6, 2018
95b9792
Correct argv usage
theotherjimmy Jul 6, 2018
87450a2
Correct -E help
theotherjimmy Jul 6, 2018
9443ad5
Add aliases to example exporter options
theotherjimmy Jul 9, 2018
6cf3fcb
Cellular: Fix for ATHandler's read string and hexstring NULL termination
Jun 28, 2018
78d962d
Cellular: More unit tests for ATHandler's read routines
Jun 28, 2018
8def9dc
Correct string usage in version checking
theotherjimmy Jul 10, 2018
2f52625
Disable LSE for MTB_USI_WM_BN_BM_22
Jul 9, 2018
455e24e
Don't print error reports in release builds
SenRamakri Jul 2, 2018
e9eee4f
Remove error reporting for release builds
SenRamakri Jul 5, 2018
eaa3d28
Remove white space in config files for NRF52 series
Jul 9, 2018
40e7ab4
Fix inconsistent SWI configuration in NRF52 series
Jul 9, 2018
1aaf346
Change NRF52 series UART to only use one SWI channel
Jul 9, 2018
f39a3d7
Flash API: Enable Flash api on CM3DS
Apr 18, 2018
3489934
Partial revert of "CMSIS/RTX: Adapt Mbed OS to CMSIS/RTX device suppo…
theotherjimmy Jul 9, 2018
a084a88
Add _RTX_ define where it's needed and used
theotherjimmy Jul 9, 2018
24d55f5
stm32 ticker: rename files and move functions
bcostm Jun 20, 2018
d0592ee
stm32 ticker: rename macro and update ST HAL Tick functions
bcostm Jun 20, 2018
a43b8a8
stm32 ticker: rename hal_tick.h in us_ticker_data.h
bcostm Jun 20, 2018
fcb9ac4
stm32 ticker: change license
bcostm Jun 20, 2018
f1869a6
stm32 ticker: typo corrections
bcostm Jun 20, 2018
9de2bfe
stm32 ticker: corrections in order to pass tests
bcostm Jun 26, 2018
09c631e
stm32 ticker: change th eplace where timer init in done, fix overflow…
bcostm Jul 10, 2018
10a32db
STM32 RTC : bypass shadow registers
jeromecoutant Jun 29, 2018
e4a55af
Allow STDIO pins to be NC in NRF52 series
Jul 12, 2018
0096da3
Add option to make Nanostack use global event queue
kjbracey Jun 4, 2018
138edff
Add Apache licenses to ns_hal files
kjbracey Jul 2, 2018
6cc1d64
Fix linker script for NRF52840/IAR
Jul 11, 2018
7b83af7
Ensure that files generated have a directory
theotherjimmy Jul 12, 2018
1595948
Cellular: HSI set to be source clock for WISE_1570
Jul 12, 2018
2c15086
tests-mbed_drivers-lp_timer: change delay method
mprse Jul 11, 2018
4b78a7c
FRMPayload size validity
Jul 10, 2018
656c1ca
Correcting unit for timeout
Jul 12, 2018
b47356f
Cellular: Removed max_packet_size
Jun 25, 2018
1ba1842
Cellular: Fix socket_send unit test
Jul 11, 2018
be63f96
Separate version header file to get version updates in Mbed OS
Jul 6, 2018
b456430
Raytac: target removal
0xc0170 Jul 10, 2018
2d4270a
LoRaWAN: Handling re-joining when already Joined
Jul 6, 2018
d1a759b
Updating docs
Jul 9, 2018
b9333c6
Streamlining connect() API with posix like retcodes
Jul 10, 2018
aafb636
Fix linker script for NRF52840/ARM
Jul 12, 2018
d897239
NRF52832 linker script: formatting fix
Jul 12, 2018
bd23fa5
tests-mbed_hal-lp_ticker: change implementation of the delay before d…
mprse Jul 12, 2018
1acc823
Fix Python3 bug with `mbed export -S`
theotherjimmy Jul 11, 2018
443120d
Correct cmse lib creation for the make_gcc_arm
theotherjimmy Jul 12, 2018
99a8747
Drop quotes from command line make
theotherjimmy Jul 12, 2018
33edfc2
Tools: Correct release version "parsing" for py3
theotherjimmy Jul 11, 2018
95c1e78
Update stats to fetch Mbed OS version info
Jul 6, 2018
5ea9246
STM32 LPTICKER with LPTIM minor update
jeromecoutant Jul 12, 2018
c249ee4
Skip target lookup in test builds.
theotherjimmy Jul 9, 2018
1f3b947
stm32 lpuart: enable lse and hsi if not done
bcostm Jul 12, 2018
5c9a412
Update Mbed version block
Jul 13, 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