m-file programme to embed in DSP

6 次查看(过去 30 天)
I try to programme the TMS28335 DSP with simulink blocks (ADC,SCI transmit, receive)using the serial cable communications. I have m-file programmes and I need to convert and embed to DSP. ıs there any block for using the m-file codes in DSP? I tried the embedded matlab function block, but it gives a lot of problems for my programme. Please help about my study. Thank you.

采纳的回答

Kaustubha Govind
Kaustubha Govind 2012-10-23
If you have MATLAB code that you need to use in a Simulink model that you intend to generate code from, the correct way is indeed to use an (Embedded) MATLAB Function block. However, only a subset of the MATLAB language is eligible for code-generation. Please be sure that you conform to these requirements - if you run into specific error, please post them with your code and the exact error message(s).
  7 个评论
Cigdem
Cigdem 2012-10-25
Kaustubha, what is the difference between embedded matlab function block and matlab S-function? Also, what is the difference between level 1 m-file s function and level 2 m-file s function? I tried the embedded matlab function, firstly it was working, but I prolonged the code (programme), it gave an error when I tried to save that. so, ıt didn't saved. There are for loops in my programme, if I use the s-function, Can it be converted with code generation, also same question with for embedded matlab function? thank you for your replies.
Kaustubha Govind
Kaustubha Govind 2012-10-25
Please see the various differences between the two blocks in the rows corresponding to them in the tables on this page. Level-1 MATLAB S-functions have long been deprecated - Level-2 MATLAB S-functions are the modern way of writing MATLAB S-functions and have better capabilities. Like I mentioned, you need to write the TLC file for code-generation with MATLAB S-function.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by