Search code examples
csimulinklegacy-codekeilstm32f4discovery

legacy code in matlab/simulink for keil program


I have wrote a program in Keil for stm32F4 discovery microcontroller and i want to run this C program in Matlab simulink. For this I am trying to use legacy_code function in Matlab. But there are many parameters which I cannot add like

  1. SFunctionName,
  2. OutputFcnSpec,
  3. StartFcnSpec,
  4. HeaderFiles,
  5. SourceFiles,
  6. HostLibFiles,
  7. TargetLibFiles,
  8. IncPaths,
  9. SrcPaths,
  10. LibPaths.

It would be really helpful if anyone guide me how to find these parameters from keil project/program


Solution

  • Most of those are just obvious as its name suggests, SFunctionName is the function name you want to run by the simulator, HeaderFiles is the header that contains the declaration of the functions etc. There is an example in the docs for providing specifications for legacy functions:

    http://mathworks.com/help/rtw/examples/lookup-tables.html