-
Notifications
You must be signed in to change notification settings - Fork 1k
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:fix protected build link option break,init canmv230 protected build #12022
base: master
Are you sure you want to change the base?
Conversation
8e5493c
to
fdaee08
Compare
@xuxin930 @xiaoxiang781216 any idea why the CI reported this issue many times: Check failure on line 51 in include/nuttx/wdog.h missing binary operator before token "(" |
@acassis @xiaoxiang781216 The problem is here I think clearing the cache solves the problem |
@acassis @simbit18 |
@xuxin930 exactly !!! cache must be cleared manually. |
set_target_properties(nuttx_user PROPERTIES LINK_OPTIONS "") | ||
# deleted Toolchain link options | ||
get_target_property(nuttx_user_LINK_OPTIONS nuttx_user LINK_OPTIONS) | ||
list(REMOVE_ITEM nuttx_user_LINK_OPTIONS "-Wl,--gc-sections") |
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.
why not skip adding these option instead
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.
why not skip adding these option instead
These link options is set in the Toolchain file and has global scope.
they are also required by the nuttx target.but the timing of setting the Toolchain file is before all targets.
so it cannot be distinguished by USER_LINK_OPTION and NUTTX_LINK_OPTION like Makefile.
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.
why these options can't be used with uerspace.bin
build Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
fdaee08
to
da63218
Compare
I tried this and it works, the artifact runs on CanMV230 device as well:
Only one minor issue met during CMake configuration process:
|
Summary
this should resolve #12019 (comment)
the link_option of nuttx_user target should be allowed to be set freely
Impact
protected mode
Testing