mbed-os/platform
Robert Walton 6d78f93b9e tfm-post-build: Don't capture subprocess stdout
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.
2021-06-29 15:37:44 +01:00
..
FEATURE_EXPERIMENTAL_API tfm-post-build: Don't capture subprocess stdout 2021-06-29 15:37:44 +01:00
bare_metal Added missing blockdevice mbed_lib.json 2020-11-02 16:35:26 +00:00
cxxsupport Namespace scope mbed:: added for CriticalSectionLock used in Atomic templates 2021-06-08 22:55:43 +02:00
docs fix(docs): corrects various typos in project documentation 2021-04-23 23:31:11 -05:00
include/platform Disable override errno erro value 2021-06-25 17:12:55 +02:00
mbed-trace Trace: Change tr_debug color from gray to bright blue 2021-05-05 12:34:48 -07:00
randlib CMake: Rename CMake targets 2020-11-06 17:25:22 +00:00
source Disable override errno erro value 2021-06-25 17:12:55 +02:00
tests CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
CMakeLists.txt CMake: Only build unit tests if Mbed OS is the current project 2021-06-10 23:34:14 +01:00
mbed_lib.json M2354: Support TF-M 2021-05-26 09:35:02 +08:00