Problems adding Event Recorder for Renesas project on Keil

I'm trying to integrate Event Recorder in order to see events and tasks' behavior during debugging. The target will be a R7FA6T2BB3CFP#AA0 from Renesas. I managed to integrate RTX5 to the Keil project and to compile, but when I try to integrate Event Recorder and then try to compile, I got a bunch of errors related to a missing definition (CMSIS_device_header) in the EventRecorder.c module (see image below).

So the question is where do I can find this definition and why it is not defined by Keil?

I found a partial solution that is adding a custom patch file and define it as "CMSIS_device_header" in the RTE_Components.h file (see image below)  

The problem is that I have to do this step every time I open the project which is annoying.

Please advice.

  • This "CMSIS_device_header" is usually defined in your RTE_Components.h file. And this header file is auto generated by uVision. And as written in the comment section in your screenshot, "Do not modify!". In other words, you should not modify it manually. Instead, you need to check if you configure your RTE in the Manage Run-Time Environment dialog in µVision properly. 

    e.g. in your screenshot, I saw you are using CMSIS RTOS2 lib and config files. But very weird that you have cmsis_os1.c used in your project. Please note that only RTOS2 supports Event Recorder

    You can take an existing example project e.g. "CMSIS-RTOS Blinky (MCBSTM32F400)" from Pack Installer of µVision as a reference to see how to configure RTOS2 and Event Recorder properly.

  • Hi Chen,

    Thanks for your answer. Removing RTOS (API) and leaving only RTOS2 didn't fix the problem. I followed this tutorial and realized that to be able to use Event Recorder, I have to add the RTOS2 as code and no library. However if I do that and then I try to compile, I got 260 errors regarding to RTOS2 files which is frustrating...Here are the steps I follow for creating a RTX5 project for Renesas and that lead to the described issue at the beginning of this post:

    1. I configure the MCU pins using the Renesas RA Smart Configurator tool and then I generate the code for a Keil project.


    2. I open the generated project in Keil and integrate the library of RTX5 and Event Recorder. Notice that when Event Recorder is added, the RTE_Components.h file that is included in the EventRecorder.c file doesn't have any CMSIS_device_header define as in the example project you mentioned ("CMSIS-RTOS Blinky (MCBSTM32F400)")

    3. I check the Short enums/wchar box on the C/C++ tab under Options for Target... window for avoiding link errors.

    4. I reduce the Global Dynamic Memory.

    What step am I missing? I already got to integrate RTX5 in STM32 and nRF52 projects in the past but with Renesas, it's seems to be more complicated...