Skip to content

Commit 6059c34

Browse files
authored
Merge pull request ARMmbed#81 from linlingao/rebase_11_6
Rebase to master
2 parents 878b544 + 960bc6d commit 6059c34

File tree

1,338 files changed

+222323
-8034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,338 files changed

+222323
-8034
lines changed

.astyleignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ features/cryptocell
44
features/mbedtls
55
features/lwipstack/lwip
66
rtos/TARGET_CORTEX/rtx4
7-
features/filesystem/littlefs/littlefs
8-
features/filesystem/fat/ChaN
7+
features/storage/filesystem/littlefs/littlefs/
8+
features/storage/filesystem/fat/ChaN
9+
features/storage/FEATURE_STORAGE
910
features/frameworks
1011
features/FEATURE_BLE/targets
1112
features/unsupported/
12-
features/FEATURE_COMMON_PAL/
1313
hal/storage_abstraction
1414
FEATURE_NANOSTACK/coap-service
1515
FEATURE_NANOSTACK/sal-stack-nanostack
1616
rtos/TARGET_CORTEX/rtx5
17+
TESTS/mbed_hal/trng/pithy
1718
targets
1819
tools

.github/issue_template.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1+
<!--
2+
3+
************************************** WARNING **************************************
4+
5+
The ciarcom bot parses this header automatically. Any deviation from the
6+
template may cause the bot to automatically correct this header or may result in a
7+
warning message, requesting updates.
8+
9+
Please ensure that nothing follows the Issue request type section, all
10+
issue details are within the Description section and no changes are made to the
11+
template format (as detailed below).
12+
13+
*************************************************************************************
14+
15+
-->
16+
117
### Description
2-
<!--
18+
19+
<!--
320
Required
421
Add detailed description of what you are reporting.
522
Good example: https://os.mbed.com/docs/latest/reference/workflow.html
@@ -13,19 +30,15 @@
1330

1431

1532
### Issue request type
16-
<!--
33+
34+
<!--
1735
Required
18-
Please add only one X to one of the following types. Do not fill multiple types. (Split the issue otherwise.)
19-
Please note this is not a GitHub task list; indenting the boxes or changing the format to add a '.' or '*' in front
20-
of them changes the meaning incorrectly. The only changes to make are to add a description under the
21-
description heading and to add an 'x' to the correct box.
22-
23-
[X] Question
24-
[ ] Enhancement
25-
[ ] Bug
36+
Please add only one X to one of the following types. Do not fill multiple types (split the issue otherwise.)
37+
Please note this is not a GitHub task list, indenting the boxes or changing the format to add a '.' or '*' in front
38+
of them would change the meaning incorrectly. The only changes to be made are to add a description text under the
39+
description heading and to add a 'x' to the correct box.
2640
-->
27-
28-
[ ] Question
29-
[ ] Enhancement
30-
[ ] Bug
41+
[ ] Question
42+
[ ] Enhancement
43+
[ ] Bug
3144

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
[ ] Refactor
2121
[ ] Target update
2222
[ ] Functionality change
23+
[ ] Docs update
24+
[ ] Test update
2325
[ ] Breaking change
2426

.travis.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,25 @@ matrix:
5151
# Print versions we use
5252
- doxygen --version
5353
before_script:
54+
# Build doxygen
55+
- >
56+
(git clone --depth=1 --single-branch --branch Release_1_8_14 https://github.com/doxygen/doxygen;
57+
cd doxygen;
58+
mkdir build;
59+
cd build;
60+
cmake -G "Unix Makefiles" ..;
61+
make;
62+
sudo make install)
5463
# Create BUILD directory for tests
5564
- mkdir BUILD
5665
script:
5766
# Assert that the Doxygen build produced no warnings.
5867
# The strange command below asserts that the Doxygen command had an
5968
# output of zero length
60-
- >
61-
doxygen doxyfile_options 2>&1 |
62-
tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ]
69+
- doxygen doxyfile_options 2>&1
70+
# Once Mbed OS has been fixed, enable the full test by replacing the top line with this:
71+
# - ( ! doxygen doxyfile_options 2>&1 | grep . )
72+
6373
# Assert that all binary libraries are named correctly
6474
# The strange command below asserts that there are exactly 0 libraries
6575
# that do not start with lib
@@ -86,6 +96,7 @@ matrix:
8696

8797
- arm-none-eabi-gcc --version
8898
- python --version
99+
- pip list --verbose
89100
script:
90101
# Run local testing on tools
91102
- PYTHONPATH=. coverage run -a -m pytest tools/test
@@ -132,10 +143,10 @@ matrix:
132143
# update status if we succeeded, compare with master if possible
133144
- |
134145
CURR=$(cat astyle-branch.out | grep Formatted | wc -l)
135-
PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
146+
PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
136147
| jq -re "select(.sha != \"$TRAVIS_COMMIT\")
137148
| .statuses[] | select(.context == \"travis-ci/$NAME\").description
138-
| capture(\", (?<files>[0-9]+) files\").warnings" \
149+
| capture(\", (?<files>[0-9]+) files\").files" \
139150
|| echo 0)
140151
141152
STATUSM="Passed, ${CURR} files"

CONTRIBUTING.md

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,5 @@
1-
# Description
2-
This document is cheat sheet for everyone who wants to contribute to [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) GitHub repository at GitHub.
3-
All changes in code base should originate from GitHub Issues and take advantage of existing GitHub flows. Goal is to attract contributors and allow them contribute to code and documentation at the same time.
1+
# Contributing to Mbed OS
42

5-
Guidelines from this document are created to help new and existing contributors understand process workflow and align to project rules before pull request is submitted. It explains how a participant should do things like format code, test fixes, and submit patches.
3+
Mbed OS is an open-source, device software platform for the Internet of Things. Contributions are an important part of the platform, and our goal is to make it as simple as possible to become a contributor.
64

7-
## Where to get more information?
8-
You can read more on our [documentation page](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/cont/contributing/).
9-
10-
# How to contribute
11-
We really appreciate your contributions! We are Open Source project and we need your help. We want to keep it as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
12-
13-
Before a pull request will be merged, the [mbed Contributor Agreement](http://developer.mbed.org/contributor_agreement/) must be signed.
14-
15-
You can pick up existing [mbed-os GitHub Issue](https://github.com/ARMmbed/mbed-os/issues) and solve it or implement new feature you find important, attractive or just necessary. We will review your proposal via pull request mechanism, give you comments and merge your changes if we decide your contribution satisfy criteria such as quality.
16-
17-
# Enhancements vs Bugs
18-
Enhancements are:
19-
* New features implementation.
20-
* Code refactoring.
21-
* Coding rules, coding styles improvements.
22-
* Code comments improvement.
23-
* Documentation work.
24-
25-
Bugs are:
26-
* Issues rose internally or externally by [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) users.
27-
* Internally (within mbed team) created issues from Continuous Integration pipeline and build servers.
28-
* Issues detected using automation tools such as compilers, sanitizers, static code analysis tools etc.
29-
30-
# Gate Keeper role
31-
Gate Keeper is a person responsible for GitHub process workflow execution and is responsible for repository / project code base. Gate Keeper is also responsible for code (pull request) quality stamp and approves or rejects code changes in project’s code base.
32-
33-
Gate Keepers will review your pull request code, give you comments in pull request comment section and in the end if everything goes well merge your pull request to one of our branches (most probably default ```master``` branch).
34-
35-
Please be patient, digest Gate Keeper's feedback and respond promptly :)
36-
37-
# mbed SDK porting
38-
* For more information regarding mbed SDK porting please refer to [mbed SDK porting](http://developer.mbed.org/handbook/mbed-SDK-porting) handbook.
39-
* Before starting the mbed SDK porting, you might want to familiarize with the [mbed SDK library internals](http://developer.mbed.org/handbook/mbed-library-internals) first.
40-
41-
# Glossary
42-
* Gate Keeper – persons responsible for overall code-base quality of [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) project.
43-
* Enhancement – New feature deployment, code refactoring actions or existing code improvements.
44-
* Bugfix – Issues originated from GitHub Issues pool, raised internally within mbed classic team or issues from automated code validators like linters, static code analysis tools etc.
45-
* Mbed classic – mbed SDK 2.0 located in GitHub at [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os).
5+
To encourage productive collaboration, as well as robust, consistent and maintainable code, we have a set of guidelines for contributing to Mbed OS. Please see: [contributing guidelines](https://os.mbed.com/docs/latest/reference/contributing.html).

TESTS/host_tests/rtc_reset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class RtcResetTest(BaseHostTest):
2929
"""
3030

3131
"""Start of the RTC"""
32-
START_TIME = 50000
32+
START_TIME = 1537789823 # GMT: Monday, 24 September 2018 11:50:23
3333
START_TIME_TOLERANCE = 10
3434
"""Time to delay after sending reset"""
3535
DELAY_TIME = 5.0

TESTS/host_tests/system_reset.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ class SystemResetTest(BaseHostTest):
3636
def __init__(self):
3737
super(SystemResetTest, self).__init__()
3838
self.reset = False
39-
cycle_s = self.get_config_item('program_cycle_s')
40-
self.program_cycle_s = cycle_s if cycle_s is not None else DEFAULT_CYCLE_PERIOD
41-
4239
self.test_steps_sequence = self.test_steps()
4340
# Advance the coroutine to it's first yield statement.
4441
self.test_steps_sequence.send(None)
@@ -61,16 +58,18 @@ def test_steps(self):
6158
"""Reset the device and check the status
6259
"""
6360
system_reset = yield
64-
6561
self.reset = False
62+
63+
wait_after_reset = self.get_config_item('forced_reset_timeout')
64+
wait_after_reset = wait_after_reset if wait_after_reset is not None else DEFAULT_CYCLE_PERIOD
65+
6666
self.send_kv(MSG_KEY_DEVICE_RESET, MSG_VALUE_DUMMY)
67-
time.sleep(self.program_cycle_s)
67+
time.sleep(wait_after_reset)
6868
self.send_kv(MSG_KEY_SYNC, MSG_VALUE_DUMMY)
6969

7070
system_reset = yield
71-
7271
if self.reset == False:
7372
raise RuntimeError('Platform did not reset as expected.')
7473

7574
# The sequence is correct -- test passed.
76-
yield True
75+
yield True

TESTS/lorawan/loraradio/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939

4040
using namespace utest::v1;
41+
using namespace mbed;
4142

4243
static LoRaRadio *radio = NULL;
4344
rtos::Semaphore event_sem(0);

TESTS/mbed_drivers/crc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void test_thread(void)
130130
char test[] = "123456789";
131131
uint32_t crc;
132132
MbedCRC<POLY_32BIT_ANSI, 32> ct;
133-
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char*)test), &crc));
133+
TEST_ASSERT_EQUAL(0, ct.compute((void *)test, strlen((const char *)test), &crc));
134134
TEST_ASSERT_EQUAL(0xCBF43926, crc);
135135
}
136136

TESTS/mbed_drivers/lp_ticker/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void test_multi_ticker(void)
7979
ticker[i].attach_us(callback(increment_multi_counter), MULTI_TICKER_TIME_MS * 1000);
8080
}
8181

82-
Thread::wait(MULTI_TICKER_TIME_MS + extra_wait);
82+
ThisThread::sleep_for(MULTI_TICKER_TIME_MS + extra_wait);
8383
TEST_ASSERT_EQUAL(TICKER_COUNT, multi_counter);
8484

8585
for (int i = 0; i < TICKER_COUNT; i++) {
@@ -95,7 +95,7 @@ void test_multi_ticker(void)
9595
ticker[i].attach_us(callback(increment_multi_counter), (MULTI_TICKER_TIME_MS + i) * 1000);
9696
}
9797

98-
Thread::wait(MULTI_TICKER_TIME_MS + TICKER_COUNT + extra_wait);
98+
ThisThread::sleep_for(MULTI_TICKER_TIME_MS + TICKER_COUNT + extra_wait);
9999
TEST_ASSERT_EQUAL(TICKER_COUNT, multi_counter);
100100

101101
for (int i = 0; i < TICKER_COUNT; i++) {

0 commit comments

Comments
 (0)