Skip to content

Commit a6f3fd1

Browse files
authored
Merge pull request #2850 from ARMmbed/release-candidate
Release mbed-os-5.1.5 and mbed lib v127
2 parents 21dd700 + b2d8e70 commit a6f3fd1

File tree

248 files changed

+22624
-3650
lines changed

Some content is hidden

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

248 files changed

+22624
-3650
lines changed

.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

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).

TESTS/mbedmicro-rtos-mbed/mutex/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
*/
1717
#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC)
1818
#define STACK_SIZE DEFAULT_STACK_SIZE/4
19-
#elif (defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB)) && defined(TOOLCHAIN_GCC)
19+
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_GCC)
2020
#define STACK_SIZE DEFAULT_STACK_SIZE/4
2121
#elif defined(TARGET_STM32F334R8) && defined(TOOLCHAIN_IAR)
2222
#define STACK_SIZE DEFAULT_STACK_SIZE/4
2323
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_IAR)
2424
#define STACK_SIZE DEFAULT_STACK_SIZE/4
25-
#elif defined(TARGET_STM32F070RB) && defined(TOOLCHAIN_IAR)
25+
#elif defined(TARGET_STM32F070RB)
2626
#define STACK_SIZE DEFAULT_STACK_SIZE/2
27-
#elif defined(TARGET_STM32F072RB) && defined(TOOLCHAIN_IAR)
27+
#elif defined(TARGET_STM32F072RB)
2828
#define STACK_SIZE DEFAULT_STACK_SIZE/2
2929
#elif defined(TARGET_STM32F302R8) && defined(TOOLCHAIN_IAR)
3030
#define STACK_SIZE DEFAULT_STACK_SIZE/2

TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
*/
1818
#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC)
1919
#define STACK_SIZE DEFAULT_STACK_SIZE/16
20-
#elif (defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB)) && defined(TOOLCHAIN_GCC)
20+
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_GCC)
2121
#define STACK_SIZE DEFAULT_STACK_SIZE/8
2222
#elif defined(TARGET_STM32F334R8) && (defined(TOOLCHAIN_GCC) || defined(TOOLCHAIN_IAR))
2323
#define STACK_SIZE DEFAULT_STACK_SIZE/4
24-
#elif defined(TARGET_STM32F103RB) && defined(TOOLCHAIN_IAR)
25-
#define STACK_SIZE DEFAULT_STACK_SIZE/4
24+
#elif defined(TARGET_STM32F103RB)
25+
#define STACK_SIZE DEFAULT_STACK_SIZE/2
2626
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_IAR)
2727
#define STACK_SIZE DEFAULT_STACK_SIZE/4
28-
#elif defined(TARGET_STM32F070RB) && defined(TOOLCHAIN_IAR)
28+
#elif defined(TARGET_STM32F070RB)
2929
#define STACK_SIZE DEFAULT_STACK_SIZE/2
30-
#elif defined(TARGET_STM32F072RB) && defined(TOOLCHAIN_IAR)
30+
#elif defined(TARGET_STM32F072RB)
3131
#define STACK_SIZE DEFAULT_STACK_SIZE/2
3232
#elif defined(TARGET_STM32F302R8) && defined(TOOLCHAIN_IAR)
3333
#define STACK_SIZE DEFAULT_STACK_SIZE/2

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
*/
1818
#if defined(TARGET_MCU_NRF51822) || defined(TARGET_MCU_NRF52832)
1919
#define STACK_SIZE 512
20+
#elif (defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB) || defined(TARGET_STM32F103RB))
21+
#define STACK_SIZE 512
2022
#else
2123
#define STACK_SIZE DEFAULT_STACK_SIZE
2224
#endif

docs/testing_mbed_OS_5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The way tests are run and compiled in mbed OS 5 is substantially different from
1010
- [Test names](#test-names)
1111
- [Building tests](#building-tests)
1212
- [Building process](#building-process)
13+
- [App config](#app-config)
1314
- [Running tests](#running-tests)
1415
- [Writing tests](#writing-tests)
1516
- [Debugging tests](#debugging-tests)
@@ -73,6 +74,12 @@ The full build process is:
7374
1. For each discovered test, build all of its source files and link it with the non-test code that was built in step 1.
7475
1. If specified, create a test specification file and place it in the given directory for use by testing tools. This is placed in the build directory by default when using mbed CLI.
7576

77+
#### App config
78+
79+
When building an mbed application, the presence of a `mbed_app.json` file allows you to set or override different config settings from libraries and targets. However, because the tests share a common build, this can cause issues when tests have different configurations that affect the OS.
80+
81+
If you need to use app config, this must be set via the `--app-config` option when calling `mbed test`. **If this option is not specified, the build system will ignore all `mbed_app.json` files and use the default config values.**
82+
7683
### Running tests
7784

7885
Automated tests can be run easily through mbed CLI. For information on using mbed CLI, please see its documentation.

features/FEATURE_COMMON_PAL/nanostack-hal-mbed-cmsis-rtos/arm_hal_timer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static osThreadId timer_thread_id;
1616
static Timer timer;
1717
static Timeout timeout;
1818
static uint32_t due;
19-
static void (*callback)(void);
19+
static void (*arm_hal_callback)(void);
2020

2121
static void timer_thread(const void *)
2222
{
@@ -25,7 +25,7 @@ static void timer_thread(const void *)
2525
// !!! We don't do our own enter/exit critical - we rely on callback
2626
// doing it (ns_timer_interrupt_handler does)
2727
//platform_enter_critical();
28-
callback();
28+
arm_hal_callback();
2929
//platform_exit_critical();
3030
}
3131
}
@@ -47,7 +47,7 @@ void platform_timer_disable(void)
4747
// Not called while running, fortunately
4848
void platform_timer_set_cb(void (*new_fp)(void))
4949
{
50-
callback = new_fp;
50+
arm_hal_callback = new_fp;
5151
}
5252

5353
static void timer_callback(void)

features/FEATURE_UVISOR/importer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GDB:=$(PREFIX)gdb
2323
OBJDUMP:=$(PREFIX)objdump
2424

2525
# Translate between uVisor namespace and mbed namespace
26-
TARGET_TRANSLATION:=MCU_K64F.kinetis EFM32.efm32 STM32F4.stm32
26+
TARGET_TRANSLATION:=MCU_K64F.kinetis EFM32.efm32 STM32F4.stm32 ARM_BEETLE_SOC.beetle
2727
TARGET_PREFIX:=../
2828
TARGET_SUPPORTED:=$(TARGET_PREFIX)targets/TARGET_UVISOR_SUPPORTED
2929
TARGET_UNSUPPORTED:=$(TARGET_PREFIX)targets/TARGET_UVISOR_UNSUPPORTED

features/net/FEATURE_IPV4/TESTS/mbedmicro-net/tcp_client_hello_world/main.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@ bool find_substring(const char *first, const char *last, const char *s_first, co
3535
int main() {
3636
GREENTEA_SETUP(20, "default_auto");
3737

38-
bool result = true;
38+
bool result = false;
3939
EthernetInterface eth;
4040
//eth.init(); //Use DHCP
4141
eth.connect();
4242
printf("TCP client IP Address is %s\r\n", eth.get_ip_address());
4343

4444
TCPSocket sock(&eth);
45+
printf("HTTP: Connection to %s:%d\r\n", HTTP_SERVER_NAME, HTTP_SERVER_PORT);
4546
if (sock.connect(HTTP_SERVER_NAME, HTTP_SERVER_PORT) == 0) {
46-
printf("HTTP: Connected to %s:%d\r\n", HTTP_SERVER_NAME, HTTP_SERVER_PORT);
47+
printf("HTTP: OK\r\n");
4748

4849
// We are constructing GET command like this:
4950
// GET http://developer.mbed.org/media/uploads/mbed_official/hello.txt HTTP/1.0\n\n
@@ -66,17 +67,18 @@ int main() {
6667
TEST_ASSERT_TRUE(found_200_ok);
6768
TEST_ASSERT_TRUE(found_hello);
6869

69-
if (!found_200_ok) result = false;
70-
if (!found_hello) result = false;
70+
if (found_200_ok && found_hello) result = true;
7171

7272
printf("HTTP: Received %d chars from server\r\n", ret);
7373
printf("HTTP: Received 200 OK status ... %s\r\n", found_200_ok ? "[OK]" : "[FAIL]");
7474
printf("HTTP: Received '%s' status ... %s\r\n", HTTP_HELLO_STR, found_hello ? "[OK]" : "[FAIL]");
75-
printf("HTTP: Received massage:\r\n\r\n");
75+
printf("HTTP: Received message:\r\n");
7676
printf("%s", buffer);
77+
sock.close();
78+
} else {
79+
printf("HTTP: ERROR\r\n");
7780
}
7881

79-
sock.close();
8082
eth.disconnect();
8183
GREENTEA_TESTSUITE_RESULT(result);
8284
}

features/net/FEATURE_IPV4/TESTS/mbedmicro-net/udp_echo_client/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main() {
3333

3434
greentea_send_kv("target_ip", eth.get_ip_address());
3535

36-
bool result = true;
36+
bool result = false;
3737

3838
char recv_key[] = "host_port";
3939
char ipbuf[60] = {0};
@@ -66,6 +66,8 @@ int main() {
6666
result = false;
6767
break;
6868
}
69+
70+
result = true;
6971
}
7072

7173
sock.close();

features/net/FEATURE_IPV4/lwip-interface/EthernetInterface.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ int EthernetInterface::connect()
2626

2727
int EthernetInterface::disconnect()
2828
{
29-
lwip_bringdown();
30-
return 0;
29+
return lwip_bringdown();
3130
}
3231

3332
const char *EthernetInterface::get_ip_address()

0 commit comments

Comments
 (0)