Arduino UNO won't communicate with my laptop

Hello!

My computer runs Ubuntu 14.04 and I'm having issues uploading a program to my Arduino UNO R3.
The code I use is mostly written in C++ and uses cmake to create dependencies through a CMakeLists.txt file. Everything is compiling smoothly using simply "cmake". I then use the command "sudo make upload" to upload the program to my Arduino board, however I get an error message that looks like this:

valentine@valentine-ThinkPad-T420:~/Documents/ProjetGTE/projet-geothermie2A11/arduino/arduino/build$ sudo make upload
[sudo] password for valentine: 
[ 28%] Built target ethernet_CORE
[ 91%] Built target ethernet_StandardCplusplus
[100%] Built target geothermie
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20

avrdude done.  Thank you.

make[3]: *** [CMakeFiles/geothermie-upload] Error 1
make[2]: *** [CMakeFiles/geothermie-upload.dir/all] Error 2
make[1]: *** [CMakeFiles/upload.dir/rule] Error 2
make: *** [upload] Error 2

I tested, with and without the Arduino plugged and I get the same error message so I assumed the computer didn't really recognize the Arduino board. I'm doing this for a school project that I'm taking on from a previous group, so I haven't written the actual Arduino code and I'm quite new to the whole thing. If you want me to execute any command and give you the output, I can do that.

Thanks for your help.

The first thing to do is to plug in the ARduino and establish that the PC can see it. Does a new port become available in the IDE (Tools/Port) when you plug in the Arduino ?

I have just checked and yes, a new port becomes availaible when I plug in the Arduino.
The new one's called dev/ttyACM3.

Did you pick the new port in the IDE as well?
Otherwise it will look for an Arduino on the active COM port which is not there.
Had the same issue last night :smiley:

I have selected the right port, but the problem is that I do not use the IDE. My project is a big one and has many different arduino files which makes it difficult for me to use Arduino IDE. That is why I use CMake and create a dependency list which allows me to use "cmake" in my terminal and everything compiles. It should be as simple when using make upload but somehow it is not.

I think (not sure of anything here) that I need a command line to set up my serial ports so the Arduino board is recognized.

Varouza:
That is why I use CMake

This is the Arduino Forum.

...R

I still thought this forum could help me because my problem doesnt appear to be because of cmake to say but rather the set up of the arduino serial port on Linux. But my bad if I posted thought I shouldn't have.
Thanks anyway for your time.

I use Puppy Linux (based on Ubuntu) on this laptop and I have never had a problem with the Arduino IDE. Hence my belief that yours is a CMake issue.

...R

Can you upload something with the IDE?
If so, it is a CMAKE issue which may or may not be known to people here.
It will probably be better to find a forum or community with CMAKE users to help you fix this.