Cypress: Improve `mbed_post_build_psoc6_merge_hex()`
The CMake macro `mbed_post_build_psoc6_merge_hex()` takes the name of a Cypress target and an optional Cortex-M0 hex image as arguments. The proper way to define and parse optional arguments of a function or macro is `cmake_parse_arguments()`, which allows the caller to indicate what they are passing rather than rely on an argument's relative position within `${ARGN}` which is not rigorous. Also, avoid duplicating the common part of the post build command when the optional argument is passed/not passed. |
---|
|
targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYSBSYSKIT_01/CMakeLists.txt |
---|
targets/TARGET_Cypress/scripts/mbed_set_post_build_cypress.cmake |
---|