Unable to generate code for STM32

조회 수: 50 (최근 30일)
abhijeetb89
abhijeetb89 2015년 6월 6일
편집: smrtkai 2015년 12월 4일
Hello,
I am trying to generate code for STM32F4 Discovery. I have installed Windows SDK 7.1 and .NET framework 4.0. Using "mex -setup" and "xpcsetCC setup", toolchain "Microsoft Visual C++ 2010" is also configurator but still the code generator gives error -
"An installed compiler was not detected. Certain simulation modes, as well as host-based coder builds require that a compiler be installed. Please install one of the supported compilers for this release as listed at: http://www.mathworks.com/support/compilers/R2015a/win64.html"
One more thing I have observed is that there is no option in "Code Generation" to select toolchain.Please see the image below.
Could you please suggest a solution?
Thanks,
Abhijeet
  댓글 수: 8
son nguyen
son nguyen 2015년 7월 12일
i got the same problem like you, i installed matlab 2014 and 2015a, stm32 cube V4.8, compiler visual studio C++ 2010 -2015 but it still didn't work. Did you solve that probem. Please help me.
abhijeetb89
abhijeetb89 2015년 7월 29일
Hi Rhys,
could you please paste a snapshot of "Configuration Parameters --> Code Generation". I would like to see the settings.
Thanks.
Abhijeet

댓글을 달려면 로그인하십시오.

답변 (6개)

Pascal REYNAUD
Pascal REYNAUD 2015년 6월 8일
Hello,
toolchain is selected from STM32CubeMx tool that must be installed to use STM32-MAT/Target solution.
STM32CubeMx installation path is selected from "STM32 Options" that appears when you select STM32.tlc.
It is used to configure MCU (Pinout and peripherals) and used toolchain.
Then, it is called from Simulink to generate project.
Best regards
Pascal
  댓글 수: 4
smrtkai
smrtkai 2015년 7월 6일
I am facing the same error. My setup:
  • MATLAB R2015a (8.5.0.197613)
  • STM32CubeMX 4.8.0
  • Keil uVision 5.15
It seems to me, that MATLAB/Simulink cannot open STM32CubeMX when compiling, although the configuration within Simulink is set correctly.
Is there some kind of debug mode to check which paths simulink checks to open STM32CubeMX?
Etheric-Dreams
Etheric-Dreams 2015년 7월 25일
Same problem here, any further update?

댓글을 달려면 로그인하십시오.


jonatan blom
jonatan blom 2015년 7월 28일
I’m also getting this error, I can compile my model with 2013b but when I try with 2015a I get the same error as you "An installed compiler was not detected". I have no problem compiling a c file with mex command in the matlab prompt...

yi zhang
yi zhang 2015년 7월 29일
"args.mexOpts = rtwprivate('getMexCompilerInfo','manufacturer','LCC');"-->"args.mexOpts = rtwprivate('getMexCompilerInfo','LCC');" in setup_for_lcc.m. It works in this scenario but the side-effects are unknown yet.

abhijeetb89
abhijeetb89 2015년 7월 29일
편집: abhijeetb89 2015년 7월 29일
Hello Pascal,
Could you do me a favor? If you can generate code at your end, could you please paste a snapshot of "Configuration Parameters ----> Code Generation". I would like to see the settings.
Thanks.
Abhijeet

Valmir Sadiku
Valmir Sadiku 2015년 10월 8일
I have basically the same issues by generating the code for the STM32 : An installed compiler was not detected...
If I check for installed compilers via mex -setup:
MEX configured to use 'Microsoft Windows SDK 7.1 (C)' for C language compilation.
Everything looks fine, building code for Arduino works just fine. What could be the reason for this issue? I have a OS Win7 64-Bit with Matlab 2015b.
I'm thankful for any help or assistance.
Regards,
goldenEyes

smrtkai
smrtkai 2015년 12월 4일
편집: smrtkai 2015년 12월 4일
I had similiar issues. Maybe these links can help:
I wrote a step by step guide for myself on "How to setup STM32-MAT/TARGET with MATLAB R2015a". https://my.st.com/b476312a
Discussion on st.com:
The STM32-MAT/TARGET was developed for MATLAB R2014a. I was not able to get it working with MATLAB R2015b (generates erroneous). On my system it only works with MATLAB R2015a. I still have trouble to get Processor-In-the-Loop working.

Community Treasure Hunt

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

Start Hunting!

Translated by