Skip to content

Commit

Permalink
Merge pull request #2850 from ARMmbed/release-candidate
Browse files Browse the repository at this point in the history
Release mbed-os-5.1.5 and mbed lib v127
  • Loading branch information
adbridge authored Sep 30, 2016
2 parents 21dd700 + b2d8e70 commit a6f3fd1
Show file tree
Hide file tree
Showing 248 changed files with 22,624 additions and 3,650 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ var
sdist
develop-eggs
.installed.cfg
lib
lib64

# Installer logs
pip-log.txt
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Description
This document is cheat sheet for everyone who wants to contribute to mbedmicro/mbed GitHub repository at GitHub.
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.
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.

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.

## Where to get more information?
You can for example read more in our ```docs``` section in [mbedmicro/mbed/doc](https://github.com/PrzemekWirkus/mbed/tree/docs/docs) directory.
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.

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

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

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

# Enhancements vs Bugs
Enhancements are:
Expand All @@ -23,7 +23,7 @@ Enhancements are:
* Documentation work.

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

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

# Glossary
* Gate Keeper – persons responsible for overall code-base quality of mbedmicro/mbed project.
* Gate Keeper – persons responsible for overall code-base quality of [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os) project.
* Enhancement – New feature deployment, code refactoring actions or existing code improvements.
* 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.
* Mbed classic – mbed SDK 2.0 located in GitHub at mbedmicro/mbed.
* Mbed classic – mbed SDK 2.0 located in GitHub at [ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os).
6 changes: 3 additions & 3 deletions TESTS/mbedmicro-rtos-mbed/mutex/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/
#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC)
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif (defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB)) && defined(TOOLCHAIN_GCC)
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_GCC)
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif defined(TARGET_STM32F334R8) && defined(TOOLCHAIN_IAR)
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_IAR)
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif defined(TARGET_STM32F070RB) && defined(TOOLCHAIN_IAR)
#elif defined(TARGET_STM32F070RB)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
#elif defined(TARGET_STM32F072RB) && defined(TOOLCHAIN_IAR)
#elif defined(TARGET_STM32F072RB)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
#elif defined(TARGET_STM32F302R8) && defined(TOOLCHAIN_IAR)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
Expand Down
10 changes: 5 additions & 5 deletions TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
*/
#if (defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8)) && defined(TOOLCHAIN_GCC)
#define STACK_SIZE DEFAULT_STACK_SIZE/16
#elif (defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB)) && defined(TOOLCHAIN_GCC)
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_GCC)
#define STACK_SIZE DEFAULT_STACK_SIZE/8
#elif defined(TARGET_STM32F334R8) && (defined(TOOLCHAIN_GCC) || defined(TOOLCHAIN_IAR))
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif defined(TARGET_STM32F103RB) && defined(TOOLCHAIN_IAR)
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif defined(TARGET_STM32F103RB)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
#elif defined(TARGET_STM32F030R8) && defined(TOOLCHAIN_IAR)
#define STACK_SIZE DEFAULT_STACK_SIZE/4
#elif defined(TARGET_STM32F070RB) && defined(TOOLCHAIN_IAR)
#elif defined(TARGET_STM32F070RB)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
#elif defined(TARGET_STM32F072RB) && defined(TOOLCHAIN_IAR)
#elif defined(TARGET_STM32F072RB)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
#elif defined(TARGET_STM32F302R8) && defined(TOOLCHAIN_IAR)
#define STACK_SIZE DEFAULT_STACK_SIZE/2
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
#if defined(TARGET_MCU_NRF51822) || defined(TARGET_MCU_NRF52832)
#define STACK_SIZE 512
#elif (defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB) || defined(TARGET_STM32F103RB))
#define STACK_SIZE 512
#else
#define STACK_SIZE DEFAULT_STACK_SIZE
#endif
Expand Down
7 changes: 7 additions & 0 deletions docs/testing_mbed_OS_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The way tests are run and compiled in mbed OS 5 is substantially different from
- [Test names](#test-names)
- [Building tests](#building-tests)
- [Building process](#building-process)
- [App config](#app-config)
- [Running tests](#running-tests)
- [Writing tests](#writing-tests)
- [Debugging tests](#debugging-tests)
Expand Down Expand Up @@ -73,6 +74,12 @@ The full build process is:
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.
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.

#### App config

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.

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

### Running tests

Automated tests can be run easily through mbed CLI. For information on using mbed CLI, please see its documentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static osThreadId timer_thread_id;
static Timer timer;
static Timeout timeout;
static uint32_t due;
static void (*callback)(void);
static void (*arm_hal_callback)(void);

static void timer_thread(const void *)
{
Expand All @@ -25,7 +25,7 @@ static void timer_thread(const void *)
// !!! We don't do our own enter/exit critical - we rely on callback
// doing it (ns_timer_interrupt_handler does)
//platform_enter_critical();
callback();
arm_hal_callback();
//platform_exit_critical();
}
}
Expand All @@ -47,7 +47,7 @@ void platform_timer_disable(void)
// Not called while running, fortunately
void platform_timer_set_cb(void (*new_fp)(void))
{
callback = new_fp;
arm_hal_callback = new_fp;
}

static void timer_callback(void)
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_UVISOR/importer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GDB:=$(PREFIX)gdb
OBJDUMP:=$(PREFIX)objdump

# Translate between uVisor namespace and mbed namespace
TARGET_TRANSLATION:=MCU_K64F.kinetis EFM32.efm32 STM32F4.stm32
TARGET_TRANSLATION:=MCU_K64F.kinetis EFM32.efm32 STM32F4.stm32 ARM_BEETLE_SOC.beetle
TARGET_PREFIX:=../
TARGET_SUPPORTED:=$(TARGET_PREFIX)targets/TARGET_UVISOR_SUPPORTED
TARGET_UNSUPPORTED:=$(TARGET_PREFIX)targets/TARGET_UVISOR_UNSUPPORTED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ bool find_substring(const char *first, const char *last, const char *s_first, co
int main() {
GREENTEA_SETUP(20, "default_auto");

bool result = true;
bool result = false;
EthernetInterface eth;
//eth.init(); //Use DHCP
eth.connect();
printf("TCP client IP Address is %s\r\n", eth.get_ip_address());

TCPSocket sock(&eth);
printf("HTTP: Connection to %s:%d\r\n", HTTP_SERVER_NAME, HTTP_SERVER_PORT);
if (sock.connect(HTTP_SERVER_NAME, HTTP_SERVER_PORT) == 0) {
printf("HTTP: Connected to %s:%d\r\n", HTTP_SERVER_NAME, HTTP_SERVER_PORT);
printf("HTTP: OK\r\n");

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

if (!found_200_ok) result = false;
if (!found_hello) result = false;
if (found_200_ok && found_hello) result = true;

printf("HTTP: Received %d chars from server\r\n", ret);
printf("HTTP: Received 200 OK status ... %s\r\n", found_200_ok ? "[OK]" : "[FAIL]");
printf("HTTP: Received '%s' status ... %s\r\n", HTTP_HELLO_STR, found_hello ? "[OK]" : "[FAIL]");
printf("HTTP: Received massage:\r\n\r\n");
printf("HTTP: Received message:\r\n");
printf("%s", buffer);
sock.close();
} else {
printf("HTTP: ERROR\r\n");
}

sock.close();
eth.disconnect();
GREENTEA_TESTSUITE_RESULT(result);
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main() {

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

bool result = true;
bool result = false;

char recv_key[] = "host_port";
char ipbuf[60] = {0};
Expand Down Expand Up @@ -66,6 +66,8 @@ int main() {
result = false;
break;
}

result = true;
}

sock.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ int EthernetInterface::connect()

int EthernetInterface::disconnect()
{
lwip_bringdown();
return 0;
return lwip_bringdown();
}

const char *EthernetInterface::get_ip_address()
Expand Down
Loading

0 comments on commit a6f3fd1

Please sign in to comment.