Skip to content

Commit d220204

Browse files
authored
Merge pull request #2499 from ARMmbed/release
Release mbed lib v124 + mbed os 5.1.2
2 parents 0993ae5 + ec15ee6 commit d220204

File tree

394 files changed

+131375
-14087
lines changed

Some content is hidden

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

394 files changed

+131375
-14087
lines changed

.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

TESTS/mbedmicro-mbed/attributes/attributes.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,17 @@ int testDeprecatedUsed() {
137137
return 0;
138138
}
139139

140+
MBED_DEPRECATED_SINCE("mbed-os-3.14", "this message should not be displayed")
141+
void testDeprecatedSinceUnused();
142+
void testDeprecatedSinceUnused() { }
143+
144+
MBED_DEPRECATED_SINCE("mbed-os-3.14", "this message should be displayed")
145+
int testDeprecatedSinceUsed();
146+
int testDeprecatedSinceUsed() {
147+
return 0;
148+
}
149+
140150
int testDeprecated() {
141-
return testDeprecatedUsed();
151+
return testDeprecatedUsed() + testDeprecatedSinceUsed();
142152
}
143153

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
#include "rtos.h"
4+
5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
9+
#define NUM_THREADS 5
10+
#define THREAD_STACK_SIZE 256
11+
12+
DigitalOut led1(LED1);
13+
volatile bool should_exit = false;
14+
volatile bool allocation_failure = false;
15+
16+
void task_using_malloc(void)
17+
{
18+
void* data;
19+
while (1) {
20+
// Repeatedly allocate and free memory
21+
data = malloc(100);
22+
if (data != NULL) {
23+
memset(data, 0, 100);
24+
} else {
25+
allocation_failure = true;
26+
}
27+
free(data);
28+
29+
if (should_exit) {
30+
return;
31+
}
32+
}
33+
}
34+
35+
int main()
36+
{
37+
Thread *thread_list[NUM_THREADS];
38+
int test_time = 15;
39+
GREENTEA_SETUP(20, "default_auto");
40+
41+
// Allocate threads for the test
42+
for (int i = 0; i < NUM_THREADS; i++) {
43+
thread_list[i] = new Thread(osPriorityNormal, THREAD_STACK_SIZE);
44+
if (NULL == thread_list[i]) {
45+
allocation_failure = true;
46+
}
47+
thread_list[i]->start(task_using_malloc);
48+
}
49+
50+
// Give the test time to run
51+
while (test_time) {
52+
led1 = !led1;
53+
Thread::wait(1000);
54+
test_time--;
55+
}
56+
57+
// Join and delete all threads
58+
should_exit = 1;
59+
for (int i = 0; i < NUM_THREADS; i++) {
60+
if (NULL == thread_list[i]) {
61+
continue;
62+
}
63+
thread_list[i]->join();
64+
delete thread_list[i];
65+
}
66+
67+
GREENTEA_TESTSUITE_RESULT(!allocation_failure);
68+
}

features/net/FEATURE_IPV6/sal-stack-nanostack/TOOLCHAIN_ARM/TARGET_CORTEX_M/TARGET_M7/error_nanostack.c

Lines changed: 0 additions & 1 deletion
This file was deleted.

features/net/FEATURE_IPV6/sal-stack-nanostack/TOOLCHAIN_GCC/TARGET_CORTEX_M/TARGET_M7/error_nanostack.c

Lines changed: 0 additions & 1 deletion
This file was deleted.

features/net/FEATURE_IPV6/sal-stack-nanostack/TOOLCHAIN_IAR/TARGET_CORTEX_M/TARGET_M7/error_nanostack.c

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)