Arduino simulink error: when i run a simulink simulation i keep getting this error
5 views (last 30 days)
Show older comments
=== Simulation (Elapsed: 26 sec) ===
### Starting build procedure for: Demo_M1V4
Warning:Parameter precision loss occurred for 'Gain' of 'Demo_M1V4/M1V4 Middle Motor Driver PWM5, D4 FST/conversion to dutycycle (convert to uint8, overflow will provide reverse polairty magnitued)'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Warning:Parameter precision loss occurred for 'Gain' of 'Demo_M1V4/M1V4 Left Motor Driver PWM9, D11 FST/conversion to dutycycle (convert to uint8, overflow will provide reverse polairty magnitued)'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
ans =
logical
1
ans =
logical
1
ans =
logical
1
ans =
logical
1
Warning:Warning: Name is nonexistent or not a directory: C:\ProgramData\MATLAB\SupportPackages\R2020b\3P.instrset\arduinoide.instrset\hardware\arduino\avr\libraries\Wire\utility
"### Generating static library."
"C:/Program Files/MATLAB/R2020b/bin/win64/gmake" -B -j5 -C "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1" SHELL="%SystemRoot%/system32/cmd.exe" -f avrcore.mk all
gmake[1]: Entering directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1'
"C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-gcc" -MMD -MP -Wall -x assembler-with-cpp -c -g -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -DARDUINO_NUM_SERIAL_PORTS=4 -c -MF"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_pulse.S.dep" -MT"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_pulse.S.o" -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/mega -o "C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_pulse.S.o" "C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/wiring_pulse.S"
"C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-gcc" -std=gnu11 -c -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10801 -MMD -MP -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DARDUINO_NUM_SERIAL_PORTS=4 -MF"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/hooks.dep" -MT"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/hooks.o" -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/mega -o "C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/hooks.o" "C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/hooks.c"
"C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-gcc" -std=gnu11 -c -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10801 -MMD -MP -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DARDUINO_NUM_SERIAL_PORTS=4 -MF"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/WInterrupts.dep" -MT"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/WInterrupts.o" -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/mega -o "C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/WInterrupts.o" "C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/WInterrupts.c"
"C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-gcc" -std=gnu11 -c -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10801 -MMD -MP -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DARDUINO_NUM_SERIAL_PORTS=4 -MF"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring.dep" -MT"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring.o" -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/mega -o "C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring.o" "C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/ardC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/wiring_pulse.S:53:0: fatal error: opening dependency file C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_pulse.S.dep: Permission denied
C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/hooks.c:31:1: fatal error: opening dependency file C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/hooks.dep: Permission denied
void yield(void) __attribute__ ((weak, alias("__empty")));
^~~~
uino/avr/cores/arduino/wiring.c"
compilation terminated.
compilation terminated.
C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/WInterrupts.c:299:1: fatal error: opening dependency file C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/WInterrupts.dep: Permission denied
IMPLEMENT_ISR(INT7_vect, EXTERNAL_INT_7)
^~~~~~~~~~~~~
compilation terminated.
"C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-gcc" -std=gnu11 -c -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10801 -MMD -MP -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DARDUINO_NUM_SERIAL_PORTS=4 -MF"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_analog.dep" -MT"C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_analog.o" -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/mega -o "C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_analog.o" "C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/wiring_analog.c"
gmake[1]: *** [C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_pulse.S.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: *** [C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/hooks.o] Error 1
gmake[1]: *** [C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/WInterrupts.o] Error 1
C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/wiring.c:392:1: fatal error: opening dependency file C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring.dep: Permission denied
}
^
compilation terminated.
gmake[1]: *** [C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring.o] Error 1
C:/ProgramData/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino/wiring_analog.c:293:1: fatal error: opening dependency file C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_analog.dep: Permission denied
}
^
compilation terminated.
gmake[1]: *** [C:/Users/folar/DOCUME~1/MATLAB/R2020b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_analog.o] Error 1
gmake[1]: Leaving directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1'
gmake: *** [all] Error 2
The make command returned an error of 2
### Build procedure for Demo_M1V4 aborted due to an error.
Top model targets built:
Model Action Rebuild Reason
=====================================================================
Demo_M1V4 Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 25.874s
Error:Error(s) encountered while building "Demo_M1V4"
0 Comments
Answers (1)
Pranav Verma
on 8 Dec 2020
Hi Folarin,
Try executing the below three commands and then try to run your model and see if you are still getting the error:
>> restore defaultpath
>> rehash toolboxcache
>> savepath
Further, you can go through the below link for dicussion on similar lines:
https://www.mathworks.com/matlabcentral/answers/42690-warning-name-is-nonexistent-or-not-a-directory
You can try the Simulink Support Package for Arduino Hardware for running simulation models on Arduino boards.
Thanks
0 Comments
See Also
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!