Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Deploying C code from MatlabCoder on ARM proccessor, linking with compiler

Asked by Matthew on 19 Jul 2013

Hi all,

I'm trying to develop some STM32F4xx application (it's ARM based) that contains some data processing algorithms designed in Matlab.

Generating code (it's just one function in one .m file) to C works fine, it gives me my function and some other supporting .c and .h files like rtw, types, data handling. Once I take those generated sources to Keil project (containg all my MCU needs for peripherials + user_app() call for my Matlab-generated function) and compile it in Keil enviroment - it works well.

Problem is that during developing my algorithm the amount and names of generated by Coder files varies so it's impossible to setup (in Keil) this project just one time correctly because files don't match every next build!

My goal is not to run Keil's GUI every time I have changed my algorithm and try to auto compile it (in some other Matlab script) using Keil's Command-Line Interface - just some "build/link project command" and not to add source filenames manually - its project file with paths is complex.

I thought about solution and tried to generate C code as a .LIB file so I could just add .lib file to Keil's project but to be honest I can't do it.

Any advises?

Please not that I'm not using Simulink. My Matlab's version is 2012b and my ARM compiler is Keil's MDK as mentioned.

0 Comments

Matthew

0 Answers

Contact us