-
Notifications
You must be signed in to change notification settings - Fork 3k
Fixing uvisor defines to fix build issues #3718
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
Conversation
/morph test |
/morph export-build |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputExample Prep failed! |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 111 Exporter Build failed! |
This doesn't seem like it should be required. I am suspicious of the files the Eclipse project is trying to include. If you are building without Thanks. |
@Patater the project is enabling FEATURE_UVISOR (it's using this example: https://github.com/ARMmbed/mbed-os-example-uvisor). Also, it doesn't appear that any of the folders with It does seem to be including all FEATURE_UVISOR files though. |
/morph test |
@bridadan Thanks for looking into this. Excluding |
@@ -17,6 +17,8 @@ | |||
#ifndef __UVISOR_API_UVISOR_LIB_H__ | |||
#define __UVISOR_API_UVISOR_LIB_H__ | |||
|
|||
#include "includes/uvisor-lib/uvisor-lib.h" |
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 needed, it's probably because some other file isn't including uvisor-lib/uvisor-lib.h
correctly. Can you get away with not having this? What breaks? Can you include uvisor-lib/uvisor-lib.h
from there 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.
Looks like at least cmsis/core_cmSecureAccess.h
needs to include uvisor-lib/uvisor-lib.h
instead of just uvisor-lib.h
.
Note that uvisor-lib/uvisor-lib.h
includes api/inc/uvisor-lib.h
, which is why we shouldn't include uvisor-lib/uvisor-lib.h
from api/inc/uvisor-lib.h
.
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.
I can't just remove it, otherwise I get compilation errors. The issue here is without the include, UVISOR_PRESENT
doesn't get defined, so I get redefinition errors when the compile process reaches this part of the code: https://github.com/ARMmbed/mbed-os/blob/master/features/FEATURE_UVISOR/includes/uvisor/api/inc/unsupported.h#L74
Which it definitely shouldn't be getting to since the K64F is a supported platform.
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.
It looks like doing your suggested change with cmsis/core_cmSecureAccess.h
allows it to build, though not sure if it actually runs. But I guess we can always start from here! I'll update this PR.
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.
Yeah, removing will cause compilation errors. I was curious which files were having errors.
Thanks for the fix. :)
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.
Actually when I used your cmsis/core_cmSecureAccess.h
change I was able to remove the include! Though I just tried the binary and it doesn't seem to work. I'm afraid my knowledge is limited on what files need to include what, maybe this needs to be looked at more in depth?
@@ -18,6 +18,7 @@ | |||
#define __RTX_BOX_INDEX_H__ | |||
|
|||
#include "cmsis_os.h" | |||
#include "api/inc/vmpu_exports.h" |
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 is a good change.
44e92ce
to
bca993a
Compare
Result: ABORTEDYour command has finished executing! Here's what you wrote!
OutputExample Build failed! |
/morph test |
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.
Our CI passed, so you didn't break anything with the normal build process. I'm happy with the changes here.
We can debug the exporter issues with uVisor in priority with other tasks. I motion to accept this PR and the exporter one, given that an issue is filed regarding uVisor and the exporter. Could you please file an issue?
Thanks again for the fixes.
/morph export-build |
Thanks for the quick support @AlessandroA and @Patater! |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 112 Exporter Build failed! |
I was doing some Jenkins maintenance and ended up causing a few failures in the exporter builds 😞 restarting now. /morph export-build |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 113 All exports and builds passed! |
Description
This issue was found when trying to integrate the GNU ARM Eclipse exporter PR here: #3561
There are a few files that build fine in ALL the other build systems (seriously, the mbed build system, make exporters, IAR, AND uVision all work just fine) but that cause issues in the new Eclipse exporter. This seems to be related to build order.
These changes just add explicit includes in files that were causing issues.
Status
READY
Migrations
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
NO
Related PRs
This is currently blocking #3561 from coming in.
Todos
Note to reviewers
@Patater and/or @AlessandroA Are there other files where we should add these explicit includes?