### Starting build procedure for: CANtest
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: C:\test\CANtest_ert_rtw
### Invoking Target Language Compiler on CANtest.rtw
### Using System Target File: C:\Program Files\MATLAB\R2021a\rtw\c\ert\ert.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file CANtest_types.h
### Writing header file CANtest.h
### Writing source file CANtest.c
### Writing header file CANtest_private.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing source file CANtest_data.c
### Writing header file rtmodel.h
### Writing source file ert_main.c
### TLC code generation complete.
### Creating extmode_task_info.m.
### Creating external mode types file ext_mode_types.h
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: GNU GCC Embedded Linux
### 'C:\test\CANtest_ert_rtw\CANtest.mk' is up to date
### Building 'CANtest': make -f CANtest.mk all
### Successful completion of build procedure for: CANtest
### Simulink cache artifacts for 'CANtest' were created in 'C:\test\CANtest.slxc'.
Build process completed successfully
Model Action Rebuild Reason
================================================================================
CANtest Code generated and compiled Global variable raspiCANMsg has changed.
1 of 1 models built (0 models already up to date)
Build duration: 0h 1m 44.551s
A run-time error is encountered when running External mode simulation on the Raspberry Pi hardware. This usually occurs when a hardware resource, such as a web camera or an audio card, is not available or configured incorrectly. The log file, /home/pi/MATLAB_ws/R2021a/CANtest.log, storing model diagnostic information on the Raspberry Pi hardware has the following content: **** Starting the application ****
SPI_open/open: No such file or directory
open SPI Channel 0 in RW mode -> fd -1