0

I use Matlab R2008a and I try to replace handmade C code with code generate from Simulink model. I've reach a good result but in some file I've an unnecessary function , generated to initialize the data structure : _initialize(). Now, how can avoid the generation of this function? More in general, is possible configure RTW so to generate only one *.c and only one *.h files (except rtwtypes.h)

Thanks for your suggestion

Below my configuartion :

MATLAB Version 7.6
Simulink Version 7.1
Real-Time Workshop Version 7.1
Real-Time Workshop Embedded Coder Version 5.1

H2O
  • 153
  • 1
  • 1
  • 13
  • Not sure if that answers the question, but it's certainly related: http://www.mathworks.co.uk/matlabcentral/answers/92639-how-do-i-customize-the-main-function-generated-by-real-time-workshop-embedded-coder-5-2-r2008b – am304 Nov 11 '14 at 14:52
  • Hi, maybe is a good start point...thanks – H2O Nov 13 '14 at 09:14
  • Why would you think initialize is unnecessary? Where would you put it otherwise? An option for you is to use the rt_main to wrap the initialize and output/update functions into one single function that you call from wherever you are hooking the generated code into. – pmb Nov 14 '14 at 12:15
  • Hi, because the data structure initialization is made in other function. As I written, my target is replace a part or all handmade C code, for this reason I would proceed for simple step so to reduce the impact on the project. – H2O Nov 17 '14 at 08:45

0 Answers0