ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
508 stars 526 forks source link

Flash error: avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 #459

Open Tigerzuo opened 4 years ago

Tigerzuo commented 4 years ago

Hello, I am trying to flash my Arduino Nano and I can't figure out where the error is coming from. The error is avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 This prevents me from flashing at all.

Thanks for reading!

mikepurvis commented 4 years ago

Are you able to flash this Arduino in other ways, eg from Arduino IDE, or using avrdude on the command line?

I'm assuming you're connected via the Micro USB port— are you certain you have permissions set up correctly? See: https://www.arduino.cc/en/Guide/Linux#toc6

romainreignier commented 4 years ago

Try to press the RESET button at the beginning of the upload process.

trov4 commented 3 years ago

Hey, I've been running into this issue (and a similar one) and was hoping to see if there has been any progress on this, here's some info about what I'm doing:

avrdude done. Thank you.

CMakeFiles/hello-upload.dir/build.make:57: recipe for target 'CMakeFiles/hello-upload' failed make[7]: [CMakeFiles/hello-upload] Error 1 CMakeFiles/Makefile2:205: recipe for target 'CMakeFiles/hello-upload.dir/all' failed make[6]: [CMakeFiles/hello-upload.dir/all] Error 2 CMakeFiles/Makefile2:212: recipe for target 'CMakeFiles/hello-upload.dir/rule' failed make[5]: [CMakeFiles/hello-upload.dir/rule] Error 2 Makefile:170: recipe for target 'hello-upload' failed make[4]: [hello-upload] Error 2 CMakeFiles/arduino-ros_firmware_hello-upload.dir/build.make:57: recipe for target 'CMakeFiles/arduino-ros_firmware_hello-upload' failed make[3]: [CMakeFiles/arduino-ros_firmware_hello-upload] Error 2 CMakeFiles/Makefile2:520: recipe for target 'CMakeFiles/arduino-ros_firmware_hello-upload.dir/all' failed make[2]: [CMakeFiles/arduino-ros_firmware_hello-upload.dir/all] Error 2 CMakeFiles/Makefile2:527: recipe for target 'CMakeFiles/arduino-ros_firmware_hello-upload.dir/rule' failed make[1]: [CMakeFiles/arduino-ros_firmware_hello-upload.dir/rule] Error 2 Makefile:357: recipe for target 'arduino-ros_firmware_hello-upload' failed make: [arduino-ros_firmware_hello-upload] Error 2



Any help or pointers would be appreciated--thanks!

**EDIT** 
- I have been pressing the reset button at the beginning of the upload process, no change
- I am running ros melodic (not sure if that matters, but I figured having the system might be important)
trov4 commented 3 years ago

Update: After digging WAY to deep for nothing, I found out that you need to set SERIAL in the cmake function generate_arduino_firmware, so the full function for me is:

generate_arduino_firmware(hello
  SRCS chatter.cpp ${ROS_LIB_DIR}/time.cpp
  BOARD uno
  PORT /dev/ttyS4
  SERIAL picocom /dev/ttyS4
)

It uploads correctly for me and runs by adding that line.

Would it be possible to update the tutorial? Not sure if this is the right place for that. -T