Simulink – STM32 – PIL test communication error
I have a Simulink model that contain an algorithm block. I built the generated c code succesfully to STM32F4-discovery board. (I read that from diagnostic viewer.) I used SIL/PIL Manager App to make PIL test. I selected serial communication at configuration panel. When I run the PIL simulation I get this error:
The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure. You should:
(a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct.
(b) Confirm that the target application is running on the target hardware.
(c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.).
Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging. If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
This is my example model:
This is the diagnostic viewer outputs:
### Connectivity configuration for "C:UsersatakanDesktopmilpilsilmult_ert_rtw": STM32F4-Discovery (Serial) ###
### Preparing to start PIL block simulation: denemepil/mult …
### Using toolchain: GNU Tools for ARM Embedded Processors
### ‘C:UsersatakanDesktopmilpilsilmult_ert_rtwpilmult.mk’ is up to date
### Building ‘mult’: "D:MATLABbinwin64gmake" -f mult.mk all MW_GNU_ARM_TOOLS_PATH = C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>cd . C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>if "" == "" ("D:MATLABbinwin64gmake" -f mult.mk all ) else ("D:MATLABbinwin64gmake" -f mult.mk )
"### Invoking postbuild tool "Binary Converter" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-objcopy" -O binary ./mult.elf ../../mult.bin
"### Done invoking postbuild tool."
"### Invoking postbuild tool "Hex Converter" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-objcopy" -O ihex ./mult.elf ../../mult.hex
"### Done invoking postbuild tool."
"### Invoking postbuild tool "Executable Size" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-size" ./mult.elf text data bss dec hex filename 16748 160 12016 28924 70fc ./mult.elf
"### Done invoking postbuild tool."
"### Successfully generated all binary outputs." C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>exit 0
### Starting application: ‘mult_ert_rtwpilmult.elf’
### Started new OpenOCD process with PID 19356.
### Terminated OpenOCD process with PID 19356.
The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure. You should: (a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct. (b) Confirm that the target application is running on the target hardware. (c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.). Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging. If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
How can I fix this?I have a Simulink model that contain an algorithm block. I built the generated c code succesfully to STM32F4-discovery board. (I read that from diagnostic viewer.) I used SIL/PIL Manager App to make PIL test. I selected serial communication at configuration panel. When I run the PIL simulation I get this error:
The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure. You should:
(a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct.
(b) Confirm that the target application is running on the target hardware.
(c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.).
Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging. If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
This is my example model:
This is the diagnostic viewer outputs:
### Connectivity configuration for "C:UsersatakanDesktopmilpilsilmult_ert_rtw": STM32F4-Discovery (Serial) ###
### Preparing to start PIL block simulation: denemepil/mult …
### Using toolchain: GNU Tools for ARM Embedded Processors
### ‘C:UsersatakanDesktopmilpilsilmult_ert_rtwpilmult.mk’ is up to date
### Building ‘mult’: "D:MATLABbinwin64gmake" -f mult.mk all MW_GNU_ARM_TOOLS_PATH = C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>cd . C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>if "" == "" ("D:MATLABbinwin64gmake" -f mult.mk all ) else ("D:MATLABbinwin64gmake" -f mult.mk )
"### Invoking postbuild tool "Binary Converter" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-objcopy" -O binary ./mult.elf ../../mult.bin
"### Done invoking postbuild tool."
"### Invoking postbuild tool "Hex Converter" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-objcopy" -O ihex ./mult.elf ../../mult.hex
"### Done invoking postbuild tool."
"### Invoking postbuild tool "Executable Size" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-size" ./mult.elf text data bss dec hex filename 16748 160 12016 28924 70fc ./mult.elf
"### Done invoking postbuild tool."
"### Successfully generated all binary outputs." C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>exit 0
### Starting application: ‘mult_ert_rtwpilmult.elf’
### Started new OpenOCD process with PID 19356.
### Terminated OpenOCD process with PID 19356.
The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure. You should: (a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct. (b) Confirm that the target application is running on the target hardware. (c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.). Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging. If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
How can I fix this? I have a Simulink model that contain an algorithm block. I built the generated c code succesfully to STM32F4-discovery board. (I read that from diagnostic viewer.) I used SIL/PIL Manager App to make PIL test. I selected serial communication at configuration panel. When I run the PIL simulation I get this error:
The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure. You should:
(a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct.
(b) Confirm that the target application is running on the target hardware.
(c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.).
Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging. If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
This is my example model:
This is the diagnostic viewer outputs:
### Connectivity configuration for "C:UsersatakanDesktopmilpilsilmult_ert_rtw": STM32F4-Discovery (Serial) ###
### Preparing to start PIL block simulation: denemepil/mult …
### Using toolchain: GNU Tools for ARM Embedded Processors
### ‘C:UsersatakanDesktopmilpilsilmult_ert_rtwpilmult.mk’ is up to date
### Building ‘mult’: "D:MATLABbinwin64gmake" -f mult.mk all MW_GNU_ARM_TOOLS_PATH = C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>cd . C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>if "" == "" ("D:MATLABbinwin64gmake" -f mult.mk all ) else ("D:MATLABbinwin64gmake" -f mult.mk )
"### Invoking postbuild tool "Binary Converter" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-objcopy" -O binary ./mult.elf ../../mult.bin
"### Done invoking postbuild tool."
"### Invoking postbuild tool "Hex Converter" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-objcopy" -O ihex ./mult.elf ../../mult.hex
"### Done invoking postbuild tool."
"### Invoking postbuild tool "Executable Size" …" "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin/arm-none-eabi-size" ./mult.elf text data bss dec hex filename 16748 160 12016 28924 70fc ./mult.elf
"### Done invoking postbuild tool."
"### Successfully generated all binary outputs." C:UsersatakanDesktopmilpilsilmult_ert_rtwpil>exit 0
### Starting application: ‘mult_ert_rtwpilmult.elf’
### Started new OpenOCD process with PID 19356.
### Terminated OpenOCD process with PID 19356.
The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure. You should: (a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct. (b) Confirm that the target application is running on the target hardware. (c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.). Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging. If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
How can I fix this? embedded coder, pil, stm32f4, stm32, serial, processor in the loop, sil/pil manager MATLAB Answers — New Questions