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!