In our Simulink model mapped to AUTOSAR I could mapped each Function to the specific swAddrMethod and I get the code I expected:
/* SwAddrMethod QM_PERIODICAL_CODE for Runnable */
#define MySWComponent_START_SEC_QM_PERIODICAL_CODE
#include "MySWComponent_MemMap.h"
void MyFunc(void)
{
/*****/
}
#define MySWComponent_STOP_SEC_QM_PERIODICAL_CODE
#include "MySWComponent_MemMap.h"
I also create a swAddrMethod = QM_VAR_INIT (sectionType = var)
but how can I map the global variable automatically created after code generation in a specific memory section?
For example after code generation I found the following global struct
/* PublicStructure Variables for Internal Data */
ARID_DEF_CtApOutputSignal_T CtApOutputSignal_ARID_DEF;
and I would like to get something like:
/* SwAddrMethod QM_RTE_VAR_INIT for Internal Data */
#define MySWComponent_START_SEC_QM_VAR_INIT
#include "MySWComponent_MemMap.h"
ARID_DEF_CtApOutputSignal_T CtApOutputSignal_ARID_DEF;
#define MySWComponent_STOP_SEC_QM_VAR_INIT
#include "MySWComponent_MemMap.h"