Invalid memory section 'code_ramfuncs

조회 수: 18 (최근 30일)
朴子生
朴子生 2025년 6월 18일
답변: TED MOSBY 2025년 6월 19일
I want to use the code generation feature, but I'm getting an errors:Invalid memory section 'code_ramfuncs' specified in the Subsystem Parameters dialog of block 'FOC_SI_PMSM_Init_Position/FOC Alogorithm/Current Control'. No memory section package selected in the Configuration Parameters dialog.How can I fix this?
  댓글 수: 2
TED MOSBY
TED MOSBY 2025년 6월 18일
편집: TED MOSBY 2025년 6월 18일
@朴子生 could you share your model so that I can reproduce the issue at my end, thanks!
朴子生
朴子生 2025년 6월 19일
@TED MOSBY,this is my model.

댓글을 달려면 로그인하십시오.

답변 (1개)

TED MOSBY
TED MOSBY 2025년 6월 19일
The memory section "code_ramfuncs" or "ramfuncs" or const_data_ramfuncs" comes from the TI C2000 custom-storage-class package tic2000demospkg that ships with the TI C2000 Support Package.
As I checked the Subsystem Parameters dialog of block 'FOC_SI_PMSM_Init_Position/FOC Alogorithm/Current Control', I found the "Memory section" settings set to "Default" :
This means it is not mapped to "code_ramfuncs". There can be two workarounds to solve this:
1. You can change it to "Inherit from model" , this will make the code run from flash not RAM. If this doesn't work then you can try the second method.
2. Go to your subsystem "FOC Alogorithm" and navigate here as shown below:
In the "Embedded Coder Dictionary", go to "Memory Sections" and click on "Manage Packages" and select tic2000demospkg and click on "load". You will see "code_ramfuncs" appear now in the list, you can click on save as shown:
Now if you go back to block parameters of 'FOC_SI_PMSM_Init_Position/FOC Alogorithm/Current Control', you can see the "code_ramfuncs" option in the drop-down as shown:
You can select this option for both the memory sections. This should now work as the mapping is correct.
Here are some references:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by