Skip to content

Commit f958057

Browse files
committed
Merge remote-tracking branch 'ARMmbed/master'
2 parents 667acca + e9c556d commit f958057

File tree

1,459 files changed

+217638
-80481
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,459 files changed

+217638
-80481
lines changed

.github/issue_template.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Note: This is just a template, so feel free to use/remove the unnecessary things
2+
3+
### Description
4+
- Type: Bug | Enhancement | Question
5+
- Related issue: `#abc`
6+
- Priority: Blocker | Major | Minor
7+
8+
---------------------------------------------------------------
9+
## Bug
10+
11+
**Target**
12+
K64F|??
13+
14+
**Toolchain:**
15+
GCC_ARM|ARM|IAR
16+
17+
**Toolchain version:**
18+
19+
**mbed-cli version:**
20+
(`mbed --version`)
21+
22+
**meed-os sha:**
23+
(`git log -n1 --oneline`)
24+
25+
**DAPLink version:**
26+
27+
**Expected behavior**
28+
29+
**Actual behavior**
30+
31+
**Steps to reproduce**
32+
33+
----------------------------------------------------------------
34+
## Enhancement
35+
36+
**Reason to enhance or problem with existing solution**
37+
38+
**Suggested enhancement**
39+
40+
**Pros**
41+
42+
**Cons**
43+
44+
-----------------------------------------------------------------
45+
46+
## Question
47+
48+
**How to?**

.github/pull_request_template.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Notes:
2+
* Pull requests will not be accepted until the submitter has agreed to the [contributer agreement](https://github.com/ARMmbed/mbed-os/blob/master/CONTRIBUTING.md).
3+
* This is just a template, so feel free to use/remove the unnecessary things
4+
5+
## Description
6+
A few sentences describing the overall goals of the pull request's commits.
7+
8+
9+
## Status
10+
**READY/IN DEVELOPMENT/HOLD**
11+
12+
13+
## Migrations
14+
If this PR changes any APIs or behaviors, give a short description of what *API users* should do when this PR is merged.
15+
16+
YES | NO
17+
18+
19+
## Related PRs
20+
List related PRs against other branches:
21+
22+
branch | PR
23+
------ | ------
24+
other_pr_production | [link]()
25+
other_pr_master | [link]()
26+
27+
28+
## Todos
29+
- [ ] Tests
30+
- [ ] Documentation
31+
32+
33+
## Deploy notes
34+
Notes regarding the deployment of this PR. These should note any
35+
required changes in the build environment, tools, compilers, etc.
36+
37+
38+
## Steps to test or reproduce
39+
Outline the steps to test or reproduce the PR here.

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ var
3434
sdist
3535
develop-eggs
3636
.installed.cfg
37-
lib
38-
lib64
3937

4038
# Installer logs
4139
pip-log.txt

.pylintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Format]
2+
max-line-length=80

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ python:
33

44
script:
55
- PYTHONPATH=. python tools/test/config_test/config_test.py
6+
- python tools/test/pylint.py
67
- py.test tools/test/toolchains/api.py
78
- python tools/build_travis.py
89
before_install:
@@ -17,3 +18,4 @@ install:
1718
- sudo pip install prettytable
1819
- sudo pip install jinja2
1920
- sudo pip install pytest
21+
- sudo pip install pylint

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Description
2-
This document is cheat sheet for everyone who wants to contribute to mbedmicro/mbed GitHub repository at GitHub.
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.
33
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.
44

55
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.
66

77
## Where to get more information?
8-
You can for example read more in our ```docs``` section in [mbedmicro/mbed/doc](https://github.com/PrzemekWirkus/mbed/tree/docs/docs) directory.
8+
You can for example read more in our ```docs``` section in [ARMmbed/mbed-os/doc](https://github.com/ARMmbed/mbed-os/tree/master/docs) directory.
99

1010
# How to contribute
1111
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.
1212

1313
Before a pull request will be merged, the [mbed Contributor Agreement](http://developer.mbed.org/contributor_agreement/) must be signed.
1414

15-
You can pick up existing [mbed GitHub Issue](https://github.com/mbedmicro/mbed/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.
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.
1616

1717
# Enhancements vs Bugs
1818
Enhancements are:
@@ -23,7 +23,7 @@ Enhancements are:
2323
* Documentation work.
2424

2525
Bugs are:
26-
* Issues rose internally or externally by mbedmicro/mbed users.
26+
* Issues rose internally or externally by [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) users.
2727
* Internally (within mbed team) created issues from Continuous Integration pipeline and build servers.
2828
* Issues detected using automation tools such as compilers, sanitizers, static code analysis tools etc.
2929

@@ -39,7 +39,7 @@ Please be patient, digest Gate Keeper's feedback and respond promptly :)
3939
* 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.
4040

4141
# Glossary
42-
* Gate Keeper – persons responsible for overall code-base quality of mbedmicro/mbed project.
42+
* Gate Keeper – persons responsible for overall code-base quality of [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) project.
4343
* Enhancement – New feature deployment, code refactoring actions or existing code improvements.
4444
* 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 mbedmicro/mbed.
45+
* Mbed classic – mbed SDK 2.0 located in GitHub at [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os).

Jenkinsfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
// List of targets to compile
3+
def targets = [
4+
//"LPC1768",
5+
//"NUCLEO_F401RE",
6+
//"NRF51822",
7+
"K64F"
8+
]
9+
10+
// Map toolchains to compiler labels on Jenkins
11+
def toolchains = [
12+
ARM: "armcc",
13+
//IAR: "iar_arm",
14+
GCC_ARM: "arm-none-eabi-gcc"
15+
]
16+
17+
// mbed.getCurrentBranch returns either local branch name or reference to pull request
18+
def currentBranch = mbed.getCurrentBranch()
19+
20+
// Create a map of predefined build steps
21+
def parallelSteps = mbed.createParalleSteps("mbed-os", targets, toolchains)
22+
23+
// Run build steps parallel, map as paramater
24+
mbed.compile(parallelSteps)
25+
26+
def testApps = [
27+
"mbed-os-cliapp",
28+
"mbed-client-testapp"
29+
]
30+
31+
// buildTestApps accepts array of test application names and a mbed-os branch or PR reference as parameters
32+
mbed.buildTestApps(testApps, "${currentBranch}")

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mbed OS accelerates the process of creating a connected product by providing a p
88

99
Our current release series is mbed OS 5.1:
1010

11-
- [Release Note](https://docs.mbed.com/docs/mbed-os-release-notes/en/latest/5_1/release)
11+
- [Release Note](https://docs.mbed.com/docs/mbed-os-release-notes/en/latest/5_1/release/)
1212

1313
## Getting Started for Developers
1414

@@ -20,4 +20,4 @@ We have a getting started guide for developers using mbed OS in applications:
2020

2121
We have a getting started guide for contributors working on mbed OS:
2222

23-
- Have a look in the docs directory
23+
- Have a look in the docs directory

TESTS/host_tests/timing_drift_auto.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
"""
2+
mbed SDK
3+
Copyright (c) 2011-2013 ARM Limited
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
"""
17+
18+
from mbed_host_tests import BaseHostTest
19+
20+
21+
class TimingDriftTest(BaseHostTest):
22+
""" This test is reading single characters from stdio
23+
and measures time between their occurrences.
24+
"""
25+
__result = None
26+
27+
# This is calculated later: average_drift_max * number of tick events
28+
total_drift_max = None
29+
30+
average_drift_max = 0.05
31+
ticks = []
32+
start_time = None
33+
finish_time = None
34+
dut_seconds_passed = None
35+
total_time = None
36+
total_drift = None
37+
average_drift = None
38+
39+
def _callback_result(self, key, value, timestamp):
40+
# We should not see result data in this test
41+
self.__result = False
42+
43+
def _callback_end(self, key, value, timestamp):
44+
""" {{end;%s}}} """
45+
self.log("Received end event, timestamp: %f" % timestamp)
46+
self.notify_complete(result=self.result(print_stats=True))
47+
48+
49+
def _callback_tick(self, key, value, timestamp):
50+
""" {{tick;%d}}} """
51+
self.log("tick! %f" % timestamp)
52+
self.ticks.append((key, value, timestamp))
53+
54+
55+
def setup(self):
56+
self.register_callback("end", self._callback_end)
57+
self.register_callback('tick', self._callback_tick)
58+
59+
60+
def result(self, print_stats=True):
61+
self.dut_seconds_passed = len(self.ticks) - 1
62+
63+
if self.dut_seconds_passed < 1:
64+
if print_stats:
65+
self.log("FAIL: failed to receive at least two tick events")
66+
self.__result = False
67+
return self.__result
68+
69+
self.total_drift_max = self.dut_seconds_passed * self.average_drift_max
70+
71+
self.start_time = self.ticks[0][2]
72+
self.finish_time = self.ticks[-1][2]
73+
self.total_time = self.finish_time - self.start_time
74+
self.total_drift = self.total_time - self.dut_seconds_passed
75+
self.average_drift = self.total_drift / self.dut_seconds_passed
76+
77+
if print_stats:
78+
self.log("Start: %f" % self.start_time)
79+
self.log("Finish: %f" % self.finish_time)
80+
self.log("Total time taken: %f" % self.total_time)
81+
82+
total_drift_ratio_string = "Total drift/Max total drift: %f/%f"
83+
self.log(total_drift_ratio_string % (self.total_drift,
84+
self.total_drift_max))
85+
86+
average_drift_ratio_string = "Average drift/Max average drift: %f/%f"
87+
self.log(average_drift_ratio_string % (self.average_drift,
88+
self.average_drift_max))
89+
90+
91+
if abs(self.total_drift) > self.total_drift_max:
92+
if print_stats:
93+
self.log("FAIL: Total drift exceeded max total drift")
94+
self.__result = False
95+
elif self.average_drift > self.average_drift_max:
96+
if print_stats:
97+
self.log("FAIL: Average drift exceeded max average drift")
98+
self.__result = False
99+
else:
100+
self.__result = True
101+
102+
return self.__result
103+
104+
105+
def teardown(self):
106+
pass

TESTS/integration/threaded_blinky/main.cpp

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)