Announcement

Collapse
No announcement yet.

4Duino24: Error when trying to program with Arduino IDE and with Workshop.

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

  • 4Duino24: Error when trying to program with Arduino IDE and with Workshop.

    Hi,

    I have recently purchased a 4Duino-24 module and I am trying to learn how to use it. When I connect it to my Windows 10 computer using a microUSB cable the screen comes alive and shows SPE2 rev 1.4, PmmC rev 4.4 and Comms 200000.

    I have followed the instructions to add the URL https://www.4dsystems.com.au/media/d...ems_index.json to the Arduino IDE, version 1.8.1 and I can set the board to 4Duino 2.4" in the board manager..

    When I connect the board it connects via Com Port 6.



    I have tried to upload the 'Hello World' example program. When I try to compile it using Workshop, after setting the Comm Port to 6, I get the following error message.

    Forcing reset using 1200bps open/close on port COM6
    PORTS {COM6, } / {} => {}
    PORTS {} / {COM7, } => {COM7, }
    Found upload port: COM7
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM7 -b57600 -D -Uflash:w:C:\Users\Hugh\AppData\Local\Temp\Arduino4D200628171716553/Hello_World.ino.hex:i

    An error occurred while uploading the sketch
    Completed RC=1

    I get something similar when trying to upload the program using the Arduino IDE directly. The message says that it can't open Com Port 7.

    Some help would be much appreciated to get me started.

    Regards, Hugh

  • #2
    Hi Hugh

    Welcome to the forum.

    Could you please check the status of the com port associated in Device Manager. I have attached the 4Duino driver in case this is the issue.

    Best regards

    Paul
    Attached Files

    Comment


    • #3
      Hi Paul,

      Thanks for the quick reply. Device manager shows 'Teensy USB Serial (COM 6) as the only entry under Ports (COM & LPT).

      I normally have Teensyduino installed as an add-on to the Arduino IDE. However, I am using a fresh install of version 1.8.1 of the Arduino IDE as that seems to be the last version specified in the JSON file I added to the Arduino IDE. So, I don't know why it says Teensy USB Serial but there is no reference to COM 7 anywhere.

      Thanks for the driver - how do I install this?

      Regards, Hugh

      One more question. How do I change the serial speed from 200000 - as shown on the start-up splash screen - to another value?

      Regards again.

      Comment


      • #4
        Hi Hugh,

        Thanks for the update. It looks like the 4Duino hasn't been recognised.

        It may be your USB lead or you could try removing the USB cable and then insert it again to see if it gets recognised.

        To install the driver, unzip it to a directory. The port needs to show in Device Manager an if you can see it in the Ports entry. If it is there you need to right click on it and then Update driver and then 'Browse my computer for driver software' You can then navigate to where you unzipped the driver

        Best regards

        Paul

        Comment


        • #5
          Hi Paul,
          I have installed the driver following your instructions and now Device Manager shows the port as '4D Systems 4Duino (COM6)'.
          However, I still can't get the Hello World program to upload to the 4Duino. The output in Workshop 4 is as below. As far as I can tell, the program compiles just fine but then it won't upload. The computer 'pings' when I hit Comp'nLoad, after a couple of seconds the flash screen goes dark then another couple of seconds and there is another ping and the flash screen returns.
          I have also tried uploading the Blink sketch from the Arduino IDE examples, using the Arduino IDE rather than Workshop. The Tools menu shows
          Board: "4Duino - 2.4""
          Port: "COM6 (4Duino -2.4")"
          I am still at a loss to know what else to do.

          Regards Hugh
          Last Part of Output From Arduino IDE
          Sketch uses 4058 bytes (14%) of program storage space. Maximum is 28672 bytes.
          Global variables use 146 bytes (5%) of dynamic memory, leaving 2414 bytes for local variables. Maximum is 2560 bytes.
          avrdude: ser_open(): can't open device "\\.\COM7": Access is denied.
          Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
          Output From Workshop 4
          Detecting libraries used...
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_4DUINO -DARDUINO_ARCH_AVR -DUSB_VID=0x04D8 -DUSB_PID=0xF110 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="4D Systems 4Duino"' "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\cores\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\variants\4duino" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\sketch\Hello_World.ino.cpp" -o "nul"
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_4DUINO -DARDUINO_ARCH_AVR -DUSB_VID=0x04D8 -DUSB_PID=0xF110 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="4D Systems 4Duino"' "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\cores\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\variants\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\sketch\Hello_World.ino.cpp" -o "nul"
          Using cached library dependencies for file: C:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib\Picaso_Serial_4DLib.cpp
          Generating function prototypes...
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_4DUINO -DARDUINO_ARCH_AVR -DUSB_VID=0x04D8 -DUSB_PID=0xF110 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="4D Systems 4Duino"' "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\cores\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\variants\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\sketch\Hello_World.ino.cpp" -o "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\preproc\ctags_target_for_gcc_minus_e. cpp"
          "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\preproc\ctags_target_for_gcc_minus_e. cpp"
          Compiling sketch...
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_4DUINO -DARDUINO_ARCH_AVR -DUSB_VID=0x04D8 -DUSB_PID=0xF110 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="4D Systems 4Duino"' "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\cores\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\variants\4duino" "-IC:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\sketch\Hello_World.ino.cpp" -o "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\sketch\Hello_World.ino.cpp.o"
          C:\Users\Public\Documents\4D Labs\4Duino\Basic Graphics\Hello_World\Hello_World.ino: In function 'void loop()':

          C:\Users\Public\Documents\4D Labs\4Duino\Basic Graphics\Hello_World\Hello_World.ino:81:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

          Display.putstr("Hello World\r") ;

          ^

          Compiling libraries...
          Compiling library "Picaso_Serial_4DLib"
          Using previously compiled file: C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\libraries\Picaso_Serial_4DLib\Picaso_Seria l_4DLib.cpp.o
          Compiling core...
          Section deleted to get message under the 10000 character limit
          Linking everything together...
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4 -o "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/Hello_World.ino.elf" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\sketch\Hello_World.ino.cpp.o" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373\libraries\Picaso_Serial_4DLib\Picaso_ Seri al_4DLib.cpp.o" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/core\core.a" "-LC:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373" -lm
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/Hello_World.ino.elf" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/Hello_World.ino.eep"
          "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/Hello_World.ino.elf" "C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/Hello_World.ino.hex"
          Multiple libraries were found for "Picaso_Serial_4DLib.h"
          Used: C:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib
          Not used: C:\Program Files (x86)\Arduino\libraries\Picaso_Serial_4DLib
          Using library Picaso_Serial_4DLib in folder: C:\Users\Hugh\AppData\Local\Arduino15\packages\4D Systems\hardware\avr\1.8.1\libraries\Picaso_Serial_4DLib (legacy)
          Sketch uses 7738 bytes (26%) of program storage space. Maximum is 28672 bytes.
          Global variables use 410 bytes (16%) of dynamic memory, leaving 2150 bytes for local variables. Maximum is 2560 bytes.
          Uploading...
          Forcing reset using 1200bps open/close on port COM6
          PORTS {COM6, } / {} => {}
          PORTS {} / {COM7, } => {COM7, }
          Found upload port: COM7
          C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM7 -b57600 -D -Uflash:w:C:\Users\Hugh\AppData\Local\Temp\Arduino4D200629104029373/Hello_World.ino.hex:i

          avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
          Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
          Copyright (c) 2007-2014 Joerg Wunsch

          System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

          Using Port : COM7
          Using Programmer : avr109
          Overriding Baud Rate : 57600
          An error occurred while uploading the sketch
          Completed RC=1

          Comment


          • #6
            Hi Hugh,

            Is it possible that the TeensyDuino addon is the cause as COM6 was associted with the Teensy previously. The Teensy has a similar processor to the 4Duino for flashing the main processor would it help to remove the TeensyDuino addon.

            The version of Arduino IDE 1.8.1, you could upgrade this to the latest version also as it will be compatible with the 4Duino board 1.8.1 is quite a lot of versions behind the latest now.

            Best regards

            Paul

            Comment


            • #7
              Hi Paul,

              I was using the 1.8.13 version of the Arduino IDE with the Teensyduino add-on installed when I first started trying to use the 4Duino. However, I then deleted that version and installed 1.8.1 as that was the last version referenced in the JSON file. I didn't re-install the Teensyduino add on so I don't think that can be the cause. I have searched the Arduino emtry in Program Files (x86) and there is no mention of Teensyduino so it doesn't seem to be present anywhere. As I mentioned, after installing the driver you sent the port name changed to the correct one so I guess the previous mention of Teensyduino was just a hangover from the past.

              I am happy to try anything to get the 4Duino board working. Is there a simple program you can send for me to try uploading? I do have access to an ICSP programmer but at the moment I am reluctant to solder the ICSP header pins to the 4Duino board in case I have to return it to Hobby Components (the vendors). All my tests so far have just been done with the bare board and and microUSB cable.

              Regards, Hugh

              Comment


              • #8
                Hi Hugh,

                I was thinking it had something to do with the Teensy as the port was listed as a Teensy but I would assume now that since the Driver has been updated then this is now ok.

                I suppose it is possible that if the Teensy Driver was being used initially that the bootloader of the 4Duino could be corrupt. To put this back in you would have to use the ICSP header. It is sometimes possible to do this without soldering especially when you have the 6 pin header to hand, I slightly bend the short side of the pins so they make contact on the thru holes.

                To try this you will have to burn the bootloader with your ISP programmer and it will then be recognised as a Leonardo and then select the 4Duino board and upload the blink example and it will return to being recognised as a 4Duino.

                Best regards

                Paul

                Comment


                • #9
                  Hi Paul,

                  I tried reflashing the bootloader without soldering in the header pins but no joy. I can't tell if it didn't work due to bad connections or something more fundamental. Anyway, I bit the bullet and I have organised swapping the faulty 4Duino with a new one. Fingers crossed that solves all the issues.

                  Thanks for your support efforts, much appreciated.

                  Regards,
                  Hugh

                  Comment


                  • #10
                    Hi Hugh,

                    Thanks for the update, please let me know how you get on with the replacement.

                    Best regards

                    Paul

                    Comment

                    Working...
                    X