Contact name: Aldo Strofaldi
Contact email: [email protected]
Company: KIEKERT
Hi team,
I am currently discussing with a customer about the function inlining inside the RTDs. Customer is using IAR compiler with 'forced' compiler options, and mentions the following:
I am using the IAR compiler with forced compiler options that by default disable the native inlining, so a declaration like this:
static inline foo (void)
will not be treated as inline by the compiler.
I already mentioned that NXP's RTDs are tested with IAR with specific compiler settings, and that compiler specific behavior should be declared inside Compiler.h; however, he says that is not a solution, and that the ASR Specification of Compiler Abstraction states otherwise:
I understand that I can replicate the compiler options used by NXP, but that it not a solution for us since we cannot change them, and also this is not what AUTOSAR states in the Specification of Compiler Abstraction: I should not be 'forced' to use specific compiler options to make inlining work, but instead through the use of the Compiler Abstraction I can tune the behavior specifying the needed attributes based on the compiler I am using.
As I stated above, from what I can see from the source code of the MCALs, there are functions that are not declared by using the compiler abstraction macros like INLINE or LOCAL_INLINE, for example:
since they don't use the INLINE or LOCAL_INLINE macros, I cannot use my Compiler.h abstractions.
I can see he is referencing C40_Ip functions. I believe that IP (non-AUTOSAR) layer is not constraint by SWS and ASR specification, is my understanding correct? Final solution should be to follow release notes' compiler options and defining their workaround for the static inline macros, correct?
Thank you in advanced. Best regards,
Julián
Hi @Luis_Garabo
It noted in our BaseNXP Userm anual:
This ASR requirement is not applicable for RTD package