2015-11-20 11:40 AM
Hi, I am trying to use simulink to generate code for my STM32F4DISCO.
I have the STM32F4Discovery addon on matlab. I have the STM32-MAT/TARGET with the patch. STM32CubeMX and Atollic studio are installed too. I can build a simple program to blink LED, but when I try to use a block from STM32MAT-Target, like a blank program just with the MCU config and the ioc, I receive these errors:### Real-Time Workshop build procedure for method: 'entry
### modelName: 'untitled
### gcs: 'untitled
### bdroot: 'untitled
### Starting Real-Time Workshop build procedure for model: untitled
### Windows version:win64
### Model connectivity is: normal
### Create verification block: None
### Generating code into build folder: C:\Matlab\STM32-MAT\STM32\STM32demos\CodeGeneration\untitled_stm32
Warning: The model reference sample time inheritance rule for block 'untitled/STM32_Config' is not set and the model is sample time independent. The generated code from the block might produce incorrect results if it is referenced by a Model block. For S-functions, specify the model reference sample time inheritance rule through the ssSetModelReferenceSampleTimeInheritanceRule macro. You can suppress the diagnostic by setting Configuration Parameters > Diagnostics > Solver > Unspecified inheritability of sample time setting to ''none''.
----------->STM32 MCU:stm32f4
### Real-Time Workshop build procedure for method: 'before_tlc
### modelName: 'untitled
### gcs: 'untitled
### bdroot: 'untitled
### before_tlc
### Invoking Target Language Compiler on untitled.rtw
### Using System Target File: C:\Matlab\STM32-MAT\STM32\rtw\stmtlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
Warning: simMode value is 0.0
Warning: Create real-time application main.c
.
### Writing header file untitled.h
### Writing source file untitled.c
### Writing header file untitled_STMh
### Writing header file untitled_ADC.h
### Writing source file untitled_ADC.c
.
### Writing header file untitled_types.h
### Writing header file rtwtypes.h
### Writing header file untitled_private.h
### Writing source file main.c
### TLC code generation complete.
### Real-Time Workshop build procedure for method: 'after_tlc
### modelName: 'untitled
### gcs: 'untitled
### bdroot: 'untitled
### after_tlc
### Creating HTML report file untitled_codegen_rpt.html
### Creating project marker file: rtw_proj.tmw
### Real-Time Workshop build procedure for method: 'before_make
### modelName: 'untitled
### gcs: 'untitled
### bdroot: 'untitled
### Code Format : Embedded-C
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Adding source and include directories to make process.
STM32 package install path: C:\Matlab\STM32-~1\STM32
- additional source directories:
C:\Matlab\STM32-~1\STM32\addSrc\src
- additional include directories:
C:\Matlab\STM32-~1\STM32\addSrc\inc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
### Processing Template Makefile: C:\Matlab\STM32-MAT\STM32\rtw\stmtmf
### Real-Time Workshop build procedure for method: 'error
### modelName: 'untitled
### gcs: 'untitled
### bdroot: 'untitled
### Real-Time Workshop build procedure for model: 'untitled' aborted due to an error.
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/winhtml
MATLAB must be restarted after the compiler is installed.
Can someone help? Thanks a lot! :)
2015-11-23 04:25 AM
Hi,
edit STM32/rtw/stm32.tmf file. COMPILER_TOOL_CHAIN = default line is missing between SYS_TARGET_FILE = stm32.tlc and MAKEFILE_FILESEP = / line 69 Add it. It should solve problem. Regards pascal SYS_TARGET_FILE = stm32.tlc COMPILER_TOOL_CHAIN = default MAKEFILE_FILESEP = /