Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: No COM port

  1. #1
    Junior Member
    Join Date
    Dec 2017
    Location
    Ohio
    Posts
    6

    No COM port

    I've just installed the Beta version of Teensyduino 1.41 with the Teensy 3.5. I'm using Win 7 and Rel. 1.8.5 of the Arduino IDE. It appears that the installation of the Teensyduino software was successful, as I can see them listed in the Boards section of the IDE. My problem is that there is no COM port list and that menu Option is greyed out. I am also getting this error message:

    Archiving built core (caching) in: C:\Users\econjack\AppData\Local\Temp\arduino_cache _769301\core\core_teensy_avr_teensy35_usb_serial,s peed_120,opt_o2std,keys_en-us_3e0515dfaad153553690f968527624f2.a
    exec: "E:\\Arduino1.8.5\\hardware\\teensy/../tools/teensy_post_compile": file does not exist
    Error compiling for board Teensy 3.5.


    The IDE is installed on my E drive in a root directory named Arduino1.8.5. If I switch away from the Teensy and connect a Mega 2560 Pro Mini and select it from the Board menu option, the Port option allows me to select, compile, upload, and run a program. I've read a number of posts on this subject, but none seem to have made any difference.

  2. #2
    Moderator Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,146
    First, wasn’t there an additional serial driver to install to fix a problem in Win7? Second, the compiler complains about a missing file. Thus, something went obviously wrong with your Teensyduino installation (which could also explain the missing serial patch). Do you run antivirus software? If yes, my guess is that is has quarantined some Teensyduino files by mistake. Deactivate the antivirus and do again a Teensyduino install over the existing one to add the missing stuff.

  3. #3
    Junior Member
    Join Date
    Dec 2017
    Location
    Ohio
    Posts
    6
    I'm not sure about the serial driver, but my Driver Manager says the driver is up to date. I do have antivirus software running, so I turn that off, reinstall and see what happens.

    Merci! Thanks for pointing in the right direction!

  4. #4
    Junior Member
    Join Date
    Dec 2017
    Location
    Ohio
    Posts
    6
    I did as you suggested and a COM port was available. I wrote a short program:

    Code:
    void setup() {
      // put your setup code here, to run once:
      Serial.begin(9600);
      Serial.println("Hello World");
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    }
    and it compiled and ran it, but with no output! I moved the println() call to loop(), and it works as expected. It this because the Teensy is so much faster than the stock Arduinos that the Serial port isn't available until after the call is processed?

  5. #5
    Moderator KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,220
    note: the teensy is a lot faster than most old boards like Arduino UNO and the USB serial is handled differently than an UNO. The Uno has a different chip that does the USB stuff which then talks to a hardware serial port on the AVR processor. On the Teensy (like the Arduino Leonardo) the USB is handled by the processor chip...

    So your host board will take awhile to initialize it's serial port for when a new device arrives. So you typically either need to wait a bit before you output text or see if the Serial port is valid.

    So for programs like this, I will often do the code something like:
    Code:
    void setup() {
      // put your setup code here, to run once:
      while (!Serial && (millis() < 2000)) ;
      Serial.begin(9600);
      Serial.println("Hello World");
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    }
    The while loop I put at the start will wait up to 2 seconds for the Serial port to be created and detected before it tries to output to the USB

  6. #6
    Junior Member
    Join Date
    Dec 2017
    Location
    Ohio
    Posts
    6
    I have seen code similar to that for the Due.

    Thanks, Kurt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •