Go to file
Lingkai Dong 351680fb18 Rework post-build to support multiple executables
When building greentea tests, each test is an executable with its
own output binary path. This is also the case when a user project
produces multiple executables. But the current implementation of
post-build operations always assumes there's only one executable,
at the root of the build directory.

The post-build command depends on Mbed target, and it always takes
the the executable we build as an input file. To achieve this, we
let each Mbed target (that has a post-build command) define a function

    function(mbed_post_build_function target)

which takes a CMake executable target as an argument from which it can
get its binary path using generator expressions. It generates and adds
to the passed executable target a post-build custom command.

Notes:
* The function name needs to be exact, because CMake only supports
literal function calls - CMake can't dereference a function name from
a variable. To avoid multiple definitions of this function, each Mbed
target needs to guard it with a macro to check if the user is
building this Mbed target.
* `mbed_post_build_function()` is a function, but it is usually
defined by another macro rather than a parent function, because
nesting functions would make many variables inaccessible inside the
innermost `mbed_post_build_function()`.
* There's no more need to force regenerate images. Previously, post-
build commands were custom *targets* which always got to run, so we
force regenerated images on every build to avoid patching an image
that's already been patched once on previous build. Now post-build
commands are custom *commands* of the same executable target, and they
are only run if the executable target itself is rebuilt.
2021-07-22 17:31:22 +01:00
.github run only on feature ble changes 2021-07-16 10:20:38 +01:00
TESTS Move Mbed TLS self tests to a separate configuration 2021-06-15 10:50:14 +01:00
UNITTESTS CMake: Move ble fakes into FEATURE_BLE double dir 2021-07-21 01:56:29 -07:00
cmsis Merge pull request #14821 from boraozgen/rtos-events-enable 2021-07-20 09:47:59 +02:00
connectivity Merge pull request #14730 from Ekidna/fix/sx126x-select-pins 2021-07-21 14:52:44 +02:00
docs fix(docs): corrects various typos in project documentation 2021-04-23 23:31:11 -05:00
drivers Merge pull request #14805 from rkotan/I2C_Multiple_Buses_fix 2021-07-20 09:44:59 +02:00
events CMake: Move events fakes into events double dir 2021-07-09 02:56:26 -07:00
extern Add external greentea-client dependency 2021-07-07 14:29:14 +01:00
features CMake: greentea: Fix io issue with greentea-client 2021-07-09 14:33:08 +01:00
hal pin_names-generic test update before skipping it 2021-07-06 17:13:45 +02:00
platform Rework post-build to support multiple executables 2021-07-22 17:31:22 +01:00
rtos CMake: Remove mbed-stubs-rtos-headers library 2021-07-08 07:14:56 -07:00
storage Merge pull request #14909 from DDC-NDRS/ndrs-pst 2021-07-20 09:55:08 +02:00
targets Rework post-build to support multiple executables 2021-07-22 17:31:22 +01:00
tools Rework post-build to support multiple executables 2021-07-22 17:31:22 +01:00
.astylerc AStyle: fix indentation for longer lines 2018-05-24 14:15:52 +01:00
.codecheckignore Add connectivity/drivers/wifi/COMPONENT_WHD to ignore list 2021-05-18 17:20:31 +02:00
.coveragerc Exclude libraries and tests from coverage numbers 2017-09-25 11:51:31 -05:00
.editorconfig Add .editorconfig file 2021-02-25 16:26:34 +01:00
.gitattributes Normalize line endings for IM880B startup files. 2019-07-15 14:56:22 +03:00
.gitignore CMake: Update mbed os, unittest CMake and add CMAKE_CROSSCOMPILING guard 2021-05-11 02:49:03 -07:00
.lgtm.yml lgtm: Add initial LGTM configuration file 2021-05-27 17:38:47 +01:00
.mergify.yml Mergify: remove stale label when PR is merged 2021-02-22 15:54:02 +00:00
.pylintrc Add pylint configuration file 2016-08-16 11:48:45 -05:00
.travis.yml travis: Drop testing Python 3.5 and 3.6 2021-06-30 09:12:31 +01:00
CMakeLists.txt Rework post-build to support multiple executables 2021-07-22 17:31:22 +01:00
CONTRIBUTING.md Fix links to documentation on https://os.mbed.com 2019-01-21 14:56:40 -08:00
DOXYGEN_FRONTPAGE.md Updating with new links and correct branding 2020-08-12 10:49:05 +01:00
Jenkinsfile Updated file comment 2018-08-20 12:31:40 +03:00
LICENSE-apache-2.0.txt license: rename to apache 2.0 txt file 2019-02-13 11:28:01 +00:00
LICENSE.md Update list of licenses in source and python modules 2021-02-08 15:13:43 +00:00
README.md Fix 'LICENSE' file 404 link error 2019-05-02 10:20:26 -05:00
doxyfile_options BLE: update doxygen exclusion pattern 2020-08-25 11:34:00 +01:00
doxygen_options.json BLE: update doxygen exclusion pattern 2020-08-25 11:34:00 +01:00
logo.png Readme updates for style and branding 2017-12-04 14:59:16 -06:00
mbed.h Added Raw CAN (unlocked can read api) and updated the code for the 2021-06-29 12:46:21 +05:30
requirements.txt python: Remove direct dependency on prettytable 2021-07-21 13:52:52 +01:00

README.md

Mbed OS

Build status release Build status master Tools coverage status

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.