STM32-MAT/Target Processor-in-the-Loop (PIL). Keil error compiling.
Hi,
I have some problem with my Simulink model when I use her in PIL simulation mode with the STM32F4 Discovery Board via ST-Link debugger (SWD port).
My system configuration
:
- Windows 7 Professional x64;
- MatLab R2014a x64;
- Keil uVision v4.73 or v5.16;
- STM32CubeMX v4.15.0 (Firware packege STM32Cube FW_F4 V1.12.0);
- STM-32 MAT/TARGET v4.2.0.
MatLab directory:
C:\Program Files\MATLAB\R2014a
Keil directory:
C:\Program Files (x86)\Keil_v5
or C:\Program Files (x86)\Keil_v473
STM32Cube directory:
C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeMX
STM-32 MAT/TARGET directory:
C:\MATLAB\STM32-MAT
I create simple Simulink model, build and run project on my STM32F4 Discovery board:
1.
https://drive.google.com/open?id=0B1LzDTmWWv9YdlMxNzhCT0o0TFE
2.
https://drive.google.com/open?id=0B1LzDTmWWv9YN3ZSQmNLR2tPbTA
3.
https://drive.google.com/open?id=0B1LzDTmWWv9YRjBqbzdDR3pKNHM
Then I switch on PIL mode and run Simulink model, got a compilation problem:
- PIL mode
https://drive.google.com/open?id=0B1LzDTmWWv9YeHg5dkhFR08zelk
- Diagnostic Viewer
https://drive.google.com/open?id=0B1LzDTmWWv9YQ0ZUWVlGOWVYdEU
https://drive.google.com/open?id=0B1LzDTmWWv9YVXRLMEZWMWlCNzA
https://drive.google.com/open?id=0B1LzDTmWWv9YZGFUMjZ5cHhrNDQ
https://drive.google.com/open?id=0B1LzDTmWWv9YdWpRQ1picmdmaU0
- CubeMX
https://drive.google.com/open?id=0B1LzDTmWWv9YRmF0ak1ZV1Fmb2M
- Keil v4.73
https://drive.google.com/open?id=0B1LzDTmWWv9YQlRXZUJXNzhzZzg
The problem is shown when I compile the project in the rt_main.c file. File rt_main.h is missing. How to correct these errors:
♯ error Must specify a model name. Define MODEL=name.
♯ error Must specify the number of sample times. Define NUMST=number
&sharperror Separate output and update functions are not supported by rt_main.c. \
You must update rt_main.c to suit your application needs, or select \
the 'Single output/update function' option.
Thanks.
#stm32-mat/target #matlab