Arduino Analog Read Build Error

2 views (last 30 days)
Awais Farooqi
Awais Farooqi on 3 Aug 2020
Commented: Arun Kumar on 25 Sep 2020
How to solve Build ERROR? Failed to generate all binary outputs.
01:33 PM Elapsed: 6 sec
### Starting build procedure for model: AnalogRead_1 ### Generating code and artifacts to 'Model specific' folder structure
Code Generation
1
Elapsed: 5 sec
### Generating code into build folder: C:\Users\kamru\OneDrive\Desktop\RS485 Test\ARD\Sensor_Read\AnalogRead_1_ert_rtw ### Invoking Target Language Compiler on AnalogRead_1.rtw ### Using System Target File: C:\Program Files\MATLAB\R2018a\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 AnalogRead_1_types.h ### Writing header file AnalogRead_1.h ### Writing source file AnalogRead_1.c ### Writing header file rtwtypes.h ### Writing header file AnalogRead_1_private.h . ### Writing source file AnalogRead_1_data.c ### Writing header file rtmodel.h ### Writing source file ert_main.c ### TLC code generation complete. ### Evaluating PostCodeGenCommand specified in the model ### Using toolchain: Arduino AVR v1.8.1 | gmake (64-bit Windows) ### Creating 'C:\Users\kamru\OneDrive\Desktop\RS485 Test\ARD\Sensor_Read\AnalogRead_1_ert_rtw\AnalogRead_1.mk' ... ### Building 'AnalogRead_1': "C:\PROGRA~1\MATLAB\R2018a\bin\win64\gmake" -f AnalogRead_1.mk all C:\Users\kamru\OneDrive\Desktop\RS485 Test\ARD\Sensor_Read\AnalogRead_1_ert_rtw>cd . C:\Users\kamru\OneDrive\Desktop\RS485 Test\ARD\Sensor_Read\AnalogRead_1_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2018a\bin\win64\gmake" -f AnalogRead_1.mk all ) else ("C:\PROGRA~1\MATLAB\R2018a\bin\win64\gmake" -f AnalogRead_1.mk ) C:/ProgramData/MATLAB/SupportPackages/R2018a/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/tools/avr/bin/avr-g++ -std=gnu++11 -fpermissive -fno-exceptions -fno-threadsafe-statics -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10801 -MMD -MP -MF"MW_AnalogInput.dep" -MT"MW_AnalogInput.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=AnalogRead_1 -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DMW_TIMERID=1 -DMW_PRESCALAR=64 -DMW_TIMERCOUNT=65286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=9600 -D_RTT_ANALOG_REF_=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=1 -DTID01EQ=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=AnalogRead_1 -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -IC:/Users/kamru/OneDrive/Desktop/RS485 Test/ARD/Sensor_Read -IC:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/shared/svd/include -IC:/Users/kamru/OneDrive/Desktop/RS485 Test/ARD/Sensor_Read/AnalogRead_1_ert_rtw -IC:/PROGRA~1/MATLAB/R2018a/extern/include -IC:/PROGRA~1/MATLAB/R2018a/simulink/include -IC:/PROGRA~1/MATLAB/R2018a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2018a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2018a/rtw/c/ert -IC:/ProgramData/MATLAB/SupportPackages/R2018a/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2018a/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/arduino/avr/variants/standard -IC:/ProgramData/MATLAB/SupportPackages/R2018a/3P.instrset/arduinoide.instrset/arduino-1.8.1/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/supportpackages/arduinotarget/include -IC:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/supportpackages/arduinotarget/scheduler/include -IC:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/supportpackages/arduinobase/include -IC:/ProgramData/MATLAB/SupportPackages/R2018a/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/shared/externalmode_daemon/include -o MW_AnalogInput.o C:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/supportpackages/arduinobase/src/MW_AnalogInput.cpp avr-g++: error: Test/ARD/Sensor_Read: No such file or directory avr-g++: error: Test/ARD/Sensor_Read/AnalogRead_1_ert_rtw: No such file or directory gmake: *** [MW_AnalogInput.o] Error 1 C:\Users\kamru\OneDrive\Desktop\RS485 Test\ARD\Sensor_Read\AnalogRead_1_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 C:\Users\kamru\OneDrive\Desktop\RS485 Test\ARD\Sensor_Read\AnalogRead_1_ert_rtw>An_error_occurred_during_the_call_to_make 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, operable program or batch file. ### Creating HTML report file AnalogRead_1_codegen_rpt.html
### Build procedure for model: 'AnalogRead_1' aborted due to an error.
Error(s) encountered while building "AnalogRead_1": ### Failed to generate all binary outputs.
  1 Comment
Arun Kumar
Arun Kumar on 25 Sep 2020
Hi,
The line:
error: Test/ARD/Sensor_Read: No such file or directory avr-g++: error: Test/ARD/Sensor_Read/AnalogRead_1_ert_rtw: No such file or directory gmake: ***
suggests that Simulink was not able to find avr-g++ compiler. This could be due to installation issue. Please try a clean reinstallation of the support package and try building the model.
To uninstall the support pakcage, please follow this guide:
Hope this helps!

Sign in to comment.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!