Sysprogs forums › Forums › VisualGDB › NanoEvery upload fails
- This topic has 10 replies, 2 voices, and was last updated 4 years, 5 months ago by vajoe.
-
AuthorPosts
-
June 22, 2020 at 16:27 #28474vajoeParticipant
I’ve been trying to upload the simple blink program to an NanoEvery. It never completes. Same board/same serial port works with the Arduino IDE – no issues. Any one have a clue as to what is going on?
Here’s a comparison of the commands used to do the upload:
VisualGDB:
C:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\bin\avrdude "-CC:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -patmega4809 -cjtag2updi -PCOM28 -b115200 -e -D "-Uflash:w:C:\Users\Joe\Documents\Ham\Arduino\NanoEvery\Blinker\Output\Arduino_Nano_Every\Debug/Blinker.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x00:m" upload.extra_files
results in
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
Arduino IDE:
C:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega4809 -cjtag2updi -PCOM28 -b115200 -e -D -Uflash:w:C:\Users\Joe\AppData\Local\Temp\arduino_build_284908/Blink.ino.hex:i -Ufuse2:w:0x01:m -Ufuse5:w:0xC9:m -Ufuse8:w:0x00:m {upload.extra_files}
I did notice the following message in the Arduino IDE before it’s command:
Forcing reset using 1200bps open/close on port COM28
I’m wondering if that has something to do with it.
I do close down which ever environment I’m not working with before the upload. So the COM port should be free.
Anyone have a suggestion?
Thanks
June 22, 2020 at 17:05 #28475supportKeymasterHi,
No problem, we can help you. VisualGDB should normally do the 1200 bps reset as well, as long as the Arduino configuration has the “upload.use_1200bps_touch” variable.
Please try enabling the View->Other Windows->VisualGDB Diagnostics Console window before you program the FLASH memory and then check if programming the FLASH adds the “Performing a 1200 bps reset sequence” line there. If not, please attach your CodeModel.json file from the VisualGDB cache directory so that we could see why it did not get enabled.
If the line appears in the log, please try running both VisualGDB and Arduino IDE’s command line manually from a command prompt window and check if they behave differently (e.g. different working directory or different position of quotes is causing problems).
June 22, 2020 at 18:23 #28476vajoeParticipantI wasn’t able to make the Arduino IDE work from the command line until I used putty to open and close the COM28 port at 1200 baud first. I then did the same for the VisualGDB command and it then worked worked. I also updated to the 5.5 (Preview 7, build 3666) to see if that fixed the problem. it did not.
Here’s the output from the diagnostics pane:
Initializing assemblies: 9 msec
Registering factories: 72 msec
Initializing VisualGDB 5.5.7.3666
Checking fonts/colors: 8 msec
Level 2 initialization: 554 msec
Unexpected Arduino variable name: upload.extra_files
Performing a 1200 bps reset sequence on COM28...
Run "C:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\bin\avrdude "-CC:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -patmega4809 -cjtag2updi -PCOM28 -b115200 -e -D "-Uflash:w:C:\Users\Joe\Documents\Ham\Arduino\NanoEvery\Blinker\Output\Arduino_Nano_Every\Debug/Blinker.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x00:m" upload.extra_files" in directory "" on local computer
Run "C:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\bin\avrdude "-CC:\Users\Joe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -patmega4809 -cjtag2updi -PCOM28 -b115200 -e -D "-Uflash:w:C:\Users\Joe\Documents\Ham\Arduino\NanoEvery\Blinker\Output\Arduino_Nano_Every\Debug/Blinker.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x00:m" upload.extra_files" in directory "" on local computer
avrdude: jtagmkII_getsync(): sign-on command: status -1
Unexpected exception: ------------------ System.OperationCanceledException ------------------
System.OperationCanceledException: The operation was canceled.
at z31.e(CommandLineAction a, vk1 d, String b, Nullable`1 c) </code>
<code>at z31.d.a(vk1 a) </code>
<code>at VisualGDB.Common_GUI.WPF.ItemizedProgressWindow.<>c__DisplayClass2_0`1.<RunAction>b__0()
trace=[z31.e:140, z31+d.a:0, VisualGDB.Common_GUI.WPF.ItemizedProgressWindow+<>c__DisplayClass2_0`1.<RunAction>b__0:0]
It seems there is something amiss in the 1200 bps reset since I can get the VisualGDB command in a CMD window if I first open and close the port at 1200bps.
I’ve attached the requested .json file.
June 22, 2020 at 18:25 #28477vajoeParticipantHere’s another try at the json (with .txt instead)
Attachments:
You must be logged in to view attached files.June 22, 2020 at 18:38 #28479supportKeymasterThanks, it looks like VisualGDB does try to use the 1200bps reset, but for some reason it doesn’t work. Unfortunately, we do not have the hardware on our side to retest it, so we would need you to do a few more checks.
Please try creating a basic C# command-line program and replace the main() contents with this:
using (var port = new System.IO.Ports.SerialPort("COMxxx") { BaudRate = 1200 }) { port.Open(); port.Close(); }
Does running this program manually put the board into a programmable state? If not, does sleeping between Open() and Close() ( Thread.Sleep(1000)) change anything?
If not does sending something to the port with setting port.Handshake = System.IO.Ports.Handshake.RequestToSend change anything?June 22, 2020 at 18:45 #28480vajoeParticipantAnd here’s a couple of serial port traces. One from a VisualGDB failure and another using putty and the visualGDB from the command line that worked.
Attachments:
You must be logged in to view attached files.June 22, 2020 at 18:53 #28482vajoeParticipantIt’ll be a while before I can do the C# command line program – I have to figure out how to do that. I don’t do much windows work. I use Visual Studio for cross compiling and the like,
June 22, 2020 at 19:10 #28483supportKeymasterNo problem, we can try creating it on our side and attaching the binary, however it will take 1-2 business days, as it will go through a different queue.
June 22, 2020 at 19:47 #28484vajoeParticipantAnd here’s the trace from the arduino IDE. Biggest differences seem to be in the handshaking setup.
Attachments:
You must be logged in to view attached files.June 23, 2020 at 03:35 #28490supportKeymasterWe have updated VisualGDB to match the relevant part of the log, however it may still work differently. Please try this build: VisualGDB-5.5.7.3689.msi
June 23, 2020 at 12:29 #28499vajoeParticipantWINNER! WINNER! CHICKEN DINNER!
It works. Thank you.
-
AuthorPosts
- You must be logged in to reply to this topic.