I am attempting to implement event recording on an STM32L476RCT6TR microcontroller using the ARM Compiler version 5.
I followed the steps in this Arm documentation: https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/3_event_recorder/.
After including #include "EventRecorder.h" in main.c, I received this error:
#include "EventRecorder.h"
main.c
C:\Users\xxxx\Application\Middlewares\EventRecorder\Source\EventRecorder.c(32): error: #5: cannot open source input file "stdatomic.h": No such file or directory
My Runtime Environment configuration is shown below:
I searched for the stdatomic.h header file and found it in these locations:
stdatomic.h
C:\Users\xxxxx\AppData\Local\Keil_v5\ARM\ARMCLANG\include\libcxx\
C:\Users\xxxxx\AppData\Local\Keil_v5\ARM\ARMCLANG\include
C:\Users\xxxxx\AppData\Local\Keil_v5\ARM\ARMCLANG\lib\clang\19\include
However, adding these paths to my project's include directories resulted in numerous compilation errors. I suspect these are not the correct header files for my project.
I also observed that the Event Recorder package is located at:
C:\Users\xxxxx\AppData\Local\Arm\Packs\ARM\CMSIS-View\1.2.0\
and stdatomic.h is not present within that directory."
For more details, here are all the files I found on my system:
Note: I intend to perform event recording using the ST-Link debugger.
Could you please assist me in resolving this issue? I suspect a configuration error in my environment. Could you tell me where stdatomic.h is expected to be located?
I believe you are using CMSIS 6 components. These no longer support Arm Compiler 5.
CMSIS v6 is here
Hello Ronan,
thanks for your response.
You are right, after I changed the compiler version to 6, the event record works fine.
I want to know if I can run the event record over CMSIS v5?
However, based on the following information, it seems I need to perform the migration from CMSIS 5 to CMSIS 6.
I want to prevent the migration if possible; the project is complicated, and I want to prevent regression.
Therefore, based on the following note, 'CMSIS-VIEW replaces and extends functionality provided as a part of the keil::arm_compiler pack,'
is there any further information about the functionality of the event record in the arm_compiler pack?
Note: The source of the note is here: CMSIS-View: Overview
I believe Event Recorder was provided within the Compiler pack in previous versions of CMSIS.
See these older application notes, which may provide some insight, though my recommendation would be to move to CMSIS 6 if at all possible.
https://developer.arm.com/documentation/kan320/
https://developer.arm.com/documentation/kan321/
Thanks a lot for the quick response, Ronan.
Your support is appreciated. I will follow your recommendation.