Allocating parameters to ramfuncs section
Show older comments
I need to execute parts of my code on the C2000 from RAM. I was able to generate code from my subsystem into a non‑reusable, standalone function and copy that function to RAM. I also need to copy some of the parameters used by this function into RAM so they can execute more quickly.
Paragraph 7 of the following document attempts to describe the process, but it does not provide enough detail to follow:
Could you provide guidance and a step‑by‑step explanation of how to perform this operation?
Answers (1)
Adarsh
on 10 Apr 2026 at 10:29
Here is a brief explanation of point 7 in the given documentation link.
1) Firstly, execute the following command to create a Simulink parameter to the ramfuncs section
demoParam = tic2000demospkg.Parameter
2) Now in the MATLAB's workspace panel you can see the variable named "demoParam"
3) Click on the "demoParam" variable in the MATLAB's workspace panel
4) Open the code generation tab as mentioned in the image below and select "const_data_ramfuncs" this will allow this will indicate the model to store the parameters in ROM and load them into RAM during execution

5) Once you click "OK", you can replace the previous parameters in the blocks of simulink model with the new parameter that you have created.
This is the brief gist of what the point 7 in the given documenatation states.
I hope this helps!
1 Comment
Valeriy
on 13 Apr 2026 at 18:15
Categories
Find more on Timing and presenting 2D and 3D stimuli in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!