-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix build tool with ARMC6/ARMv8M #6644
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
1. Add linking time preprocessor macro __DOMAIN_NS for non-secure build 2. For output .hex format, combine multiple .hex files (for multiple load regions) into one This can help for Greentea test. 3. Fix 'None' build_dir with cmse_lib.o on Greentea test
tools/toolchains/arm.py
Outdated
@@ -233,6 +233,11 @@ def link(self, output, objects, libraries, lib_dirs, scatter_file): | |||
cmd_pre = self.ld + args | |||
cmd = self.hook.get_cmdline_linker(cmd_pre) | |||
|
|||
# Create Secure library | |||
if self.target.core == "Cortex-M23" or self.target.core == "Cortex-M33": |
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.
Moving this here breaks exporters: The exporters have to know to append these options somehow, and this location prevents them from being able to.
@@ -252,7 +257,8 @@ def archive(self, objects, lib_path): | |||
@hook_tool | |||
def binary(self, resources, elf, bin): | |||
_, fmt = splitext(bin) | |||
bin_arg = {".bin": "--bin", ".hex": "--i32"}[fmt] | |||
# On .hex format, combine multiple .hex files (for multiple load regions) into one | |||
bin_arg = {".bin": "--bin", ".hex": "--i32combined"}[fmt] |
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.
Good catch. This was always the indented behavior. I guess nobody combined multiple load regions with hex output before.
@ccli8 I'm familiar with the interaction between the toolchains and the exporters and the toolchains and the test builder. Let me know if you would like me to correct the "no build dir" bug. |
@theotherjimmy Yes. Please correct the "no build dir" bug and I can check Grrentea flow on NUMAKER_PFM_M2351 with the corrected version. NUMAKER_PFM_M2351 is Cortex-M23 based and its port is on-going. |
4d1e335
to
5e83ae9
Compare
fef7297
to
bc8b983
Compare
@ccli8 I changed the implementation on your branch. Good news: it reduced the diff by quite a bit. |
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 to me 👍
@theotherjimmy With your update, I run Greentea test on NUMAKER_PFM_M2351 with ARMC6 and it works. |
/morph build |
Build : SUCCESSBuild number : 1784 Triggering tests/morph test |
/morph uvisor-test |
Test : FAILUREBuild number : 1594 |
Exporter Build : SUCCESSBuild number : 1429 |
/morph test |
Test : FAILUREBuild number : 1602 |
@kegilbert @theotherjimmy Can you review the logs from the test failures? I could find |
Did some link hopping, and noticed a couple of things:
MBED_TEST_BLOCKDEVICE_DECL should not have a space... |
@theotherjimmy I find something wrong with the commit bc8b983. Test items are not listed with the command:
If I roll back, it is OK. |
Scan resources ignores the build dir so we can't set it to something dumb like the directory we want to scan
Crap. I forgot that the resource scan ignores the assigned build directory. Sorry about that. Fixing now. |
da69f01
/morph build |
Build : SUCCESSBuild number : 1844 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1490 |
Test : SUCCESSBuild number : 1653 |
@theotherjimmy The issue gets fixed with your update da69f01.
|
Description
This PR tries to fix build tool issues with ARMC6/ARMv8M:
None
build_dir
error withcmse_lib.o
on Greentea test.None
build_dir
is passed toARMC6
>__init__
and causes error from:mbed-os
/tools
/test_api.py
: I movecmse_lib.o
fromARMC6
>__init__
toARM
>link
.Pull request type
[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change