Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/216.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a CMake variable `MBED_OUTPUT_EXT` for the output image extension.
1 change: 1 addition & 0 deletions src/mbed_tools/build/_internal/templates/mbed_config.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(MBED_TARGET "{{target_name}}" CACHE STRING "")
set(MBED_CPU_CORE "{{core}}" CACHE STRING "")
set(MBED_C_LIB "{{c_lib}}" CACHE STRING "")
set(MBED_PRINTF_LIB "{{printf_lib}}" CACHE STRING "")
set(MBED_OUTPUT_EXT "{{OUTPUT_EXT}}" CACHE STRING "")

list(APPEND MBED_TARGET_SUPPORTED_C_LIBS {% for supported_c_lib in supported_c_libs %}
{{supported_c_lib}}
Expand Down
2 changes: 2 additions & 0 deletions tests/build/test_generate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"supported_form_factors": ["ARDUINO"],
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
"trustzone": False,
"OUTPUT_EXT": "hex",
}


Expand Down Expand Up @@ -288,6 +289,7 @@ def test_overrides_target_config_param_from_app(matching_target_and_filter, prog
("target.macros", ["DEFINE"], "DEFINE"),
("target.device_has", ["NOTHING"], "DEVICE_NOTHING"),
("target.features", ["ELECTRICITY"], "FEATURE_ELECTRICITY"),
("OUTPUT_EXT", "hex", 'MBED_OUTPUT_EXT "hex"'),
],
)
def test_overrides_target_non_config_params_from_app(
Expand Down