Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problems using Visual Micro to upload firmwate to Portenta Machine Control (Read 239 times)
Francesco14
Junior Member
**
Offline


Posts: 13
Joined: Mar 25th, 2014
Problems using Visual Micro to upload firmwate to Portenta Machine Control
Aug 1st, 2025 at 10:13am
Print Post  
Hi all,

I use Visual Micro extension for Visual Studio 2022 (both are updated to the latest available versions) to build and upload code to many Arduino boards.

In this period I am developing some pilot applications for the Portenta Machine Control (PMC) board (https://docs.arduino.cc/tutorials/portenta-machine-control/user-manual/); it is based on the Portenta H7 architecture.

Code compilation succeeds but the upload process fails systematically with the following output:

Code
Select All
Compiling 'OPTA-PMC_SerialRTU' for 'Arduino Portenta H7 (envie_m7)'
Build Folder: "file:///D:/Junk/VMBuilds/OPTA-PMC_SerialRTU/envie_m7/Release"

Uploading 'OPTA-PMC_SerialRTU' to 'Arduino Portenta H7 (envie_m7)' using 'COM13'
Uploader started for board Arduino Portenta H7 (envie_m7)
Upload method will be: bootloader
Uploading via Bootloader
uino1\dfu-util --device 0x2341:0x035b -D " -a0 --dfuse-address=0x08040000:leave
dfu-util 0.10-dev
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
The uploader process failed
Warning: Invalid DFU suffix signature
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
A valid DFU suffix will be required in a future dfu-util release
This program is Free Software and has ABSOLUTELY NO WARRANTY
No DFU capable USB device available
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
 



The same sketch compiled with the Arduino IDE for the same board connected to the same USB port is correctly uploaded with the following output:

Code
Select All
Performing 1200-bps touch reset on serial port COM13
Waiting for upload port...
Upload port found on COM14
duino1/dfu-util" --device 0x2341:0x035b -D PTA-PMC_SerialRTU.ino.bin" -a0 --dfuse-address=0x08040000:leave
dfu-util 0.10-dev

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
Device ID 2341:035b
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash  2MB   "
Downloading element to address = 0x08040000, size = 204860

Erase 	  [                         ]   0%            0 bytes
Erase 	  [                         ]   0%            0 bytes
Erase 	  [=                        ]   5%        12288 bytes
Erase 	  [==                       ]   9%        20480 bytes
Erase 	  [===                      ]  13%        28672 bytes
Erase 	  [====                     ]  17%        36864 bytes
Erase 	  [=====                    ]  21%        45056 bytes
Erase 	  [======                   ]  25%        53248 bytes
Erase 	  [=======                  ]  29%        61440 bytes
Erase 	  [========                 ]  33%        69632 bytes
Erase 	  [=========                ]  37%        77824 bytes
Erase 	  [==========               ]  41%        86016 bytes
Erase 	  [===========              ]  45%        94208 bytes
Erase 	  [============             ]  49%       102400 bytes
Erase 	  [=============            ]  53%       110592 bytes
Erase 	  [==============           ]  57%       118784 bytes
Erase 	  [===============          ]  61%       126976 bytes
Erase 	  [===============          ]  63%       131072 bytes
Erase 	  [================         ]  65%       135168 bytes
Erase 	  [=================        ]  69%       143360 bytes
Erase 	  [==================       ]  73%       151552 bytes
Erase 	  [===================      ]  77%       159744 bytes
Erase 	  [====================     ]  81%       167936 bytes
Erase 	  [=====================    ]  85%       176128 bytes
Erase 	  [======================   ]  89%       184320 bytes
Erase 	  [=======================  ]  93%       192512 bytes
Erase 	  [======================== ]  97%       200704 bytes
Erase 	  [=========================] 100%       204860 bytes
Erase    done.

Download	[                         ]   0%            0 bytes
Download	[=                        ]   5%        12288 bytes
Download	[==                       ]   9%        20480 bytes
Download	[===                      ]  13%        28672 bytes
Download	[====                     ]  17%        36864 bytes
Download	[=====                    ]  21%        45056 bytes
Download	[======                   ]  25%        53248 bytes
Download	[=======                  ]  29%        61440 bytes
Download	[========                 ]  33%        69632 bytes
Download	[=========                ]  37%        77824 bytes
Download	[==========               ]  41%        86016 bytes
Download	[===========              ]  45%        94208 bytes
Download	[============             ]  49%       102400 bytes
Download	[=============            ]  53%       110592 bytes
Download	[==============           ]  57%       118784 bytes
Download	[===============          ]  61%       126976 bytes
Download	[===============          ]  63%       131072 bytes
Download	[================         ]  65%       135168 bytes
Download	[=================        ]  69%       143360 bytes
Download	[==================       ]  73%       151552 bytes
Download	[===================      ]  77%       159744 bytes
Download	[====================     ]  81%       167936 bytes
Download	[=====================    ]  85%       176128 bytes
Download	[======================   ]  89%       184320 bytes
Download	[=======================  ]  93%       192512 bytesWarning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release

Download	[======================== ]  97%       200704 bytes
Download	[=========================] 100%       204860 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
 



I also tried to launch VS with administrative privileges, but the upload to PMC always fails.

May I ask for some help with this problem?

Is there any other user who uses VM to compile/upload code for/to a PMC?

Any help wil be appreciated.

Cheers.

Francesco - Italy
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2758
Joined: Feb 13th, 2019
Re: Problems using Visual Micro to upload firmwate to Portenta Machine Control
Reply #1 - Aug 1st, 2025 at 10:21am
Print Post  
Thanks for the report.

While we investigate this can you confirm that manually putting the board into Upload mode allows the upload to succeed in Visual Micro (double tap the reset button should trigger Manual Upload Mode).
  
Back to top
IP Logged
 
Francesco14
Junior Member
**
Offline


Posts: 13
Joined: Mar 25th, 2014
Re: Problems using Visual Micro to upload firmwate to Portenta Machine Control
Reply #2 - Aug 1st, 2025 at 10:53am
Print Post  
Yes, manually putting the card into upload mode solves the problem: the upload process completes successfully!
I wasn't aware of this workaround.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2758
Joined: Feb 13th, 2019
Re: Problems using Visual Micro to upload firmwate to Portenta Machine Control
Reply #3 - Aug 1st, 2025 at 11:27am
Print Post  
If you add a Local Board.txt to the project (vMicro > Add Code > Add Local Board.txt) and add the below content, this should ensure the upload works correctly:

Code (C++)
Select All
upload.use_1200bps_touch=true
vm.1200bps_touch.SetDTRFalse=true 

  
Back to top
IP Logged
 
Francesco14
Junior Member
**
Offline


Posts: 13
Joined: Mar 25th, 2014
Re: Problems using Visual Micro to upload firmwate to Portenta Machine Control
Reply #4 - Aug 1st, 2025 at 4:02pm
Print Post  
Yes, also this workaround works well! This is the result of the compile/upload command:

Code
Select All
Compiling 'OPTA-PMC_SerialRTU' for 'Arduino Portenta H7 (envie_m7)'
Build Folder: "file:///D:/Junk/VMBuilds/OPTA-PMC_SerialRTU/envie_m7/Release"


Uploading 'OPTA-PMC_SerialRTU' to 'Arduino Portenta H7 (envie_m7)' using 'COM13'
Uploader started for board Arduino Portenta H7 (envie_m7)
Upload method will be: bootloader
Uploading via Bootloader
PORTS {COM13} / {COM13} => {}
PORTS {COM13} / {COM13,COM14} => {COM14}
til\0.10.0-arduino1\dfu-util --device 0x2341:0x035b -D " -a0 --dfuse-address=0x08040000:leave
dfu-util 0.10-dev
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
Device ID 2341:035b
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash  2MB   "
Downloading element to address = 0x08040000, size = 205348
Erase 	  [                         ]   0%            0 bytes
Erase 	  [                         ]   0%            0 bytes
Erase 	  [=                        ]   5%        12288 bytes
Erase 	  [==                       ]   9%        20480 bytes
Erase 	  [===                      ]  13%        28672 bytes
Erase 	  [====                     ]  17%        36864 bytes
Erase 	  [=====                    ]  21%        45056 bytes
Erase 	  [======                   ]  25%        53248 bytes
Erase 	  [=======                  ]  29%        61440 bytes
Erase 	  [========                 ]  33%        69632 bytes
Erase 	  [=========                ]  37%        77824 bytes
Erase 	  [==========               ]  41%        86016 bytes
Erase 	  [===========              ]  45%        94208 bytes
Erase 	  [============             ]  49%       102400 bytes
Erase 	  [=============            ]  53%       110592 bytes
Erase 	  [==============           ]  57%       118784 bytes
Erase 	  [===============          ]  61%       126976 bytes
Erase 	  [===============          ]  63%       131072 bytes
Erase 	  [================         ]  65%       135168 bytes
Erase 	  [=================        ]  69%       143360 bytes
Erase 	  [==================       ]  73%       151552 bytes
Erase 	  [===================      ]  77%       159744 bytes
Erase 	  [====================     ]  81%       167936 bytes
Erase 	  [=====================    ]  85%       176128 bytes
Erase 	  [======================   ]  89%       184320 bytes
Erase 	  [=======================  ]  93%       192512 bytes
Erase 	  [======================== ]  97%       200704 bytes
Erase 	  [=========================] 100%       205348 bytes
Erase    done.
Download	[                         ]   0%            0 bytes
Download	[=                        ]   5%        12288 bytes
Download	[==                       ]   9%        20480 bytes
Download	[===                      ]  13%        28672 bytes
Download	[====                     ]  17%        36864 bytes
Download	[====                     ]  19%        40960 bytes
Download	[=====                    ]  21%        45056 bytes
Download	[======                   ]  25%        53248 bytes
Download	[=======                  ]  29%        61440 bytes
Download	[========                 ]  33%        69632 bytes
Download	[=========                ]  37%        77824 bytes
Download	[==========               ]  41%        86016 bytes
Download	[===========              ]  45%        94208 bytes
Download	[============             ]  49%       102400 bytes
Download	[=============            ]  53%       110592 bytes
Download	[==============           ]  57%       118784 bytes
Download	[===============          ]  61%       126976 bytes
Download	[================         ]  65%       135168 bytes
Download	[=================        ]  69%       143360 bytes
Download	[==================       ]  73%       151552 bytes
Download	[===================      ]  77%       159744 bytes
Download	[====================     ]  81%       167936 bytes
Download	[=====================    ]  85%       176128 bytes
Download	[======================   ]  89%       184320 bytes
Download	[=======================  ]  93%       192512 bytes
Download	[======================== ]  97%       200704 bytes
Warning: Invalid DFU suffix signature
	The upload process has finished. via 'COM14'
Download	[=========================] 100%       205348 bytes
A valid DFU suffix will be required in a future dfu-util release
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state 



Could be possible to add it as part of a future update of Visual Micro?

Anyway, thanks for your resolutive support!

Cheers
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint