Announcement

Collapse
No announcement yet.

Upload problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Hi,

    Glad it's working for you now. Nice work.

    Best regards

    Paul

    Comment


    • #32
      So if I understand this whole thread, the final solution to the OP's problem was to get an actual Windows machine? What if I dont have access to a Windows machine? I bought the 4duino because on the site it said we could use a Virutal Machine with WS and upload to the board. I am experiencing the exact same issue. I have a Mac. Uploading to the 4duino from Arduino IDE on the Mac OS works successfully. No problems there. Running Windows 10 under Virtualbox, Windows does see the 4Duino. In the Arduino IDE running in Windows 10 on the VM, I have the board set to 4Duino - 2.4, and it sees it plugged into COM3. I go to Tools->Get Board Info and it does talk to the board and retrieves the information. When I try to upload any sketch, and I mean any sketch at all to the board, as soon as the IDE starts to upload to the board, the board resets, Windows loses COM3, and the IDE throws an error saying it cannot get to COM3. So I want to use workshop, and since they dont have a Mac version (shame on you) I have to use a VM which your site said it could do. So is there any other solution besides me having to go buy a Windows machine just to run WS?

      Comment


      • #33
        The other OP seems to have gone away.

        When you upload a sketch from Workshop it uses Arduino (in the windows VM).

        (It also does the same thing when you use tools->Get Board)

        So, if you use the Arduino IDE in the Windows VM, can you program the board?

        Really, the problem seems to be the Arduino IDE, not Workshop.
        Mark

        Comment


        • #34
          Apple had some pretty serious driver bugs with El Capitan, is this the version you have?.

          Fortunately, everything seems to be fixed in the latest Sierra.

          Try to see if theres any updates for your OSX.

          Also besides the VM it would also be a good idea to test BOOTCAMP as windows will have complete control of the serial port rather than the macos controlling the hardware outside of the VM

          Tony

          Comment


          • #35
            Also, try programming the board from the Arduino IDE on Windows VM with the following Scenarios

            Workshop running.

            Workshop not running.

            And let us know the results
            Mark

            Comment


            • #36
              I have tried programming from the Arduino IDE, WS running and not running, it fails. I then just tried uploading the blink program to a standard Arduino Uno. It failed. So here is what is happening as I have figured it. The USB port mapping to the Virtual Machine is working. That is why I can retrieve the board information. However, when it goes to upload, the Arduino IDE does a reset on the board. If the board you are trying to program is using a real life FTDI serial to USB bridge chip, then host can use actual serial communications to talk to that bridge chip and all would be fine. However, looking at the schematic for the 4duino, it is not using an FTDI chip. Instead, the 4Duino, and all of the newer Arduino boards themselves, have intrinsic USB controllers and present themselves to the USB bus as a serial bridge, but the serial communications never actually go over a wire. Serial streams to the board are just directly converted to packets and sent over the USB. The problem is when the processor is reset, the USB stack vanishes as the USB bus disconnects. During the restart, the board reconnects to the bus and enumeration and negotiation start anew. This means that every time the device is reset, the port will disappear and reappear. The reason why this is bad is that this confuses VirtualBox because the pipe it had open and forwarding to Windows disappears and doesnt reestablish the link automatically.

              So after doing all my tests, unless VirtualBox comes up with a way to monitor and automatically reconnect on a dropped stack, the arduino cant be programmed from VM Windows machine.

              So now I am still at the problem of wanting to use Workshop, but it is only a windows app (shame on you for that) so I still have to run it in a VM. I have not tried using BOOTCAMP because I dont want to just run windows while working on this. I multitask and will do other things while working on Workshop and running just windows via BOOTCAMP would not let me do that. So for me at least, BOOTCAMP is not an option. So my question now is, is there a procedure, and if so what is it, to use Workshop to design my project, save it out, and then move whatever files I need to whereever they need to go and then use my native mac arduino IDE to program the 4duino? Basically instructions on how to take the output of Workshop and manually program the 4duino wihtout using Workshop to program it.

              Comment


              • #37
                Hi,

                There is a method to achieve this using both Workshop and the Arduino IDE. You can create the project as you normally would by adding widjets to the object inspector and writing the code etc.When finished, click on compile you will be prompted to save if it is a new project, if so save and you will see the graphics being generated. Insert your SD card when prompted and then Workshop will attempt to compile and fail. At this point go to the directory where your project is saved. Open the arduino ino file that you see in this directory by double clicking it and launching the Arduino ide. At this stage you should simply be able to compile it and upload it to the 4Duino.

                I hope this helps.

                Best regards

                Paul

                Comment


                • #38
                  not sure if it works but
                  have you tried crossover mac or wine to see if arduino/workshop can run on mac in compatibility mode?

                  Comment


                  • #39
                    The action you have described is the way Arduino works 'normally' on USB type devices, eg the Leonardo. The reset actually causes the port to disappear and reappear as a different device, which the Arduino IDE then grabs and programs. So I'm thinking there's two possible scenarios. A) Virtual box has not been told to 'passthrough' the second vid/pid to the VM (how have you got this part set up?) or B) The latency of a) in the VM is causing the IDE to time out its upload (I can't google up this scenario, so either Leonardos are pretty rare, of the real problem is A).

                    For your last sentence, if you do a 'Compile' in the Workshop IDE it will do everything necessary for it, copy the files to uSD when prompted. In your VM share the project folder with the MAC. Then open the .ino file in the Arduino IDE on the MAC and program it from there.
                    Mark

                    Comment


                    • #40
                      Well, I finally got an acceptable working scenario for me. My answer was to use VMWare Fusion instead of Virtualbox. VMWare fusion doesnt have the issue with disappearing port. I am able to fully design and program now in Workshop using Fusion. I prefer Virtualbox over Fusion as Fusion is a bit more resource intensive than VB, but it works with WS and I can continue. Thanks for all replies.

                      Comment


                      • #41
                        Hello,

                        That is great news and thank you for sharing the solution with us.

                        Best regards

                        paul

                        Comment


                        • #42
                          I thought I would follow up on this and share for the sake of any other Mac Users out there. As stated previously in this thread there is an issue running Virtualbox and having Workshop upload to the 4Duino. And as stated previously, I have been able to get everything to work using VMWare Fusion. However, after working with Fusion for a while, there are some issues with it. About 50% of the time it will fail trying to upload to the board, or doesnt see the USB connection and then you have to unplug and plug it in. In short, it isnt very stable.

                          So I decided to abandon the idea of programming from the VM altogether, use workshop to generate the files for the SD card and the ino sketch, then go back to Mac Native Arduino IDE to do the compilation and the upload. The downside to that is that after every little tweak, you have to compile on WS, copy the generated files to SD, bring up the IDE in native Mac (you have to bring it up new every time because the Arduino IDE doesnt recognize outside changes to the file), compile and then program the board. Quite a pain in the butt! The upside is, when you make tweaks to the widgets in Workshop, then workshop will automatically update the parameters for the widget in the sketch. The Workshop IDE needs a bunch of work for it to become usuable on a regular basis like brace syntax highlighting, brace auto completion, code completion, code folding, basic syntax checking, not allow the cursor to go outside EOL, basic stuff that is really a requirement in IDE's for today. Right now the Workshop IDE is not up to par for that, however just the integration of working with the widgets makes it needed for use with the 4duino.

                          So, my final solution. I use VirutalBox VM running Windows 10 LTSB and setup a shared folder between it and the Mac osx. I set the workshop project folder to be within that shared folder. I then do all the widget and graphical design in workshop. Next step is to compile in Workshop but dont upload. After that is done, I go to a Mac osx terminal window. I change directory into the project folder within the shared folder. I copy the generated .dat and .gci files to the SD card (in this example the SD card has a title of NO NAME) with this command:

                          Code:
                          cp *.dat *.gci /Volumes/NO\ NAME
                          After the file get copied, I do the compiling and uploading with a single command from the command line as thus:

                          Code:
                          /Applications/Arduino.app/Contents/MacOS/Arduino --board "4D Systems:avr:duino4" --port /dev/cu.usbmodem241231 --upload PorjectName.ino
                          This will compile and program the 4duino is one single motion. It will not launch the GUI part of Arduino IDE except for only the splash screen. You dont have to refresh the editor or anything. It just works.

                          So Design in Workshop, compile in Workshop, copy to SD on Mac, compile and upload from command line on Mac.

                          After I get the widgets done and I dont have any more garphical components to edit, I then fire up the Mac Arduino IDE and finish off the rest of the programming in there because it has a much more usable IDE for programming than the workshop. The Workshop IDE is a really good start, and hopefully their programmers will start making it a little more robust in future releases.

                          I hope this helps someone trying the same thing I was.

                          }Dan

                          Comment


                          • #43
                            Thanks for the update.

                            Have you ever tried running crossover on the Mac thus running workshop on the Mac?

                            I'd be interested in knowing if that solution works and how well.
                            Mark

                            Comment


                            • #44
                              No, I have never tried running crossover on the Mac, however since you asked nicely......

                              I installed crossover and attempted to install Workshop. The installer completed successfully however upon running Workshop, it failed right away with the call stack showing InvalidGraphic. I didnt go further in depth than that. Didnt want to open proverbial can of worms troubleshooting that.

                              }Dan

                              Comment


                              • #45
                                Thanks for trying. I wonder if crossover has some sort of option, something like 'enable GDI+ extended graphics', or the like? (one of the 'windows emulators' for Unix used to need an addon installed to 'support' GDI+)
                                Mark

                                Comment

                                Working...
                                X