Hi
when I want to programming the arduino Due this error is showing:
>> arduino
Updating server code on board Due (COM10). Please wait (might take a few minutes).
Cannot program board Due (COM10). Please make sure the board is supported and the port and board type are correct. For more
information, see Arduino Hardware Troubleshooting.

 Réponse acceptée

Madhu Govindarajan
Madhu Govindarajan le 14 Jan 2019

2 votes

Try the following and post any error messages that you get -
a = arduino('COM#','Due','TraceOn',true)
Remember the COM# should be the correct number of your Arduino Due. For instance - COM3, COM25 etc.

6 commentaires

john white
john white le 17 Jan 2019
ok thank you so much
I have written your code but it shows this error:
a = arduino('COM10','Due','TraceOn',true)
Updating server code on board Due (COM10). Please wait (might take a few minutes).
DPI detection failed, fallback to 96 dpi
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\arduino-builder -dump-prefs
-logger=machine -hardware
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\hardware -hardware
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages -tools
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\tools-builder -tools
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\hardware\tools\avr -tools
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages -built-in-libraries
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\libraries -libraries
C:\Users\leviusa90\Documents\Arduino\libraries -fqbn=arduino:sam:arduino_due_x_dbg -ide-version=10613 -build-path
C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW -warnings=null
-prefs=build.path=C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW -prefs=build.warn_data_percentage=75
-prefs=runtime.tools.bossac.path=C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\tools\bossac\1.6.1-arduino
-prefs=runtime.tools.arm-none-eabi-gcc.path=C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1
-verbose C:\Users\leviusa90\AppData\Local\Temp\ArduinoServer\ArduinoServer.ino
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\arduino-builder -compile
-logger=machine -hardware
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\hardware -hardware
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages -tools
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\tools-builder -tools
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\hardware\tools\avr -tools
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages -built-in-libraries
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\libraries -libraries
C:\Users\leviusa90\Documents\Arduino\libraries -fqbn=arduino:sam:arduino_due_x_dbg -ide-version=10613 -build-path
C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW -warnings=null
-prefs=build.path=C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW -prefs=build.warn_data_percentage=75
-prefs=runtime.tools.bossac.path=C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\tools\bossac\1.6.1-arduino
-prefs=runtime.tools.arm-none-eabi-gcc.path=C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1
-verbose C:\Users\leviusa90\AppData\Local\Temp\ArduinoServer\ArduinoServer.ino
Using board 'arduino_due_x_dbg' from platform in folder:
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7
Using core 'arduino' from platform in folder:
C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7
Detecting libraries used...
"C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++"
-c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param
max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -w -x c++ -E -CC -mcpu=cortex-m3 -mthumb
-DF_CPU=84000000L -DARDUINO=10613 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341
-DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Due"'
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\system/libsam"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\system/CMSIS/CMSIS/Include/"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\cores\arduino"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\variants\arduino_due_x"
"C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW\sketch\ArduinoServer.ino.cpp" -o "nul"
Generating function prototypes...
"C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++"
-c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param
max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -w -x c++ -E -CC -mcpu=cortex-m3 -mthumb
-DF_CPU=84000000L -DARDUINO=10613 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341
-DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Due"'
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\system/libsam"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\system/CMSIS/CMSIS/Include/"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\cores\arduino"
"-IC:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\arduino\hardware\sam\1.6.7\variants\arduino_due_x"
"C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW\sketch\ArduinoServer.ino.cpp" -o
"C:\Users\LEVIUS~1\AppData\Local\Temp\ArduinoServer\MW\preproc\ctags_target_for_gcc_minus_e.cpp"
exec:
"C:\\ProgramData\\MATLAB\\SupportPackages\\R2017a\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-g++":
file does not exist
Error compiling for board Arduino Due (Programming Port).
Madhu Govindarajan
Madhu Govindarajan le 17 Jan 2019
This looks like installation issue and something went wrong during download and install. Please try the following and if you still get the same error message reach out to MathWorks Technical support -
1) Uninstall MATLAB and SImulink Support package for Arduino.
2) Close MATLAB and reopen with administrator access. Right click on MATLAB icon and select Run as administrator.
3) Install MATLAB Support package for Arduino.
4) Try the command a = arduino('COM#','Due','TraceOn',true)
john white
john white le 17 Jan 2019
ok thank you so much for your answer and your spending time to answer me
madhan ravi
madhan ravi le 17 Jan 2019
Then accept his answer.
john white
john white le 17 Jan 2019
thanks for your notice , I have done

Connectez-vous pour commenter.

Plus de réponses (2)

madhan ravi
madhan ravi le 12 Jan 2019
Modifié(e) : madhan ravi le 12 Jan 2019

1 vote

Make sure the proper board (Arduino Uno or mini for example) and the port are selected.

7 commentaires

john white
john white le 12 Jan 2019
thanks for your answer
I'm sure that both of the port and board are correct but I don't know why this error is showing!
madhan ravi
madhan ravi le 12 Jan 2019
Are you using mac ?
john white
john white le 12 Jan 2019
No, I'm using windows 7
madhan ravi
madhan ravi le 12 Jan 2019
Did you download arduino support package?
john white
john white le 12 Jan 2019
yes of course and I could program on the Uno board but, with the Due one I couldn't
madhan ravi
madhan ravi le 12 Jan 2019
Modifié(e) : madhan ravi le 12 Jan 2019
Oh, I have experience with Uno and Mini but Due not , sorry
john white
john white le 12 Jan 2019
ok thank you so much

Connectez-vous pour commenter.

nguyen nhan tinh
nguyen nhan tinh le 25 Déc 2019
Modifié(e) : nguyen nhan tinh le 26 Déc 2019

0 votes

I have same this issue.
When i run cmd:
>> a = arduino('COM3','Due', 'TraceOn', true)
Updating server code on board Due (COM3). Please wait (might take a few minutes).
Loading configuration...
Initializing packages...
Preparing boards...
Error: sam: Unknown architecture
How to resolve it. I using Matlab 2017b with Win10 64bit
Thanks

3 commentaires

Madhu Govindarajan
Madhu Govindarajan le 26 Déc 2019
This means that the architecture necessary to program this board is missing. Try the following:
  1. Open Arduino IDE version supported by MATLAB. To open this IDE, type winopen(arduinoio.IDERoot) in MATLAB Command Window. Then open the Arduino Application in that folder.
  2. Go to Tools > Boards > Boards Manager.
  3. Search for ARduino Due here.
  4. The results should have Arduino SAM Boards. Check the version and install v 1.6.11 if not already done.
If this does not resolve your issue, contact MathWorks Technical Support.
nguyen nhan tinh
nguyen nhan tinh le 26 Déc 2019
Matlab worked.
Thanks for your support.
Walter Roberson
Walter Roberson le 26 Déc 2019
Thanks, Madhu Govindarajan .

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by