-
Notifications
You must be signed in to change notification settings - Fork 70
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
Core(A): align compiler header files to core(M) implementation #128
Core(A): align compiler header files to core(M) implementation #128
Conversation
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.
Omit an immediate offset of 0
.
In my opinion it is better to omit an immediate offset of 0
for unprivileged STR instructions.
The offset is also not used for GCC nor for unprivileged LDR instructions.
The Core Checks failed. Changing Mapping to ACLE intrinsics in Cortex-A requires additional include of
|
Hello, I am currently struggling to run the automatic validation test locally. In the file CMSIS\Core\Test\lit.cfg.py the environment variables
are required. Unfortunately, I don't know what value these should be defined with? Is it the full path to the corresponding development environment? |
Hello @Masmiseim36,
|
Hi @Masmiseim36, Appreciated, this detail is not given in the README.md for manual installation of the tools. Once you are using As @GuentherMartin already mentioned, these shall point to the |
Hello @JonatanAntoni and @GuentherMartin I had used vcpkg as described in the readme, but in my case it raises an error after install. Maybe this is the part where the environment variable should have been registerd:
When using Linux I get the following error message:
Which Version of vpkg are you using? I used 2024-02-07-8a83681f921b10d86ae626fd833c253f4f8c355b However, I got the test-run working on latest CMSIS6-main branch for GCC and CLANG. AC6 is only working for M0(+) Core all, other runs fail with exit code 1. When executing the test manually I get
As said, Cortex-M0(+) tests are working with AC6 the others seem to create 'UNSUPPORTED: CMSIS-Core' messages. GCC and CLANG are okay with any architecture. Any Idea? Best Regards |
This seems to be an issue of vcpkg usage on command line is unclear, probably due to lack of documentation. How did you install vcpkg? The "problem" here is how to use vcpkg on command line for getting the development environment configured. The way it works (see the workflow files as reference) is documented at https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/installation.md#vcpkg---setup-using-cli (originally from https://github.com/microsoft/vcpkg-tool/blob/main/README.md). I.e., one need to source the Further issues we have with vcpkg is its limited range of supported environments. It currently doesn't work on aarch64 linux. And on Windows it works on Command or Powershell but not from an MSYS Bash. And, it seems like running vcpkg in a virtual machine (I tested on a Mac using Parallels) there are issues with downloading files.
This doesn't look too bad. At least you got something running. Try to run single tests with more verbose output to see what's actually going wrong:
|
Hello @Masmiseim36,
Testing Time: 8.47s |
Hello @GuentherMartin, I am currently using the unmodified main version of the repository. I need a reference before I look at what problems my changes are causing. The problem seems to be somewhere in the test framework. In all likelihood, I am doing something wrong. The only question is what. Best Regards |
Hello @JonatanAntoni
I have installed it as described in https://github.com/microsoft/vcpkg
Got it, I need a license for AC6 :-(
|
The whole thing is a bit strange. Clang generates a compiler error if the offset is omitted on an ARMv7-A architecture. With ARMv7-M, on the other hand, an error is generated if it is present. In both cases, the offset is optional according to the specification. This looks like a bug in Clang to me. |
It is strange.
But if it is used then AC6, CLang and GCC throw an error. |
I would argue that the correct syntax is:
Currently this gets expanded to
Not sure what needs to change in the |
Yes, this is the installation for "vcpkg packages" but we are using "vcpkg artifacts". I appreciate, this is not easy to understand for first time users.
Ah, okay. In this case, I think it's fine to use the Arm MDK6 Community license. Try this:
Regarding the assembly syntax, there might be some slight difference between ARM and THUMB instruction sets in how the encoding needs to look like. Let me check and I'll report back later. But, I think this confirms why having these kind of tests is a good thing. |
THUMB and ARM encodings are indeed different, check In THUMB it is
And in ARM it is
It looks like GCC is tolerant to different formats but Clang is more strict. |
Interesting. However, STRHT and STRBT appear to be defined identically. THUMB:
ARM
|
We need to be very careful about the encoding used. On Cortex-M we only have Thumb instruction set while on Cortex-A you can use Thumb or Arm instruction set. The Arm instruction encoding differs from the Thumb one. Now, I do not understand why you want to add the implicit immediate value |
31e13ab
to
3c18518
Compare
In the pull request, I try to bring the different compiler and architecture abstractions closer together. In my local tests, the version with an additional offset worked with Clang and GCC. I cannot currently explain why my test behaved differently to the official test suite. I have reversed the change as I have no other solution in the short term. |
I think we are aligned here, please take this on.
Yes, this should work, of course. Functional wise there should be no difference between omitting the Hence, I'd expect the binary value in the object file to be identical for both cases. That makes me wondering how the disassembler could ever create different disassembly output.
Let me do some other experiments on my side.
Okay, then perhaps we can address the refactorings in smaller steps. |
Both versions (Cortex-M and Cortex-A) are better comparable now.
Compare also ARM-software/CMSIS_5#1587