-
Notifications
You must be signed in to change notification settings - Fork 3k
ARMC5+6: Specify CPU for ARM scatter file preprocessor #5797
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
/cc @maclobdell |
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 good. Thanks!
Looks like this is related to issue #5421 as well, but this solution is giving some problems with the k64f target saying ARM Compiler does not support '-mcpu=cortex-m4f' just for the arm 6 compiler. Maybe some additional string massaging needed here? |
@hosse005 Can you please sign https://os.mbed.com/contributor_agreement/ |
@0xc0170 Yes, I just accepted |
/morph build |
Build : FAILUREBuild number : 826 |
Build failed for one target, RZ_A1H, with the error |
My license doesn't allow me to compile for an A9, so my help maybe limited here. Are we sure this ci job doesn't fail without these changes? Maybe the "mem_RZ_A1H.h" file isn't being copied into the build directory along with the MBRZA1H.sct file? |
I could reproduce it. The same linker failure. Master is OK, it's only this branch.
This is the top of the link_script.sct
The only change when I compare those 2 is --cpu flag that is being added here. In the build dir, the header file is there. Could this cpu flag affect include dirs? I checked include dirs that are in the build file, the path is there for that header (in the include paths). Also in the build dir, it is present. Why this cpu flag is added to the linker script file and not into .profile-asm ? (the cpu flag for C is in the .profile-c file). Does not help thought with this, fails anyway the same way. |
* Need to copy headers into the build directory as well when also writing an updated linker scatter file to the build directory
I was able to get a hold of an eval license so I could reproduce the issue. I don't think headers were getting copied over from the script source directory when we needed to update the scatter file shebang. I made some change which should address this issue. @0xc0170 , I added the cpu arg to the scatter file shebang because this is where I was seeing compile errors coming from, and it seemed to be needed at least for ARMC6 according to the ARM compiler v5 -> v6 migration app note (http://www.keil.com/appnotes/files/apnt_298.pdf) |
👍 for the reference
I was checking locally and to me the header files were there? I still have the build locally, |
Hmm.., @0xc0170 can you try to replicate my test setup? I am just building the mbed-os-example-blinky app with the ARM compiler targeting the RZ_A1H with the mbed-os changes in this PR. Without the last commit I see the same failures observed from the ci job logs, and with the last change it is resolved. |
I tested this fix with blinky , and also mutex test, both compiles on my machine. |
/morph build |
Build : SUCCESSBuild number : 848 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 517 |
Exporter Build : FAILUREBuild number : 606 |
I think abspath maybe needed here for the build machine as follows: @theotherjimmy , do you agree? |
@hosse005 I do not. When you export a project from the online compile, an absolute path will always be incorrect. We will have to make the path relative to the project file location, so |
@theotherjimmy , I think just |
@hosse005 I don't think that |
I think the "right solution" will have to be |
@theotherjimmy , I may need some help with this one then, not sure how to do this. |
@hosse005 I think that'll do everything I need it to; offline, online export and online compile. Sorry that took so long. |
/morph build |
Build : SUCCESSBuild number : 1038 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 718 |
Exporters fail as we saw earlier for Cortex A targets, please review restarting uvisor /morph uvisor-test |
/morph uvisor-test |
Dunno why results aren't being shown. Rebuilding. /morph build |
Build : SUCCESSBuild number : 1056 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 735 |
Fixes #5796
Description
Fix for targets which include the c preprocessor in the ARM and ARMC6 scatter file.
Status
READY
Migrations
NO
Steps to test or reproduce
(e.g. mbed compile -t ARMC6 -m xdot_l151cc)