Possible bug found in listArduinoLibraries()

Greetings,
I have followed the tutorial for the creation of a HelloWorld Arduino Addon Library. Upon completion I was unable to get the addon to register so I subsequently followed the documention for Custom Arduino Library Issues.
1.
clear classes
2.
rehash toolboxcache
Produces a warning:
Warning: Function license has the same name as a MATLAB built-in. We suggest you rename the function to avoid a potential name conflict.
3.
lib = listArduinoLibraries();
Produces a list of warnings and errors
Warning: The following error was caught while executing 'onCleanup' class destructor:
Output argument "status" (and possibly others) not assigned a value in the execution with "matlabshared.ddux/HWSDKDataUtility/dataUpdateImpl" function.
Error in matlabshared.internal.DataUtility/dataUpdate
Error in matlabshared.ddux.HWSDKDataUtilityHelper/integrateData
Error in listArduinoLibraries>@()integrateData(dduxHelper) (line 17)
c = onCleanup(@()integrateData(dduxHelper));
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in onCleanup/delete (line 25)
obj.task();
^^^^^^^^^^
Error in listArduinoLibraries (line 72)
end
^
And of course, my HelloWorld addon doesn't register. Perhaps this potential bug might be the cause?
Cheers,

4 comentarios

Les Beckham
Les Beckham el 4 de Dic. de 2024
Editada: Les Beckham el 5 de Dic. de 2024
If you see more than one entry when you execute this command at the Matlab command line, you should rename any that don't match what is shown below.
which -all license
built-in (/MATLAB/toolbox/local/license)
Or this, if you are on Windows (example with release 2024b):
built-in (C:\Program Files\MATLAB\R2024b\toolbox\local\license)
Clayton Allen
Clayton Allen el 5 de Dic. de 2024
I'm starting to believe this issue is restricted to Matlab Online. It doesn't do this on my PC at home. And these symptoms did not start until I attempted to rehash...
Les Beckham
Les Beckham el 5 de Dic. de 2024
Interesting. Did you try which -all license in Matlab Online? The error messages that you showed seemed to indicate an issue with that command.
/MATLAB/toolbox/matlab/connector2/shadowfiles/shadows/license/license.m
built-in (/MATLAB/toolbox/local/license) % Shadowed

Iniciar sesión para comentar.

Respuestas (1)

Sreeram
Sreeram el 11 de Dic. de 2024
Hi Clayton,
I also encountered the same warnings and errors when callinglistArduinoLibraries()in MATLAB Online.
I fixed it by running the following snippet before calling listArduinoLibraries():
system('mkdir -p overloads/+matlab/+ddux/+internal');
system (['echo -e "function status = logData(identification, varargin) \\n status = true; \\n end" > overloads/+matlab/+ddux/+internal/logData.m']);
addpath('./overloads');
Regarding warning about license, I remember seeing in an older documentation of “rehash” that this functionality was not supported in MATLAB Online. This might be contributing to the unexpected behaviour.

Categorías

Más información sobre Arduino Hardware en Centro de ayuda y File Exchange.

Productos

Versión

R2024b

Preguntada:

el 3 de Dic. de 2024

Respondida:

el 11 de Dic. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by