Compile errors: timeout/time.h/COM prot in use error

Post Reply
Mark
Posts: 1553
Joined: Thu Aug 06, 2015 9:19 am

Compile errors: timeout/time.h/COM prot in use error

Post by Mark » Wed Oct 21, 2015 3:53 pm

Compile errors: timeout/time.h/COM port is in use error

Note: if you use MAC OS and seeing this error, I suggest you to try win7 agian, some people had the same problem in MAC but can upload it successfully in win7! Also if you use Mac and didn't disconnect the printer from the repetier host when uploading your firmware, the arduino will give you "time out" error too.

1.timeout error
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
01.jpg
01.jpg (101.21 KiB) Viewed 13746 times

Possible solutions:
1.1Check the board type and COM port. You should select the correct board type here(example: GT2560):
02.jpg
02.jpg (211.87 KiB) Viewed 13746 times
03.jpg
03.jpg (190.26 KiB) Viewed 13746 times
1.2 Unplug all the other parts on the board except the USB cable, then try to upload it again, sometimes the I/O pins will be occupied by the other parts.

1.3 Check the crystal oscillator, see if there's bad contact or not, you can try to resolder it. I have test it with my board, remove it and it will get the timeout error. And the LCD will show two blocks when it is removed. The crystal oscillator might be damaged during the transportation or have empty solder.
04.jpg
04.jpg (206.69 KiB) Viewed 13746 times
05.jpg
05.jpg (98.83 KiB) Viewed 13746 times

1.4 ATmega bootloader
The AVR is not executing the bootloader for some reason. If the programmer is not resetting the micro before attempting to connect, this might be the reason. Try to reset the AVR (press and release the button) while the programmer is attempting to connect. Sometimes software that runs in a tight loop will prevent the bootloader from connecting.

you can refer to the link here to reburn the bootloader:
https://www.arduino.cc/en/Tutorial/Ardu ... y2_QfldW_s

2.Time.h error

Error of time.h when compiled with GT2560:
“qr_solve.cpp:7:18: fatal error: time.h: No such file or directory
#include <time.h>compilation terminated.Error compiling.”

Choose board type arduino mega, and the correct COM port. Have tried different versions of arduino and windows, mac OS, the same result.

Possible reason: caused by the version of the arduino, losing the time.h file or something.
Recommended solutions:
Try to use arduino1.0.1,it has the time.h library that others don’t, otherwise you must add it by yourself.
Download the arduino 1.0.1 here:
http://www.geeetech.com/forum/viewtopic ... 13&t=17181

3. "COM port already in use"

If you run into this error when compling, this means your COM port is occupied by some unknown softwares, you can try the following ways:

1. Since you didn't know which software is using the COM port, so we can use another way to connect to the COM port and disconnect it to unlock the COM port.
In most circumstances, you can open the repetier host, click “connect" to connect the printer, after the button turned green and then disconnect it agian, the COM port will be free now and you can try to reupload the firmware again.

2. If you have installed the server function of the repetier host, then it will cause this error, you need to close it on the menu bar.

3.Find a pure win7 PC that has little other softwares, maybe install a new win7 in the virtual machine to try it agian, see if it works.

mava70
Posts: 20
Joined: Sun Nov 01, 2015 8:20 am

Re: Compile errors: timeout/time.h error

Post by mava70 » Mon Nov 02, 2015 12:33 am

Hello I found this bug in the bootloader of 2560 board

https://code.google.com/p/arduino/issues/detail?id=392

It should be our case. I found in the code in source Marlinmain.cpp a "!!!" in a text. I try to remove it but I am stuck I can't upload cause of the error.

Marco

TiTo
Posts: 3
Joined: Thu May 19, 2016 1:55 pm

Re: Compile errors: timeout/time.h/COM prot in use error

Post by TiTo » Thu May 19, 2016 4:17 pm

On my Board (rumba) two crystals. Which one to check? What to do with the warranty when soldering? Bought at aliexpress.
Attachments
2016-05-19_11-15-01 (2).jpg
2016-05-19_11-15-01 (2).jpg (92.36 KiB) Viewed 12618 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest