S Function Builder Error.
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I was trying to build a simulink model using S function Builder to read DS18B20 sensor data from arduino. Getting this error when I try to run it on hardware.
### Starting build procedure for: DS18B20_Model ### Generating code and artifacts to 'Model specific' folder structure ### Generating code into build folder: E:\Program Files\DS18B20\DS18B20_Model_ert_rtw ### Invoking Target Language Compiler on DS18B20_Model.rtw ### Using System Target File: E:\Program Files\Polyspace\R2020a\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 DS18B20_Model_types.h ### Writing header file DS18B20_Model.h ### Writing header file rtwtypes.h ### Writing header file multiword_types.h . ### Writing source file DS18B20_Model.c ### Writing header file DS18B20_Model_private.h ### Writing header file rtmodel.h ### Writing source file ert_main.c ### TLC code generation complete. ### Generating TLC interface API. .. ### Creating data type transition file DS18B20_Model_dt.h .### Evaluating PostCodeGenCommand specified in the model ### Using toolchain: Arduino AVR ### Creating 'E:\Program Files\DS18B20\DS18B20_Model_ert_rtw\DS18B20_Model.mk' ... ### Building 'DS18B20_Model': "E:\Program Files\Polyspace\R2020a\bin\win64\gmake" MATLAB_ROOT=%MATLAB_ROOT% ALT_MATLAB_ROOT=%ALT_MATLAB_ROOT% MATLAB_BIN=%MATLAB_BIN% ALT_MATLAB_BIN=%ALT_MATLAB_BIN% -f wrapper.mk all
E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>call "\\DESKTOP-1VNNIKF\E$\Program Files\Polyspace\R2020a\bin\win64\checkMATLABRootForDriveMap.exe" "\\DESKTOP-1VNNIKF\E$\Program Files\Polyspace\R2020a" 1>mlEnv.txt E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>for /F %a in (mlEnv.txt) do set "%a"\n E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>set "MATLAB_ROOT=F:"\n E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>set "ALT_MATLAB_ROOT=F:"\n E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>set "MATLAB_BIN=F:\bin"\n E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>set "ALT_MATLAB_BIN=F:\bin"\n E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>cd . E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>if "" == "" ("E:\Program Files\Polyspace\R2020a\bin\win64\gmake" MATLAB_ROOT=F: ALT_MATLAB_ROOT=F: MATLAB_BIN=F:\bin ALT_MATLAB_BIN=F:\bin -f wrapper.mk all ) else ("E:\Program Files\Polyspace\R2020a\bin\win64\gmake" MATLAB_ROOT=F: ALT_MATLAB_ROOT=F: MATLAB_BIN=F:\bin ALT_MATLAB_BIN=F:\bin -f wrapper.mk ) "### Generating static library." "E:/Program Files/Polyspace/R2020a/bin/win64/gmake" -j11 -C "C:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/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/R2020a/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1' "### Successfully generated libcore.a library." gmake[1]: Leaving directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1' "E:/Program Files/Polyspace/R2020a/bin/win64/gmake" -j11 SHELL="%SystemRoot%/system32/cmd.exe" -f "DS18B20_Model.mk" all gmake[1]: Entering directory `E:/Program Files/DS18B20/DS18B20_Model_ert_rtw' gmake[1]: Leaving directory `E:/Program Files/DS18B20/DS18B20_Model_ert_rtw' gmake[1]: *** No rule to make target `E:/Program', needed by `DS18B20_Model.o'. Stop. gmake: *** [all] Error 2 E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 E:\Program Files\DS18B20\DS18B20_Model_ert_rtw>exit 1
Error(s) encountered while building "DS18B20_Model":
### Failed to generate all binary outputs.
0 comentarios
Respuestas (1)
Benjamin Thompson
el 21 de En. de 2024
This part could mean that the compiler or linker is having trouble with the space in the path name:
No rule to make target `E:/Program'
Try moving all the files to a different folder that does not contain a space. Or edit the makefile to use the short name with no spaces "PROGRA~1" or something like that. There is possibly some confusion here between the C and E drives.
Use "dir /x" in a command shell to identify the short names of folders:
C:\>dir /x progra*
Volume in drive C is OS
Volume Serial Number is 5CB8-C16F
Directory of C:\
05/26/2023 03:31 AM <DIR> PROGRA~1 Program Files
09/09/2023 11:50 AM <DIR> PROGRA~2 Program Files (x86)
0 File(s) 0 bytes
2 Dir(s) 189,231,685,632 bytes free
C:\>
So if you are trying to use a flie in "C:\Program Files (x86)" then use the short name C:\PROGRA~2
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!