Autosar Memory section defines in generated c code

42 次查看(过去 30 天)
Hi I would like to generate memory section mapping #defines similar to ones in Autosar C code. I'm using Simulink for Model creation and Autosar Tool box code generator for generating code. How can i get #defines for Memmap as shown below in generated code.
#define CddSample_START_SEC_CODE
#include "CddSample_MemMap.h"
FUNC(void, CddSample_CODE) CddSample_alive_100ms (void)
{
}
#define CddSample_STOP_SEC_CODE
#include "CddSample_MemMap.h"
  2 个评论
Jeevan Kumar Guntammagari
I found the answer, In code generation settings, Under Memory Sections select the package. Also you can define your own storage class or select existing ones.
Also need to make the Function CddSample_alive_100ms in simulink as Non-Reuseable or Reuseable in Block properties.
Liang Zong
Liang Zong 2022-3-8
hi,
which matlab version are you using? i can not find "memory Sections" in 2021a.

请先登录,再进行评论。

回答(1 个)

Jeevan Kumar Guntammagari
I found the answer, In code generation settings, Under Memory Sections select the package. Also you can define your own storage class or select existing ones.
Also need to make the Function CddSample_alive_100ms in simulink as Non-Reuseable or Reuseable in Block properties.

类别

Help CenterFile Exchange 中查找有关 AUTOSAR Blockset 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by