-
Notifications
You must be signed in to change notification settings - Fork 3k
CMake: remove need for APP_TARGET #14265
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
We set language standard via mbed-core and app inherits it if links to it. This is breaking change for application, please remove the function call from an application and it should build without errors.
This fixes the problem for an app/test to define APP_TARGET as requirements. This is not a proper fix but rather a workaround for broken apps/tests currently. We will address this separately via new pull request.
We need to fix linker script differently, it should not need APP_TARGET. This is a series of commits fixing APP_TARGET in our tree. We should not require it. The linker script preprocessing will be fixed differently. "application" prefix is temporary until we clean this up completely.
@0xc0170, thank you for your changes. |
@0xc0170 This PR changes remove the dependency of APP_TARGET CMake variable but it fails to create map file for GCC_ARM toolchain with DISCO_L475VG_IOT01A for blinky example build. |
That should be fixed, it's due to the name . We need to remove the last commit and fix it differently. I'll look at this later today. |
Do we just need to update the Line 191 in dd33463
|
tools/cmake/set_linker_script.cmake
Outdated
target_link_options(${input_target} | ||
INTERFACE | ||
"-T" "${LINKER_SCRIPT_PATH}" | ||
"-Wl,-Map=${CMAKE_BINARY_DIR}/${APP_TARGET}${CMAKE_EXECUTABLE_SUFFIX}.map" | ||
"-Wl,-Map=${CMAKE_BINARY_DIR}/application${CMAKE_EXECUTABLE_SUFFIX}.map" |
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.
Removing the APP_TARGET
dependency is great as it was the main roadblock to having multiple CMake targets.
But the hardcode won't help much.
Would using CMAKE_CURRENT_BINARY_DIR
work? Something like:
"-Wl,-Map=${CMAKE_BINARY_DIR}/application${CMAKE_EXECUTABLE_SUFFIX}.map" | |
"-Wl,-Map=${CMAKE_CURRENT_BINARY_DIR}/application${CMAKE_EXECUTABLE_SUFFIX}.map" |
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.
If this is causing a trouble, can you create an issue? we use binary dir in multiple places so should be fixed for all.
This allows us to keep all in one place and fix (removing this function later)
I moved also -Map for Gcc Arm to the function we will remove later and refactor. This should completely fix APP_TARGET usage in our tree. Only reminder there is |
CI started |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
CI restarted |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Waiting for final reviews after my last fix. |
Summary of changes
The recent changes added a new requirement to app/tests - APP_TARGET to be defined. This PR is addressing this issue. It is not completely getting rid of the application dependency (see commit messages for details). I'll create separate issue to fix Gcc Arm memory map and also how to preprocess linker scripts. Both issues will be addressed in the next 2 weeks. We are not able to fix it in the upcoming release (code freeze later this week).
mbed_configure_app_target
stays for now. It will be removed as it should not be required.I tested couple of targets with blinky to see if compile defs are properly defined and it builds without errors.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers