-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nrfx 6388 assembly mgmt west build #18018
Merged
carlescufi
merged 2 commits into
nrfconnect:main
from
magp-nordic:NRFX-6388-assembly-mgmt-west-build
Oct 25, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
function(asm_check) | ||
|
||
foreach(hrt_src ${hrt_srcs}) | ||
get_filename_component(asm_filename ${hrt_src} NAME_WE) # filename without extension | ||
get_filename_component(src_dir ${hrt_src} DIRECTORY) | ||
|
||
execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol | ||
${src_dir}/${asm_filename}.s ${asm_filename}-temp.s | ||
RESULT_VARIABLE compare_result) | ||
|
||
if( compare_result EQUAL 0) | ||
message("File ${asm_filename}.s has not changed.") | ||
elseif( compare_result EQUAL 1) | ||
message(WARNING "${asm_filename}.s ASM file content has changed.\ | ||
If you want to include the new ASM in build, \ | ||
please run `ninja asm_install` in FLPR build directory and build again") | ||
else() | ||
message("Something went wrong when comparing ${asm_filename}.s and ${asm_filename}-temp.s") | ||
endif() | ||
endforeach() | ||
|
||
endfunction(asm_check) | ||
|
||
asm_check() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
function(asm_install) | ||
|
||
foreach(hrt_src ${hrt_srcs}) | ||
get_filename_component(asm_filename ${hrt_src} NAME_WE) # filename without extension | ||
get_filename_component(src_dir ${hrt_src} DIRECTORY) | ||
|
||
file(RENAME ${asm_filename}-temp.s ${src_dir}/${asm_filename}.s RESULT rename_result) | ||
|
||
if (rename_result EQUAL 0) | ||
message("Updated ${asm_filename}.s ASM file.") | ||
else() | ||
message(WARNING "${asm_filename}.s cannot be updated, new ASM does not exist. Please run ninja asm_gen to create one.") | ||
endif() | ||
|
||
endforeach() | ||
|
||
endfunction(asm_install) | ||
|
||
asm_install() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 comment covers both this file and
sdp_asm_update.cmake
.As you have already made functions in each script, then I think t would be nice to combine the two scripts into a single one.
You can then call the CMake script as:
cmake -Dcompare-files=${hrt_srcs} -P sdp_asm.cmake
orcmake -Dinstall-files=${hrt_srcs} -P sdp_asm.cmake
and based on the argument then call te respective internal script function.Note, this would be nice for this PR, but is not blocking. If not refactoring during PR. then please create a followup ticket.
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.
Created ticket: https://nordicsemi.atlassian.net/browse/NRFX-6658