Possible Ways to Modifying "Prefix" of Memory Map Header on generated AUTOSAR Code

3 views (last 30 days)
Hello,
We are working on generating C code on AUTOSAR Enviorment. Basically we will replace some already in place functions with the Code we will produce with Simulink.
We succesfully create a C code with Autosar Component Designer App,
When we inspect the code we see the generated code have
#define TRMA_STOP_SEC_CODE
#include "TRMA_MemMap.h"
Which is actually according to standart. "TRMA" is the name of component
The issue is the platform we will integrate is using different naming convention.
#define QM_CORE0_STOP_SEC_CODE
#include "QM_MemMap.h"
Currently I can handle this via post build hook and kind of change it manually,
But I do not think it's proper way to do it because I feel like I'm touching integriy of code generation process
I'm looking a more embedded way to handle this while generating code for Autosar Component
Some notes:
I inspect the AUTOSAR - Specification of Memory Mapping document
As far as I see
And
And when I checked the ARXML file I have, I seen that this two parameter is already defined for the software component I'm working on,
So I'm thinking regarding if somehow if I can enter the PREFIX defined above then I can solve my issue,
With furher investigarion I checked the "cscdesigner" to check AUTOSAR package,
I see some definitions in the AUTOSAR 4.0 Package, I tried to replace it via custom storage class but unable to do so
Thanks for any advice

Answers (1)

Akshat Dalal
Akshat Dalal on 16 Aug 2024
Hi Onur,
The pre and post statements you see are not because of the memory section defined in the CSCDesigner app but to be compliant with AUTOSAR standards. I don't think it would be possible to avoid this via code-generation settings. Using post-build hooks is quite common and is well documented and should not be a issue: www.mathworks.com/help/releases/R2022b/rtw/ug/customizing-post-code-generation-build-processing.html

Categories

Find more on AUTOSAR Blockset in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!