NanoEvery upload fails

Sysprogs forums Forums VisualGDB NanoEvery upload fails

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #28474
    vajoe
    Participant

    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

    #28475
    support
    Keymaster

    Hi,

    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).

     

    #28476
    vajoe
    Participant

    I 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.

    #28477
    vajoe
    Participant

    Here’s another try at the json (with .txt instead)

    Attachments:
    You must be logged in to view attached files.
    #28479
    support
    Keymaster

    Thanks, 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?

    #28480
    vajoe
    Participant

    And 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.
    #28482
    vajoe
    Participant

    It’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,

    #28483
    support
    Keymaster

    No 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.

    #28484
    vajoe
    Participant

    And 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.
    #28490
    support
    Keymaster

    We 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

     

    #28499
    vajoe
    Participant

    WINNER! WINNER! CHICKEN DINNER!

    It works.  Thank you.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.