-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2499 from ARMmbed/release
Release mbed lib v124 + mbed os 5.1.2
- Loading branch information
Showing
394 changed files
with
131,375 additions
and
14,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Format] | ||
max-line-length=80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#include "mbed.h" | ||
#include "test_env.h" | ||
#include "rtos.h" | ||
|
||
#if defined(MBED_RTOS_SINGLE_THREAD) | ||
#error [NOT_SUPPORTED] test not supported | ||
#endif | ||
|
||
#define NUM_THREADS 5 | ||
#define THREAD_STACK_SIZE 256 | ||
|
||
DigitalOut led1(LED1); | ||
volatile bool should_exit = false; | ||
volatile bool allocation_failure = false; | ||
|
||
void task_using_malloc(void) | ||
{ | ||
void* data; | ||
while (1) { | ||
// Repeatedly allocate and free memory | ||
data = malloc(100); | ||
if (data != NULL) { | ||
memset(data, 0, 100); | ||
} else { | ||
allocation_failure = true; | ||
} | ||
free(data); | ||
|
||
if (should_exit) { | ||
return; | ||
} | ||
} | ||
} | ||
|
||
int main() | ||
{ | ||
Thread *thread_list[NUM_THREADS]; | ||
int test_time = 15; | ||
GREENTEA_SETUP(20, "default_auto"); | ||
|
||
// Allocate threads for the test | ||
for (int i = 0; i < NUM_THREADS; i++) { | ||
thread_list[i] = new Thread(osPriorityNormal, THREAD_STACK_SIZE); | ||
if (NULL == thread_list[i]) { | ||
allocation_failure = true; | ||
} | ||
thread_list[i]->start(task_using_malloc); | ||
} | ||
|
||
// Give the test time to run | ||
while (test_time) { | ||
led1 = !led1; | ||
Thread::wait(1000); | ||
test_time--; | ||
} | ||
|
||
// Join and delete all threads | ||
should_exit = 1; | ||
for (int i = 0; i < NUM_THREADS; i++) { | ||
if (NULL == thread_list[i]) { | ||
continue; | ||
} | ||
thread_list[i]->join(); | ||
delete thread_list[i]; | ||
} | ||
|
||
GREENTEA_TESTSUITE_RESULT(!allocation_failure); | ||
} |
1 change: 0 additions & 1 deletion
1
...EATURE_IPV6/sal-stack-nanostack/TOOLCHAIN_ARM/TARGET_CORTEX_M/TARGET_M7/error_nanostack.c
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+881 KB
...l-stack-nanostack/TOOLCHAIN_ARM/TARGET_CORTEX_M/TARGET_M7/libnanostack_armcc_Cortex-M7.ar
Binary file not shown.
1 change: 0 additions & 1 deletion
1
...EATURE_IPV6/sal-stack-nanostack/TOOLCHAIN_GCC/TARGET_CORTEX_M/TARGET_M7/error_nanostack.c
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+687 KB
...ostack/TOOLCHAIN_GCC/TARGET_CORTEX_M/TARGET_M7/libnanostack_arm-none-eabi-gcc_Cortex-M7.a
Binary file not shown.
1 change: 0 additions & 1 deletion
1
...EATURE_IPV6/sal-stack-nanostack/TOOLCHAIN_IAR/TARGET_CORTEX_M/TARGET_M7/error_nanostack.c
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+1.59 MB
...l-stack-nanostack/TOOLCHAIN_IAR/TARGET_CORTEX_M/TARGET_M7/libnanostack_iccarm_Cortex-M7.a
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.