How to keep user code remained after rebuiding model/regenerating code?
조회 수: 1(최근 30일)
표시 이전 댓글
Xiaojie Qiu 2017년 11월 20일
댓글: Xiaojie Qiu 2017년 11월 21일
I'm using Simulink to automatically generate code. After code generation, my user code will be added into a source file (for example main.c). But once the Simulink model has been rebuilt, all the user code is deleted, so that I have to write it every time.
I wonder if there is a way to keep user code remained after rebuiding the model/regenerating code?
Thanks a lot!
댓글 수: 1
Birdman 2017년 11월 21일
Go to Configuration Parameters->Simulation Target and there you will see two sections. Try to include your user code to source file or header file and see the results.
댓글 수: 1
Find more on Simulink Coder 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!