subprocess.PIPE is used to enable the parent process to communicate with the subprocess via pipes, which mean all stdout and stderr messages are captured and returned as part of Popen.communicate's result tuple. In our case, we want to display the error messages on the console, so we don't need to capture the output from stdout. Example of a typical error message before this change: ``` Traceback (most recent call last): File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 197, in <module> sign_and_merge_tfm_bin(args.tfm_target, args.target_path, args.non_secure_bin, args.secure_bin) File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 81, in sign_and_merge_tfm_bin " secure binary, Error code: " + str(retcode)) Exception: Unable to sign musca_b1 secure binary, Error code: 1 ``` Example of the error message after this change: ``` Traceback (most recent call last): File "/mbed-os/tools/psa/tfm/bin_utils/wrapper.py", line 13, in <module> import click ModuleNotFoundError: No module named 'click' Traceback (most recent call last): File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 194, in <module> sign_and_merge_tfm_bin(args.tfm_target, args.target_path, args.non_secure_bin, args.secure_bin) File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 80, in sign_and_merge_tfm_bin raise Exception("Unable to sign " + target_name + Exception: Unable to sign musca_b1 secure binary, Error code: 1 ``` This is a significant improvement as now you can see what the reason for the failure was. |
||
---|---|---|
.github | ||
TESTS | ||
TEST_APPS | ||
UNITTESTS | ||
cmsis | ||
connectivity | ||
docs | ||
drivers | ||
events | ||
features | ||
hal | ||
platform | ||
rtos | ||
storage | ||
targets | ||
tools | ||
.astylerc | ||
.codecheckignore | ||
.coveragerc | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.mergify.yml | ||
.pylintrc | ||
.travis.yml | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
DOXYGEN_FRONTPAGE.md | ||
Jenkinsfile | ||
LICENSE-apache-2.0.txt | ||
LICENSE.md | ||
README.md | ||
doxyfile_options | ||
doxygen_options.json | ||
logo.png | ||
mbed.h | ||
requirements.txt |
README.md
Arm Mbed OS is an open source embedded operating system designed specifically for the "things" in the Internet of Things. It includes all the features you need to develop a connected product based on an Arm Cortex-M microcontroller, including security, connectivity, an RTOS and drivers for sensors and I/O devices.
Mbed OS provides a platform that includes:
- Security foundations.
- Cloud management services.
- Drivers for sensors, I/O devices and connectivity.
Release notes
The release notes detail the current release. You can also find information about previous versions.
License and contributions
The software is provided under the Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more information.
This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.
Folders containing files under different permissive license than Apache 2.0 are listed in the LICENSE file.
Getting started for developers
We have a developer website for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS.
Getting started for contributors
We also have a contributing and publishing guide that covers licensing, contributor agreements and style guidelines.
Documentation
For more information about Mbed OS, please see our published documentation. It includes Doxygen for our APIs, step-by-step tutorials, porting information and background reference materials about our architecture and tools.
To contribute to this documentation, please see the mbed-os-5-docs repository.