gmake: *** No rule to make target

62 ビュー (過去 30 日間)
Abdul K
Abdul K 2020 年 8 月 1 日
編集済み: Walter Roberson 2024 年 7 月 20 日
I created a Simulink model and I am trying to upload to an Arduino, but I keep getting this error:
### Invoking Target Language Compiler on Pixy2CameraModel1.rtw
### Using System Target File: c:\apps\matlab2017a\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 Pixy2CameraModel1.h
### Writing header file Pixy2CameraModel1_types.h
.
### Writing header file rtwtypes.h
### Writing source file Pixy2CameraModel1.c
### Writing header file Pixy2CameraModel1_private.h
### Writing source file ert_main.c
### TLC code generation complete.
### Creating HTML report file Pixy2CameraModel1_codegen_rpt.html
### Invoking custom build hook: CodeGenBeforeMake
### Using toolchain: Arduino AVR v1.6.13 | gmake (64-bit Windows)
### 'W:\Desktop\Pixy2Trial\Pixy2CameraModel1_ert_rtw\Pixy2CameraModel1.mk' is up to date
### Building 'Pixy2CameraModel1': "C:\apps\MATLAB~2\bin\win64\gmake" -f Pixy2CameraModel1.mk all
W:\Desktop\Pixy2Trial\Pixy2CameraModel1_ert_rtw>cd .
W:\Desktop\Pixy2Trial\Pixy2CameraModel1_ert_rtw>if "" == "" ("C:\apps\MATLAB~2\bin\win64\gmake" -f Pixy2CameraModel1.mk all ) else ("C:\apps\MATLAB~2\bin\win64\gmake" -f Pixy2CameraModel1.mk )
gmake: *** No rule to make target `W:/Desktop/Pixy2Trial/blocks/src/Pixy2Cam.cpp', needed by `Pixy2Cam.o'. Stop.
W:\Desktop\Pixy2Trial\Pixy2CameraModel1_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
W:\Desktop\Pixy2Trial\Pixy2CameraModel1_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.
### Build procedure for model: 'Pixy2CameraModel1' aborted due to an error.
Error(s) encountered while building "Pixy2CameraModel1":
### Failed to generate all binary outputs.
Component:Simulink | Category:Block diagram error
  6 件のコメント
Waseem Sajjad
Waseem Sajjad 2020 年 8 月 12 日
編集済み: Waseem Sajjad 2020 年 8 月 12 日
Hi Mr.Abdul, I am getting same error even when MinGW is installed. i am also working on matlab system block for pixy2 vision sensor. Did you succeed in your work.
Abdul K
Abdul K 2020 年 8 月 12 日
I did solve this issue by installing MinGW. The model can be updated, built and the code uploaded to arduino, but I get this error when I am trying to run the model:
Error occurred while executing External Mode MEX-file 'ext_comm':
Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out:
a) The target is not switched on.
b) The target is not connected to your host machine.
c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.

サインインしてコメントする。

回答 (3 件)

Stefanie Schwarz
Stefanie Schwarz 2024 年 2 月 6 日

chen junbing
chen junbing 2024 年 5 月 15 日
編集済み: Walter Roberson 2024 年 7 月 20 日
Hello:
Has the problem been solved? I had a similar problem using the MinGW64 compiler and the error message is as follows:
### Starting build procedure for: TestLinUnpack ### Generating code and artifacts to 'Model specific' folder structure ### Generating code into build folder: E:\Test_LINUNPACK\TestLinUnpack_ert_rtw ### Invoking Target Language Compiler on TestLinUnpack.rtw ### Using System Target File: D:\matlab2022b\rtw\c\ert\ert.tlc ### Loading TLC function libraries ### Generating TLC interface API for custom data ### Initial pass through model to cache user defined code . ### Caching model source code ### Writing header file TestLinUnpack_types.h . ### Writing header file TestLinUnpack.h ### Writing header file rtwtypes.h ### Writing source file TestLinUnpack.c ### Writing header file TestLinUnpack_private.h ### Writing source file TestLinUnpack_data.c . ### Writing source file ert_main.c ### TLC code generation complete (took 1.373s). ### Saving binary information cache. ### Using toolchain: MinGW64 | gmake (64-bit Windows)
Warning: The precompiled library 'D:\matlab2022b\toolbox\slrealtime\simulink\blocks\dist\win64\lib\libecatinterface_ert_mingw64.lib' does not exist. Generating makefile rules to build the library.
6 similar
### Creating 'E:\Test_LINUNPACK\TestLinUnpack_ert_rtw\TestLinUnpack.mk' ... ### Building 'TestLinUnpack': "D:\matlab2022b\bin\win64\gmake" -f TestLinUnpack.mk all E:\Test_LINUNPACK\TestLinUnpack_ert_rtw>call "setup_mingw.bat" E:\Test_LINUNPACK\TestLinUnpack_ert_rtw>set "MINGW_ROOT=C:\PROGRA~3\MATLAB\SUPPOR~1\R2022b\3P778C~1.INS\MINGW_~1.INS\bin" E:\Test_LINUNPACK\TestLinUnpack_ert_rtw>cd . E:\Test_LINUNPACK\TestLinUnpack_ert_rtw>if "all" == "" ("D:\matlab2022b\bin\win64\gmake" -f TestLinUnpack.mk all ) else ("D:\matlab2022b\bin\win64\gmake" -f TestLinUnpack.mk all ) "C:\PROGRA~3\MATLAB\SUPPOR~1\R2022b\3P778C~1.INS\MINGW_~1.INS\bin/gcc" -c -fwrapv -m64 -O0 -msse2 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=TestLinUnpack -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 @TestLinUnpack_comp.rsp -o "TestLinUnpack.obj" "E:/Test_LINUNPACK/TestLinUnpack_ert_rtw/TestLinUnpack.c" E:/Test_LINUNPACK/TestLinUnpack_ert_rtw/TestLinUnpack.c: In function 'TestLinUnpack_step':
void *dataPort = TestLinUnpack_ConstP.Constant_Value; ^~~~~~~~~~~~~~~~~~~~
memcpy(data,dataPort,8); ^~~~~~
E:/Test_LINUNPACK/TestLinUnpack_ert_rtw/TestLinUnpack.c:40:5: note: include '<string.h>' or provide a declaration of 'memcpy' "C:\PROGRA~3\MATLAB\SUPPOR~1\R2022b\3P778C~1.INS\MINGW_~1.INS\bin/gcc" -c -fwrapv -m64 -O0 -msse2 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DMODEL=TestLinUnpack -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 @TestLinUnpack_comp.rsp -o "TestLinUnpack_data.obj" "E:/Test_LINUNPACK/TestLinUnpack_ert_rtw/TestLinUnpack_data.c" gmake: *** No rule to make target `libecatinterface.a', needed by `../TestLinUnpack.exe'. Stop. E:\Test_LINUNPACK\TestLinUnpack_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 E:\Test_LINUNPACK\TestLinUnpack_ert_rtw>exit /B 1 ### Build procedure for TestLinUnpack aborted due to an error.

Angelo Yeo
Angelo Yeo 2024 年 7 月 20 日
To me, deleting "slprj" folder in the working directory was a solution.

製品

Community Treasure Hunt

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

Start Hunting!

Translated by