This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Matlab code with DM 6467

Hi,

I have a large piece of Matlab code for video processing which I need to implement on DM6467. I suppose I need to convert the Matlab code to C/C++ in order for ARM GCC compilers to compile it. I was wondering if there is any tool provided by TI which can get me the equivalent C code for my matlab code or I need to manually write the C code.

Any links/suggestions would be a great help.

Thanks,

Abhishek

  • I think there is no tool to support this convertion except that you construct your model with simulink,   I know that simulink can generate library file for you based on your simulink model.  Please refer to MATLAB for C/C++ Programmers .

  • At least TI does not provide anything in this area, I have heard of folks using Matlab and Simulink to generate code for TI DSPs, though that is all software owned and supported by The Mathworks, I have never actually used it myself. In addtion to LorryAstra's suggestion you may find this useful, though I am not sure if it still applies to the newer products in a useful way, you may want to ask the Mathworks how they would suggest proceeding.

  • Thanks for the links.

    I was wondering if anyone has tried porting OpenCV (Computer vision library) to DM 6467. It has many functions for image processing which could ease writing the C code.

     

  • I don't believe porting of OpenCV has actually been done, though you are not the first person I have heard mention having a port of it, I wouldn't be suprised to see a version of OpenCV for TI parts one day but I couldn't say for sure if/when this would happen.

  • Hi Abhishek,

    MathWorks tools for TI processors currently don't directly support mutli-core variant of DaVinci's to automatically generate code and implement them on the ARM cores. However, since your primary requirement is to re-use most of your MATLAB code to convert it into C that can then be compiled by GCC for implementation on ARM, you could take the following approach:

    1. Use Embedded MATLAB capability to make your M-code compliant, and generate C-code from it. You can do this directly from MATLAB or through Simulink using the Embedded MATLAB block in Simulink.Look in the Embedded MATLAB help for information on making your algorithms 'compliant' - this is the step where you may have to re-write your M code to make it suitable for embedded implementation. If you have experience with Simulink, you may be able to replace some MATLAB code with pre-built Simulink blocks for Video and Image Processing.

    2. Under the Getting Started section of the Real-Time Workshop Embedded Coder (RTW-EC) documentation, you'll see the sections Installing and Using an IDE --> Integrating and Testing Code with Eclipse IDE. This section details how you can integrate with Eclipse, and compile the code generated from Simulink/MATLAB with GCC in Eclipse.

    hope this helps.

    -Arvind Ananthan

    Technical Marketing, The MathWorks

     

  • Thanks Arvind.

  • Hi I'm new at the topic and I'm looking for some help on this.

    I want to embedd a shape recognition application in to a DSP. It takes a photo from a landscape and recognize some pre-defined objects in it and based on the objects found takes some actions but I want to put it in to a DSP. Could you recommend me some board from TI to achieve this task? I'd like to make some prototypes but I don't know the right tool to achieve this. Thanks for the attention