Avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6e

Hi, I’m trying to program an Arduino Nano by using embeetle IDE, but I come across a problem, to be more specific, when I try to build even a sample project for Arduino Nano everything is going fine, but when I try to flash I receive this error:


. As it can bee noticed, embeetle detected the corresponding com port correctly, even though, something went wrong. I tried to restart the IDE, then to reset the ucontroller, then to reconnect the USB, but no success…I run the embeetle on a win10 machine and I do not use a programmer for Arduino (like Atmel ICE).
Thank you for paying attention!

1 Like

Hi @paul ,
Thank you for contacting us.

Which COM-port is selected right now in your Dashboard? This COM-port setting is a bit hidden:

Dashboard tab > Probe > COM-port

You can select another COM-port there and try again.

In the next release, the COM-port setting will be right next to the Flash button. That will be much clearer :blush::+1:

Hi, Thank you for you answer. Here I have a ss which includes the view of the com port:


COM4 is the right com port. But the problem persists. Also, I tried other ports, but the very same issue occured.

Hi @paul ,
Sorry to hear that it still doesn’t work. I notice on your screenshot that you have Arduino IDE running. It’s best to switch Arduino IDE off and make sure nothing is keeping the board occupied (no active Serial connections). If that doesn’t help, then I can only think of these two scenarios:

Note:
I’m happy to help you finding a fix. You can download the remote desktop software AnyDesk (https://anydesk.com) or TeamViewer (https://www.teamviewer.com) and we can setup a meeting. I’ll do my best to help you fix the issue.

CASE 1: It works in Arduino IDE

Does it work in Arduino IDE? Before trying in Arduino IDE, please tick the boxes for compilation and upload “verbose output”:

File > Preferences > Show verbose output during

If flashing works in Arduino IDE and not in Embeetle, then the problem is clearly on us. You can compare the verbose flash output from the Arduino IDE with the flash output in Embeetle to spot any differences there.

CASE 2: It doesn’t work in Arduino IDE

If it doesn’t work in Arduino IDE, then you can go through this checklist:

Don’t hesitate to contact me for a meeting, so we can solve this together.

Kind regards,
Kristof

Hi, it works both in arduino ide:




and atmel studio:

I encounter issues only when working with embeetle IDE.

Hi Paul,

Can you send me the output of these IDEs? This way I can compare that with the output you have in Embeetle. I can see some output of those IDEs on the screenshot, but not everything.

Would you have time for a meeting? So I can try to figure out more. Maybe it’s a bug in Embeetle that we need to solve.

Thank you very much :slight_smile:

This is the output of the Arduino IDE:

Using board 'nano' from platform in folder: C:\Users\paulb\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\paulb\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3

Detecting libraries used...
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\sketch\\sketch_oct23a.ino.cpp" -o nul

Generating function prototypes...
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\sketch\\sketch_oct23a.ino.cpp" -o "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\sketch\\sketch_oct23a.ino.cpp" -o "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\sketch\\sketch_oct23a.ino.cpp.o"

Compiling libraries...

Compiling core...
Using precompiled core: C:\Users\paulb\AppData\Local\Temp\arduino-core-cache\core_arduino_avr_nano_cpu_atmega328old_cdb20a868dd4cd1a248e70663c475b02.a
Linking everything together...
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.elf" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355\\sketch\\sketch_oct23a.ino.cpp.o" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/..\\arduino-core-cache\\core_arduino_avr_nano_cpu_atmega328old_cdb20a868dd4cd1a248e70663c475b02.a" "-LC:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355" -lm
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.elf" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.eep"
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.elf" "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.hex"
"C:\\Users\\paulb\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\paulb\\AppData\\Local\\Temp\\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.elf"
Sketch uses 922 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

--------------------------
Compilation complete.


"C:\Users\paulb\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\paulb\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM4" -b57600 -D "-Uflash:w:C:\Users\paulb\AppData\Local\Temp\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\paulb\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\paulb\AppData\Local\Temp\arduino-sketch-BC536C0F1CF22745BC2A64D3758ED355/sketch_oct23a.ino.hex"
avrdude: writing flash (922 bytes):

Writing | ################################################## | 100% 0.29s

avrdude: 922 bytes of flash written

avrdude done.  Thank you.


--------------------------
upload complete.

Here is the what Atmel studio output after build:

------ Build started: Project: Nano1, Configuration: Debug AVR ------
Build started.
Project "Nano1.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\paulb\Documents\Atmel Studio\7.0\Nano1\Nano1\Nano1.cppproj" (target "Build" depends on it):
	Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".
	Task "RunCompilerTask"
		Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
		C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 16 --output-sync 
		make: Nothing to be done for 'all'.
	Done executing task "RunCompilerTask".
	Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".
	Task "RunOutputFileVerifyTask"
				Program Memory Usage 	:	188 bytes   0.6 % Full
				Data Memory Usage 		:	0 bytes   0.0 % Full
				Warning: Memory Usage estimation may not be accurate if there are sections other than .text sections in ELF file
	Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "Nano1.cppproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Avr.common.targets" from project "C:\Users\paulb\Documents\Atmel Studio\7.0\Nano1\Nano1\Nano1.cppproj" (entry point):
Done building target "Build" in project "Nano1.cppproj".
Done building project "Nano1.cppproj".

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

and here is what atmel studio output after flash:

avrdude.exe: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Users\paulb\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

             Using Port                    : COM4
             Using Programmer              : arduino
             Overriding Baud Rate          : 57600
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :

                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : Arduino
             Description     : Arduino
             Hardware Version: 2
             Firmware Version: 1.16
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e950f (probably m328p)
avrdude.exe: safemode: lfuse reads as 0
avrdude.exe: safemode: hfuse reads as 0
avrdude.exe: safemode: efuse reads as 0
avrdude.exe: reading input file "C:\Users\paulb\Documents\Atmel Studio\7.0\Nano1\Nano1\Debug\Nano1.hex"
avrdude.exe: writing flash (188 bytes):

Writing | ################################################## | 100% 0.07s

avrdude.exe: 188 bytes of flash written

avrdude.exe: safemode: lfuse reads as 0
avrdude.exe: safemode: hfuse reads as 0
avrdude.exe: safemode: efuse reads as 0
avrdude.exe: safemode: Fuses OK (E:00, H:00, L:00)

avrdude.exe done.  Thank you.

Thank you for spending your time in order to solve this issue.

1 Like

Hi @paul ,

Thank you very much for giving me the outputs from Atmel Studio and Arduino IDE. It noticed one difference when comparing them to the output from Embeetle IDE. The baud rate in Embeetle, for flashing, is set at 115200 baud. In the other IDEs, it’s set at 57600 baud.

Please open your Embeetle project, and navigate in the Filetree to this file:

config/dashboard.mk

On lines 158 - 166 you should see the recipe for flashing:

.PHONY: flash
flash: $(BINARIES) print_flash
	$(FLASHTOOL) -C "$(subst /bin/../,/,$(subst /avrdude\$,,$(FLASHTOOL_PATH)\$)/../)etc/avrdude.conf" \
               -v \
               -patmega328p \
               -carduino \
               -P$(COM) \
               -b115200 \
               -D \
               -Uflash:w:$(ELF_FILE:.elf=.hex):i

As you can see on line 164, the baud rate is set at 115200 baud. Please change that number into 57600. Save the file and try again to flash your code.

I hope this helps. If not, I’m happy to set up a meeting with you so we can look into the matter together.

By the way, may I ask you how you discovered Embeetle? We’re a young software company, and are not yet marketing the IDE that much, as we’re focusing our energy now mostly on improving the product.

Kind regards,
Kristof

Hi, Thank you very much, now it works fine. In addition, related to “how did I discover Embeetle IDE?”, the answer is that usually I work with many types of ucontrollers, 8051, stm32, pic, atmega (I am a student and I would like to get used to as many ucontrollers as possible in order to learn embedded systems), thus, for each class of ucontroller I had to install a specific IDE which is memory consuming and annoying, moreover, those IDEs, like, atmel studio, Keil IDE, eclipse, etc aren’t very “light”, they require lots of cpu resources. Then, I searched on the internet about a new IDE which is more “universal” and “light”. Then, I came across a list of IDEs, like, vmlab, embeetle, visual micro, winavr etc, and I found embeetle as the best, it was very light and versatile, also, it has a nice and simple GUI:)) and last but not least it was something new and I wanted to find out how is it .

1 Like

Also, I think a good idea would be to integrate vim mode.

1 Like

Hi @paul ,
Thank you very much for your kind words on Embeetle!

About vim-mode:
Our editor is indeed quite basic for the moment. The editor is based on Scintilla (see https://www.scintilla.org/), an open source editor which is also used by Notepad++ (see https://notepad-plus-plus.org/). I’m not sure that it has a vim-mode built in. I’ll ask my colleague Matic, he is coding our editor.

In time, we would like to build our own editor from scratch, because that would give us lots of freedom. However, that’s a long, long-term goal. Such an endeavor would take a lot of time. Currently there are just too many other more urgent things.