Quantcast
Channel: Active questions tagged autosar - Stack Overflow
Viewing all articles
Browse latest Browse all 101

In AUTOSAR project, should a software function follow "Compiler Abstraction"?

$
0
0

I'm working in the field of Automotive. When I implement several software function belonging to a specific Application SWC, I normally follow "Compiler Abstraction" standard by AUTOSAR. But, when I participated in another project based on AUTOSAR platform, they didn't follow "Compiler Abstraction" standard, when implementing application software functions. So, my question is that what is the criteria of using "Compiler Abstraction" in "Application SWC"?? For example, the EX1 code snippet below shows one example of that standard. It is same as EX2. It is just the difference of using MACRO or not. From my understanding, BSW software functions should follow "Compiler Abstraction", but I don't know the application software functions should follow this standard. From my point of view, when using the compiler abstraction, the one of the advantages is abstraction and code portability, when changing Micom. But in terms of microprocessor performance, I'm not sure. So my questions are as follow.

  1. Should software functions belonging to Application SWC except each Application SWC runnable follow this rule? I mean, mandatory?
  2. If so, what is criteria of using this compiler abstraction?
  3. If so, what is the pros of using this compiler abstraction in Application SWC (software functions)?
  4. If the purpose of Compiler Abstraction is to deploy code snippet in to a specific section and memory region (like Fast RAM), what is the difference from doing in with Compiler and a specific tool that can do it?

EX1)

STATIC FUNC(void, APP_SWC1_CODE) APP_SWF (CONST(uint8, AUTOMATIC) u8flag, P2VAR(uint8, AUTOMATIC, APP_SWC1_VAR) ptr){    VAR(uint16, AUTOMATIC) u16count = 0u;}

EX2)

static void APP_SWF (const uint8 u8flag, uint8* ptr){    uint16 u16count = 0u;}

The criteria of using Compiler Abstraction in Application SWC not BSW component.


Viewing all articles
Browse latest Browse all 101

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>