Hi, the C++ part of our project generates a lot of warnings like these for the inline functions in core_cm33.h. I have the following GNU Arm Embedded Toolchains installed. I don't know if it is a problem that there are two installed:10.3-2021-0710.3-2021.10
The functions that generate the warning are:__NVIC_EnableIRQ, __NVIC_GetEnableIRQ, __NVIC_DisableIRQ, __NVIC_GetPendingIRQ, __NVIC_SetPendingIRQ, __NVIC_ClearPendingIRQ, __NVIC_GetActive
Why is this and how can we resolve it? It creates so much "noise" that one misses the important warnings.
Building file: ../External/Src/Project/System/ThreadX/Event.cpp In file included from <<user>>/iDM_APEX/ra/fsp/src/rm_threadx_port/tx_cmsis.h:55, from <<user>>/iDM_APEX/ra/fsp/src/rm_threadx_port/tx_port_vendor.h:6, from <<user>>/iDM_APEX/ra/fsp/src/rm_threadx_port/tx_port.h:46, from <<user>>/iDM_APEX/ra/microsoft/azure-rtos/threadx/common/inc/tx_api.h:109, from <<user>>/iDM_APEX/External/Src/Project/System/ThreadX/Private/Thread_Private.h:13, from <<user>>/iDM_APEX/External/Src/Project/System/ThreadX/Thread.h:12, from <<user>>/iDM_APEX/External/Src/Project/System/ThreadX/Event.h:13, from ../External/Src/Project/System/ThreadX/Event.cpp:9: <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_EnableIRQ(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2383:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2383 | NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); | ^~~~~~ <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'uint32_t __NVIC_GetEnableIRQ(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2401:93: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2401 | return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); | ^~~~~~ <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_DisableIRQ(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2420:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2420 | NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); | ^~~~~~ <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'uint32_t __NVIC_GetPendingIRQ(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2439:93: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2439 | return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); | ^~~~~~ <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_SetPendingIRQ(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2458:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2458 | NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); | ^~~~~~ <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_ClearPendingIRQ(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2473:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2473 | NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); | ^~~~~~ <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'uint32_t __NVIC_GetActive(IRQn_Type)': <<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2490:93: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion] 2490 | return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); |
JohannYellow,
Apologies for the delayed response. Here's what I received from the AE Team:
The warnings are generated in an ARM CMSIS Core file, core_cm33.h. When the FSP team integrate 3rd party…
Hi Jeremy, thanks for the suggestion.
Hi JohannYellow, can you kindly try Jeremey's suggestion? Please let us know if that is working.
Best regards,
PM_Renesas
Hi JohannYellow,
How are things going? Were you able to figure out what causes these warnings? Maybe there's a part in your project that causes warnings with the core_cm33.h functions.
JBIf this response, or one provided by another user, answers your question, please verify the answer. Thank you!Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
Hi JB, no I was waiting see what I hear back. If you compare the 2 attached files then you'll see what I had to do to make the warnings disappear. These warnings appear everywhere the file is included from the C++ code and not just in some files.
So I looked through the C++ project settings (which I can send to you) but couldn't find a difference that could cause this. So I cannot see how my C++ code can cause this.
regards
Hi, can you please reply to this question since I've shown that this problem (warnings) is caused by the supplied cmsis header file and not my code?
Apologies for the delayed response. Unfortunately, this is outside of my field of expertise so I'm escalating this issue to second level support. I will reply here again once I receive a response from the AE team. May I know what device are you using?
Hi JB. It is a R7FA6E10.
Hi JB, is there no reply yet from 2nd level support (after 7 days)?
Hello JohannYellow. Unfortunately, JB is unavailable at the moment to answer this. But he'll be back in a few days and will let you know the update from the support team. Thank you for your patience and apologies for the delay in this matter.Update: As mentioned by PM_Renesas, the ticket has been taken internally so the team will get back to you soon.-JayeshIf this response, or one provided by another user, answers your question, please verify the answer. Thank you!Renesas Engineering Community Moderatorshttps://community.renesas.com/https://academy.renesas.com/en-support.renesas.com/.../
First of all, I'd like to express our apologies for the delays. We have taken this ticket internally and currently working on that - will try to revert back to you ASAP.
Hello Johann Yellow,
We are working on your issue! I see that you've attached two files one file core_cm33 hacked.h and another one core_cm33 original.h. Could you please explain me which file is modified by you and which file is auto-generated in FSP? Did you modify core_cm33.h in your project?
Kind Regards,
IK_Renesas