-
Notifications
You must be signed in to change notification settings - Fork 3k
CMake: Remove references of APP_TARGET #14334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: Remove references of APP_TARGET #14334
Conversation
This needs to be removed as there should not be a name requirement for application CMake variable name. Furthermore, in certain uses cases it prevents successful builds for some Mbed targets. For instance when building Greentea test applications for Mbed targets that require post build operations as they do not define APP_TARGET.
@hugueskamba, thank you for your changes. |
@ARMmbed/team-cypress Please review |
artefacts_location = sys.argv[1] | ||
|
||
try: | ||
binary = list(pathlib.Path(artefacts_location).glob("*.bin"))[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this assuming there is just one binary ? Shall this be documented here (the assumption made)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is the assumption made.
@ifyall @RaymondNgun is this a fair assumption?
"""Entry point for the "sign" CLI command.""" | ||
try: | ||
elf_file = list(pathlib.Path(args.artefacts_location).glob("*.elf"))[0] | ||
m4hex_file = list(pathlib.Path(args.artefacts_location).glob("*.hex"))[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ARMmbed/team-cypress will this work - taking the first bin/hex found in the artifacts ?
I would say yes - there's one application, for one core.
set(post_build_command | ||
COMMAND ${Python3_EXECUTABLE} ${MBED_PATH}/targets/TARGET_NXP/scripts/LPC.py | ||
${CMAKE_BINARY_DIR}/${APP_TARGET}.bin | ||
${CMAKE_BINARY_DIR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be current binary dir ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this instance it has to be CMAKE_BINARY_DIR
.
Because with Greentea tests, CMAKE_CURRENT_BINARY_DIR
here is not where we want.
For example when building the hal qspi Greentea test, CMAKE_CURRENT_BINARY_DIR
is /path/to/mbed-os/hal/tests/TESTS/mbed_hal/qspi/cmake_build/LPC546XX/develop/ARM/build/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MCU_LPC546XX/
. Whilst CMAKE_BINARY_DIR
is /path/to/mbed-os/hal/tests/TESTS/mbed_hal/qspi/cmake_build/LPC546XX/develop/ARM/
.
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
APP_TARGET
needs to be removed as there should not be a name requirement for application CMake variable name.Furthermore, in certain use cases it prevents successful builds for some Mbed targets. For instance when building Greentea test applications for Mbed targets that require post build operations as they do not define
APP_TARGET
.Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers