Skip to content

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Mar 25, 2021

Description

Fixes: #216

The optional OUTPUT_EXT field in Mbed OS targets.json specifies the format of the output image. This is important because

  • some targets only support one image format
  • each post-binary hook outputs one image only

This avoids confusion of having both .hex and .bin images generated while only one of them is usable.

Note: The CMake change in Mbed OS is ARMmbed/mbed-os#14472

Test Coverage

  • This change is covered by existing or additional automated tests.
  • Manual testing has been performed (and evidence provided) as automated testing was not feasible.
  • Additional tests are not required for this change (e.g. documentation update).

@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #242 (556859e) into master (f58033e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #242   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files          92       92           
  Lines        2673     2673           
=======================================
  Hits         2592     2592           
  Misses         81       81           

LDong-Arm added a commit to LDong-Arm/mbed-os that referenced this pull request Mar 25, 2021
Requires: ARMmbed/mbed-tools#242

The optional `OUTPUT_EXT` field in Mbed OS `targets.json` specifies
the format of the output image. This is important because
* some targets only support one image format
* each post-binary hook outputs one image only

This avoids confusion of having both .hex and .bin images generated
while only one of them is usable.
LDong-Arm added a commit to LDong-Arm/mbed-os that referenced this pull request Mar 25, 2021
Requires: ARMmbed/mbed-tools#242

The optional `OUTPUT_EXT` field in Mbed OS `targets.json` specifies
the format of the output image. This is important because
* some targets only support one image format
* each post-binary hook outputs one image only

This avoids confusion of having both .hex and .bin images generated
while only one of them is usable.
@LDong-Arm
Copy link
Contributor Author

^^^ Is the coverage report expected? I did update tests/build/test_generate_config.py.

@rwalton-arm
Copy link
Contributor

^^^ Is the coverage report expected? I did update tests/build/test_generate_config.py.

Looks correct to me. The coverage tool just measures how many lines of Python code were hit. This commit doesn't change any Python code, it just edits the jinja2 template. At the Python level we pass the entire config dictionary as the template context. So, the tool doesn't think the line coverage has changed, even though the extra test case was added. Another example of why 100% line coverage != 100% state coverage.

The optional `OUTPUT_EXT` field in Mbed OS `targets.json` specifies
the format of the output image. This is important because
* some targets only support one image format
* each post-binary hook outputs one image only

This avoids confusion of having both .hex and .bin images generated
while only one of them is usable.

Fixes ARMmbed#216
Copy link
Contributor

@rwalton-arm rwalton-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Patater Patater merged commit 23f24a4 into ARMmbed:master Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support OUTPUT_EXT from targets.json

3 participants