Can I deploy a Simulink model to Arduino using ICSP instead of USB?

5 visualizaciones (últimos 30 días)
I will be producing multiple newly design boards and programming their processors with my Simulink model.
The prototype has a USB port on the Arduino board through which we load our Simulink model coded in C.
Can I upload the model to the board through an ICSP connection rather than a USB connection?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 10 de Feb. de 2020
As of Simulink R2019b, there's no way to directly flash an Arduino board using MATLAB/Simulink with ICSP, but there's a workaround that may be suitable.
When you build a model using Simulink, a hex file is generated for AVR targets. This file is generated in the same folder as the model with the same name as model.
For example for arduino_gettingstarted.slx model, a file called arduino_gettingstarted.hex will be generated.
This hex file can be deployed to the target without connecting the USB port.
For example, to deploy the generated file to Arduino Nano using Arduino Uno as ISP, you can run the following command in Windows Command Prompt:
C:\Arduino\R2019b\arduino-1.8.10\hardware\tools\avr/bin/avrdude -CC:\Arduino\R2019b\arduino-1.8.10\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM76 -b19200 -Uflash:w:C:\Users\USERNAME\AppData\Local\Temp\test\arduino_gettingstarted.hex:i
The command above is for example only.

Más respuestas (0)

Categorías

Más información sobre Arduino Hardware en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by