gmake trying to use folder that doesn't exist?

조회 수: 10 (최근 30일)
hannah
hannah 2024년 11월 16일
답변: BhaTTa 2025년 4월 15일
Hello,
Sorry if this is a silly question, I am very new to using simulink. I'm trying to run the sample lcdsimpletext program that comes with the arduino liquid crystal display library to check if I've wired my lcd correctly, but every time I try and run it on my arduino uno it gives an error of 2. I think this is because it's trying to search in the libraries folder in the aCLI folder which doesn't exist. I've tried deleting and reinstalling the add on to see if it would fix it but it doesn't. How do I fix this? Is there a way of changing what folder simulink searches in to run that library?
Here's the full build log if it helps:
"### Generating static library." "C:/Program Files/MATLAB/R2024b/bin/win64/gmake" -j9 -C "C:/PROGRA~3/MATLAB/SUPPOR~1/R2024b/toolbox/target/SUPPOR~1/ARDUIN~1/STATIC~1" SHELL="%SystemRoot%/system32/cmd.exe" -f avrcore.mk all gmake[1]: Entering directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2024b/toolbox/target/SUPPOR~1/ARDUIN~1/STATIC~1' "### Successfully generated libcore.a library." gmake[1]: Leaving directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2024b/toolbox/target/SUPPOR~1/ARDUIN~1/STATIC~1' "C:/Program Files/MATLAB/R2024b/bin/win64/gmake" -j9 SHELL="%SystemRoot%/system32/cmd.exe" -f "lcdsimpletext.mk" all gmake[1]: Entering directory `C:/Users/Hanna/AppData/Roaming/MathWorks/MATLAB Add-Ons/Collections/Simulink library for Arduino Liquid Crystal Display/lcdsimpletext_ert_rtw' gmake[1]: Leaving directory `C:/Users/Hanna/AppData/Roaming/MathWorks/MATLAB Add-Ons/Collections/Simulink library for Arduino Liquid Crystal Display/lcdsimpletext_ert_rtw' gmake[1]: *** No rule to make target `C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/libraries/LiquidCrystal/src/LiquidCrystal.cpp', needed by `LiquidCrystal.o'. Stop. gmake: *** [all] Error 2 The make command returned an error of 2 ### Build procedure for lcdsimpletext aborted due to an error.

답변 (2개)

Kanishk
Kanishk 2024년 11월 19일
The issue you're encountering arises from gmake searching for a library folder in an incorrect location. The "libraries" folder is located within the "aCLI/user" directory, with the full path being:
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/user/libraries
As the “Simulink library for Arduino Liquid Crystal Display” add-on is only compatible for R2018a to R2019a, as mentioned on the add-ons page, a modification is needed for it to work in R2024b. This involves editing the “LCD.m” file located at:
“C:\Users\<username>\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Simulink library for Arduino Liquid Crystal Display\Arduino_LCD_Driver\+LiquidCrystalDisplay\+block”
Please update line 85 of the file by modifying the “fullfile” function to include "user" folder, as follows:
libpath = fullfile(codertarget.arduinobase.internal.getArduinoIDERoot('libraries'), 'user', 'libraries','LiquidCrystal');
Additionally, please delete the folders generated by Simulink during code generation, specifically “lcdsimpletext_ert_rtw” and “slprj”. Removing these folders should allow Simulink to generate the code without any errors.
Alternatively, you can follow this official MathWorks documentation to create an LCD Add-on for Arduino when using later releases.
Hope this helps!
Thanks
  댓글 수: 1
hannah
hannah 2024년 11월 19일
Thank you, but the issue was it was putting the libraries folder on my google drive for some reason when i was installing it instead of actually on my c drive, so I just moved the folder and it seems to have fixed it :)

댓글을 달려면 로그인하십시오.


BhaTTa
BhaTTa 2025년 4월 15일
Hey @hannah, i was facing similiar kind of issue, where i used to see this error "Error:The path 'aCLI/user/libraries' does not exist" when i tried to use IODB to model DHT11 sensor, installing realted support package solved the issue (in my case it was Simulink Support package for arduino)

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by