This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error when adding MCU specific .h file

Hi there!

I'm doing a bare metal project using Renesas EK-RA2A1 eval kit, but I'm using the arm cortex m23 project base on keil v5 due to avoid the BSP and FSP of Renesas. When adding the R7FA2A1AB header file to the project and including in the main it gives me several errors like the following one 

./RTE/Device/ARMCM23/R7FA2A1AB.h(48): error: unknown type name '__I'
__IM uint16_t RESERVED;

all the errors are related to the ones defines bellow: 

#ifndef __IM /*!< Fallback for older CMSIS versions */
#define __IM __I
#endif
#ifndef __OM /*!< Fallback for older CMSIS versions */
#define __OM __O
#endif
#ifndef __IOM /*!< Fallback for older CMSIS versions */
#define __IOM __IO
#endif

It also gives me an error on system_ARMCM23.h, only when adding the R7FA2A1AB.h file: 

C:/Keil_v5/ARM/Packs/ARM/CMSIS/5.9.0/Device/ARM/ARMCM23/Include\system_ARMCM23.h(41): error: unknown type name 'uint32_t'
extern uint32_t SystemCoreClock;

  • Hello aitor_azkolain! Seems like you are mixing something up with include files and/or the order of including them. However, what exactly this is is hardly possible to comment without knowing what exactly you do. So, if possible, share an example project that replicates your issue so others can have a look.

    And why are you not selecting the correct device for your project. As long as you do not select something in RTE Management dialog, it should remain a without Renesas files.

    And if you took the R7FA2A1AB.h from the Renesas files, it may still anyhow have dependencies on the  BSP and/or FSP.