Generating C code for STM32 MCUs

24 views (last 30 days)
Karthik Ganesan
Karthik Ganesan on 25 May 2015
Answered: Abhishek GS on 18 Jun 2015
I am trying to generate C code from Matlab for the STM32 series of MCUs. Specifically for the edge detect function in the image processing toolbox. I was able to generate generic x86 code for this function, but I noticed that Embedded Coder supports STM32 as a target. Since this would save me the trouble of porting x86 code to STM32 ARM M3 code, I was wondering is there a way for me to generate code directly for this?
Most of the examples for this target show that compiling from Simulink is supported. But I just want to do a one-shot compile of the function to STM32 code. I dont need to use PIL or anything like that. I already have the code on STM32 to load my code and perform the other functions I need. I just need the bit of the code that does the edge detection itself.

Answers (1)

Abhishek GS
Abhishek GS on 18 Jun 2015
Hi Karthik,
You could generate code for STM32, from the same Simulink Model by installing a Support Package for it.
I am not sure which MATLAB release you are using. Refer this page.
STMicroelectronics also have provided a support package that you can use along with MATLAB and Simulink. Refer this link for the same.
If you are using MATLAB 8.2 (R2013b) and newer version, then you can get the support package from
here as well.
Thanks,
Abhishek

Community Treasure Hunt

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

Start Hunting!