MemMap.h file does not contain content for Calprm and Var memory segments that were present in .c source code file
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello,
I am using Matlab R2023b. I have created a Simulink model and generated AUTOSAR compliant C code. In my Simulink model, I created SwAddrMethods named CAL, CODE and VAR. The CAL method is for Calprm memory section, CODE is for Code memory section and VAR is for Var memory section.
In my generated .c source code and .h header files, I see the #defines for each SwAddrMethod. Some excerpts from my .c code below:
.
.
/* Please see snapshots for source code and MemMap header file for reference. */
.
.
Same case is true for the .h header file. I can see instances of #defines for all 3 SwAddrMethods.
But, in the generated MemMap.h header file, I can only see reference to #ifdef PwrSteerOutPrcs_START_SEC_CODE
#undef PwrSteerOutPrcs_START_SEC_CODE and #ifdef PwrSteerOutPrcs_STOP_SEC_CODE
#undef PwrSteerOutPrcs_STOP_SEC_CODE.
I do not notice the START_SEC_CAL, STOP_SEC_CAL and START_SEC_VAR, STOP_SEC_VAR are being generated.
.
.
/* Please see snapshots for source code and MemMap header file for reference. */
.
.
Q1. What can cause the #defines for CAL and VAR to not be defined in MemMap.h? Is this soem setting I can correct in Autosar Component Viewer app / Simulink Model Settings? Or is it a bug in Matlab R2023b release?
Attached are snapshot #1 of the 1 instrumented signal. Am I using the correct settings? I have noticed in some models that instead of 'From signal object: Global' , there is an 'Auto' option in the dropdown for 'Mapped to' (attached in snapshot #2). I do not get that option for 'Auto'.
Q2. Is there a setting I should change on my Model Settings / Autosar App to get the Auto dropdown option? Will that help resolve Q1? Or is this a bug in matlab R2023b. Please advise.
Any help is much appreciated! Thank you!
댓글 수: 4
Ashutosh Thakur
2024년 7월 23일
Hi Uday,
It seems like model does not has all the data which I could see in one of the screenshot, can you attach a MAT file containing all data regarding signals and other data elements in the model ?
Thanks
Ashutosh Thakur
2024년 7월 24일
Hi Uday,
It is difficult to comment on why this is happening as the data regarding signals and types are missing from the model. However, you can try using this documentation link to implement SwAddrMethods. You can find the link below: https://www.mathworks.com/help/autosar/ug/configure-autosar-data-for-measurement-and-calibration.html#bubhd7l-1.
I also recommend using the model present in the example and build upon it to see you have that desired behavior or not.
I hope this helps you!
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 AUTOSAR Blockset에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!