How to fix gmake error 43?

1 view (last 30 days)
N/A
N/A on 2 Nov 2017
Commented: N/A on 13 Nov 2017
During the process of code generation, MatLAB returns an error code with gmake: *[...] Error43. I've tried to google it, but, unfortunately, found nothing. Does anyone know the reason?
### Starting build procedure for model: VLC_PR_v1_b19
### Generating code into build folder: C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw
Warning:Precision loss occurred for Value (4.083) of 'MainGearRatio'. The value cannot be represented exactly using the run-time data type 'ufix16_En6'. 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:Precision loss occurred for Value (5.85) at element index (1,1) on 'GearRatio'. The value cannot be represented exactly using the run-time data type 'ufix16_En6'. 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 'VLC_PR_v1_b19/PC/If Action Subsystem/Acceleration request limitation1/Moving average/Enabled Subsystem/Gain'. 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:Units '-' specified for the 'Unit' field of Simulink.Parameter object 'Phi_x_t' referenced by 'VLC_PR_v1_b19/Constant19' are not defined in the Simulink unit database. Investigate 17 similar inconsistencies on Model Advisor Report.
If you cannot use a unit that exists in the database, consider suppressing all units inconsistency warnings by setting the configuration parameter 'Units inconsistency messages' to 'none'.
### Invoking Target Language Compiler on VLC_PR_v1_b19.rtw
### Using System Target File: C:\Program Files\MATLAB\R2017a\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
### Generating TLC interface API.
...............................................................................
......
### Writing header file VLC_PR_v1_b19.h
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
.
### Writing header file zero_crossing_types.h
### Writing source file VLC_PR_v1_b19.c
### Writing source file VLC_PR_v1_b19_capi.c
### Writing header file VLC_PR_v1_b19_capi.h
### Writing source file VLC_PR_v1_b19_data.c
### Writing source file ert_main.c
.
### TLC code generation complete.
### Creating HTML report file VLC_PR_v1_b19_codegen_rpt.html
### Using toolchain: LCC-win64 v2.4.1 | gmake (64-bit Windows)
### Creating 'C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw\VLC_PR_v1_b19.mk' ...
### Building 'VLC_PR_v1_b19': "C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f VLC_PR_v1_b19.mk all
C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw>set MATLAB=C:\Program Files\MATLAB\R2017a
C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw>cd .
C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f VLC_PR_v1_b19.mk all ) else ("C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f VLC_PR_v1_b19.mk )
"C:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/include64 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Andrey/Documents/MATLAB/VLC -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Andrey/Documents/MATLAB/VLC/VLC_PR_v1_b19_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -Fo"VLC_PR_v1_b19.obj" "VLC_PR_v1_b19.c"
"C:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/include64 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Andrey/Documents/MATLAB/VLC -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Andrey/Documents/MATLAB/VLC/VLC_PR_v1_b19_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -Fo"VLC_PR_v1_b19_capi.obj" "VLC_PR_v1_b19_capi.c"
"C:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/include64 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Andrey/Documents/MATLAB/VLC -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Andrey/Documents/MATLAB/VLC/VLC_PR_v1_b19_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -Fo"VLC_PR_v1_b19_data.obj" "VLC_PR_v1_b19_data.c"
"C:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/include64 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=VLC_PR_v1_b19 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Andrey/Documents/MATLAB/VLC -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Andrey/Documents/MATLAB/VLC/VLC_PR_v1_b19_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -Fo"ert_main.obj" "ert_main.c"
C:/PROGRA~1/MATLAB/R2017a/sys/perl/win32/bin/perl.exe C:/PROGRA~1/MATLAB/R2017a/rtw/c/tools/mkvc_lnk.pl VLC_PR_v1_b19.lnk VLC_PR_v1_b19.obj VLC_PR_v1_b19_capi.obj VLC_PR_v1_b19_data.obj
"### Creating standalone executable "../VLC_PR_v1_b19.exe" ..."
"C:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/bin/lcclnk64" -s -LC:/PROGRA~1/MATLAB/R2017a/sys/lcc64/lcc64/lib64 -o ../VLC_PR_v1_b19.exe @VLC_PR_v1_b19.lnk ert_main.obj
vlc_pr_v1_b19.obj .text: undefined reference to 'MaxAcceleration'
vlc_pr_v1_b19.obj .text: undefined reference to 'VehSpeed'
vlc_pr_v1_b19.obj .text: undefined reference to 'c_0'
vlc_pr_v1_b19.obj .text: undefined reference to 'GearRatio'
vlc_pr_v1_b19.obj .text: undefined reference to 'GearNumber'
vlc_pr_v1_b19.obj .text: undefined reference to 'm_max'
vlc_pr_v1_b19.obj .text: undefined reference to 'rd'
vlc_pr_v1_b19.obj .text: undefined reference to 'g'
vlc_pr_v1_b19.obj .text: undefined reference to 'm_min'
vlc_pr_v1_b19.obj .text: undefined reference to 'MainGearRatio'
vlc_pr_v1_b19.obj .text: undefined reference to 'MaxTorqueLosses'
vlc_pr_v1_b19.obj .text: undefined reference to 'c_1'
vlc_pr_v1_b19.obj .text: undefined reference to 'Phi_x_t'
vlc_pr_v1_b19.obj .text: undefined reference to 'MaxTorqueRequest'
vlc_pr_v1_b19.obj .text: undefined reference to 'dc_e'
vlc_pr_v1_b19.obj .text: undefined reference to 'Delay'
gmake: *** [../VLC_PR_v1_b19.exe] Error 43
C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\Users\Andrey\Documents\MATLAB\VLC\VLC_PR_v1_b19_ert_rtw>An_error_occurred_during_the_call_to_make
"An_error_occurred_during_the_call_to_make" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
### Build procedure for model: 'VLC_PR_v1_b19' aborted due to an error.
Error:Error(s) encountered while building "VLC_PR_v1_b19":
### Failed to generate all binary outputs.

Answers (1)

Mark McBroom
Mark McBroom on 12 Nov 2017
Although part of the error text is not readable, it looks like problem is related to parameters used in the model. It looks like you have the parameters set up to be ImportedExtern? If so, then you will need to create a hand written .c file that defines these parameters and then reference this C file on the Custom Code tab of the configuration parameters for Simulink Coder/Embedded Coder.
  1 Comment
N/A
N/A on 13 Nov 2017
Apologize for the unreadable error message. You are right, I'm using an ImportedExtern. So, you mean, that I should create the c file with all parameters definition (including data types and so on), am I correct?

Sign in to comment.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!