I know that RTE_Components.h is automatically generated during the Build Process step (see https://developer.arm.com/documentation/101407/0537/Creating-Applications/Software-Components/Components-in-Project).
As an example, for STM32H7 MCU it contains the lines
/* * Define the Device Header File: */#define CMSIS_device_header "stm32h7xx.h"
that are useful because they allow the usage of
#include "RTE_Components.h"#include CMSIS_device_header
in the user code.
I suggest to add another define, similar to this one
#define CMSIS_device_HAL_header "stm32h7xx_hal.h"
so that the user can do
#include CMSIS_device_HAL_header
so that it's very flexible changing the MCU.
What do you think about the suggestion?
Thanks for this suggestion, which I have forwarded to Keil Engineering for further evaluation.
I will keep you updated.
Keil Engineering confirms that the content of RTE_Components.h is taken from "RTE_Components_h" -elements of the .pdsc files for selected components.
As a consequence, you have to forward your proposal to the corresponding pack creators, in this case, ST Microelectronics:
Support Home - STMicroelectronics
I see that the items RTE_DEVICE_xxxxx inside RTE_Components.h are taken from the .pdsc file for selected component.
But the item
#define CMSIS_device_header "stm32h7xx.h"
doesn't come from the .pdsc
It can be that it's generated starting from the .pdsc file, but it's not taken from it.
And so my original suggestion is valid, I think.
Can you clarify more in detail, please?
Yes, the tool includes also the
#define CMSIS_device_header "deviceHeader.h"
string into RTE_Components.h
However, the device header is known for every CMSIS device.
In contrast, we cannot generate CMSIS_device_HAL_header macro since it is device specific.
The CMSIS standard does not require that header for a device