Run Core tests and CoreValidation with IAR toolchain
@RobinKastberg, I enhanced CI tests with IAR toolchain. Could you please cross check at least the modification to IAR compiler header?
Looks like many test cases do not pass with IAR compiler. Could you have a look as well? We might need to enhance the test expectations as IAR compiler generates another assembly variant.
Test Results
0 files - 372 0 suites - 372 0s ⏱️ - 8m 57s 0 tests - 49 0 ✅ - 44 0 💤 - 5 0 ❌ ±0 0 runs - 18 228 0 ✅ - 11 964 0 💤 - 6 264 0 ❌ ±0
Results for commit 7c51acdf. ± Comparison against base commit 48a9a892.
:recycle: This comment has been updated with latest results.
@RobinKastberg, I enhanced CI tests with IAR toolchain. Could you please cross check at least the modification to IAR compiler header?
Great work!
Looks like many test cases do not pass with IAR compiler. Could you have a look as well? We might need to enhance the test expectations as IAR compiler generates another assembly variant.
I will take a look, but I am quite busy with other things currently. I did go through this locally some time ago finding/fixing some critical bugs in the process. I think the remaining bugs where not major (i.e. mainly related to how the tests are setup). Of course my memory is quite fuzzy now and things might have changed.
@RobinKastberg, I am now about to run CoreValidation tests. But I am seeing a weird issue on GitHub. Despite having set IAR_LMS_BEARER_TOKEN I am getting errors running IAR Toolchain commands:
> iccarm --version
Fatal error[LMSC4050]: product field missing in checkout request
IAR ANSI C/C++ Compiler V9.60.4.438/LNX for ARM
Copyright 1999-2025 IAR Systems AB.
Fatal error detected, aborting.
This is surprising, because in within the Core test job the toolchain has no issues. Can you help us figuring out what is going wrong?
@JonatanAntoni where did you get toolchain from? ARM artifactory?
where did you get toolchain from? ARM artifactory?
Yes, its installed to the build machine via vcpkg-shell activate.
I.e., its extracted to /home/runner/work/CMSIS_6/CMSIS_6/.vcpkg/downloads/artifacts/2139c4c6/compilers.iar.cxarm/9.60.4/, see https://github.com/ARM-software/CMSIS_6/pull/229/checks#step:8:147.
To be exact, its downloaded from https://github.com/iarsystems/arm/releases/download/9.60.4/cxarm-9.60.4-linux-x86_64-base.tar.bz2 by the vcpkg manifest distributed via Arm Artifactory.
It is working for the Core test job, without issues. In there, the compiler is launched directly via lit. But when used via cbuild/cmake in CoreValidation it is failing. I can reproduce the problem in an interactive Codespace session. On my local machine I do not see this issue. But there I have a hack anyway, because I am on a Mac and due to the lack of a Mac distribution I don't receive the asset via vcpkg. Instead, I built a Docker wrapper around the toolchain bundle.
@JonatanAntoni Issue is currently being looked into. We don't know details yet.
Can you try rerunning the job a few times. Does it happen every time?
Can you try rerunning the job a few times. Does it happen every time?
Yes, the behaviour is reproducible each time.
@RobinKastberg, now the toolchain seems to run correctly. We need to focus on fixing the tests, now. Can you help with that?
@RobinKastberg, now the toolchain seems to run correctly. We need to focus on fixing the tests, now. Can you help with that?
Nice! I will get started on it next week!
@JonatanAntoni Hi!
I took a look at build errors for CoreValidation to start with, couldn't get FVP running this time due to licensing issues (I mailed you regarding this)
- NS builds fail because
bootloader.cwrites to MSP_NS. Root cause seems to be that this should be compiled with --cmse. - It looks like a bunch of Cortex-A fails due to having d16 FPUs AND NEON, so the FPU code expects >16 registers since there is NEON but there is only 16 due to the FPU type mentioned. This seems to be a build system inconsistency, maybe we should set .no_neon in devtools cmake? Looks like the other compilers does this for some reason?
- Cortex-A9 startup doesn't support IAR: https://github.com/ARM-software/CMSIS_6/blob/b2c51f0c9ba6a12c17a204083e431cc2123a0f3f/CMSIS/CoreValidation/Layer/Target/CA9/RTE/Device/ARMCA9/startup_ARMCA9.c#L123 I see both of these issues as mostly artifacts of the testing, and not real issues.
I will take a look at the lit tests next.
Thanks for spotting such issues. Yes, I'd expect most of the issues to be some toolchain integration issues, such as wrong/misaligned compiler flags. We need to sort them out gradually.
Do not forget to update the README.md file with instructions on how to build with IAR. Currently, it is missing.
This looks good, however I am currently busy with other things, so my hunting down the last lit tests will take a while. Can this still be merged?
This looks good, however I am currently busy with other things, so my hunting down the last lit tests will take a while. Can this still be merged?
I am a bit hesitant about merging changes that cause test failures.