Connection error to arduino
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear mathworks team,
i have installed the Hardware support of Matlab and Simulink for Arduino. Then I downloaded the example code which is provided (included in attachment) and changed the board information (i am using an arduino micro). It builds fine:
### Starting build procedure for: arduino_gettingstarted ### Generated code for 'arduino_gettingstarted' is up to date because no structural, parameter or code replacement library changes were found. AVR Memory Usage ---------------- Device: atmega32u4 Program: 8884 bytes (27.1% Full) (.text + .data + .bootloader) Data: 552 bytes (21.6% Full) (.data + .bss + .noinit) ### Deployed code to target successfully ### Successful completion of build procedure for: arduino_gettingstarted
Build process completed successfully
Build Summary
Top model targets built: Model Action Rebuild Reason ================================================================================ arduino_gettingstarted Code compiled Compilation artifacts were out of date. 1 of 1 models built (0 models already up to date) Build duration: 0h 0m 6.049s
, however when trying to connect in external mode in order to monitor it fails with:
action: EXT_INIT Creating Target Handler (XCP on Serial)... Build directory: C:\Users\vic-b\Documents\Victors\Job\Biosim\Sim-Real-Learning\PythonMatlab - local\learning_matlab\Sine_wave_learning\arduino_gettingstarted_ert_rtw Serial Port Name: COM16 Baud Rate: 115200 action: EXT_CONNECT Connecting to the target...
External Mode Open Protocol Connect command failed
Caused by: DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable
Component:Simulink | Category:Block diagram error
What is my issue here?
As it is I cannot monitor the simplest model structures on an arduino micro.
Alternatively, changing Target hardware resources/External to Serial, the error message during connect is as mentioned here: https://www.mathworks.com/matlabcentral/answers/505329-why-do-i-get-an-error-about-a-missing-target-data-map-file-although-i-am-using-xcp-external-mode
Could not execute target data map file 'arduino_gettingstarted_ert_rtw\arduino_gettingstarted_targ_data_map' or it does not exist. Stop the target, delete the arduino_gettingstarted executable, rebuild the code, and try again. Note that execution of external mode requires the build directory to be present
0 comentarios
Respuestas (1)
Himanshu
el 23 de Feb. de 2024
Hey,
I understand that you are encountering an error when trying to connect in external mode to Arduino.
I had previously faced the same error as yours. To resolve this error, I changed the name of the Simulink model to be of shorter length. I can see that the model's name shared by you is also long. Making it shorter should resolve the issue.
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Arduino Hardware 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!