Go Down

Topic: Error in command line (Read 555 times) previous topic - next topic

lodevries

I want to upload a sketch to an NodeMCU Amica with an Esp8266 module on it.
When uploading the sketch (from examples - blink) I get the following error message:
Error in command line, need pyserial path as 1st arg and esptool path as 2nd.

I have no idea what it means or how I can solve the problem.
I hope somebody is able to help me out of this.
Thank you.


pert

Please do this:
  • (In the Arduino IDE) File > Preferences
  • Check the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

lodevries

Code: [Select]
Arduino:1.8.8 (Linux), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

/home/lodv/arduino-1.8.8/arduino-builder -dump-prefs -logger=machine -hardware /home/lodv/arduino-1.8.8/hardware -hardware /home/lodv/.arduino15/packages -tools /home/lodv/arduino-1.8.8/tools-builder -tools /home/lodv/arduino-1.8.8/hardware/tools/avr -tools /home/lodv/.arduino15/packages -built-in-libraries /home/lodv/arduino-1.8.8/libraries -libraries /home/lodv/Arduino/libraries -fqbn=esp8266com:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10808 -build-path /tmp/arduino_build_153770 -warnings=none -build-cache /tmp/arduino_cache_807526 -prefs=build.warn_data_percentage=75 -verbose /home/lodv/arduino-1.8.8/examples/01.Basics/Blink/Blink.ino
/home/lodv/arduino-1.8.8/arduino-builder -compile -logger=machine -hardware /home/lodv/arduino-1.8.8/hardware -hardware /home/lodv/.arduino15/packages -tools /home/lodv/arduino-1.8.8/tools-builder -tools /home/lodv/arduino-1.8.8/hardware/tools/avr -tools /home/lodv/.arduino15/packages -built-in-libraries /home/lodv/arduino-1.8.8/libraries -libraries /home/lodv/Arduino/libraries -fqbn=esp8266com:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10808 -build-path /tmp/arduino_build_153770 -warnings=none -build-cache /tmp/arduino_cache_807526 -prefs=build.warn_data_percentage=75 -verbose /home/lodv/arduino-1.8.8/examples/01.Basics/Blink/Blink.ino
Using board 'nodemcuv2' from platform in folder: /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266
Using core 'esp8266' from platform in folder: /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266
Detecting libraries used...
/home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/include -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_153770/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/cores/esp8266 -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/variants/nodemcu /tmp/arduino_build_153770/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/include -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_153770/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/cores/esp8266 -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/variants/nodemcu /tmp/arduino_build_153770/sketch/Blink.ino.cpp -o /tmp/arduino_build_153770/preproc/ctags_target_for_gcc_minus_e.cpp
/home/lodv/arduino-1.8.8/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_153770/preproc/ctags_target_for_gcc_minus_e.cpp
Sketch aan het compileren...
/home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/include -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/lwip2/include -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_153770/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/cores/esp8266 -I/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/variants/nodemcu /tmp/arduino_build_153770/sketch/Blink.ino.cpp -o /tmp/arduino_build_153770/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
python /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/signing.py --mode header --publickey /home/lodv/arduino-1.8.8/examples/01.Basics/Blink/public.key --out /tmp/arduino_build_153770/core/Updater_Signing.h
python /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/makecorever.py --build_path /tmp/arduino_build_153770 --platform_path /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266 --version unix-2.6.0-dev
Using precompiled core: /tmp/arduino_cache_807526/core/core_910a5029597657b1d11aa2f77c69288b.a
Linking everything together...
/home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-gcc -CC -E -P -DVTABLES_IN_FLASH /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/ld/eagle.app.v6.common.ld.h -o /tmp/arduino_build_153770/local.eagle.app.v6.common.ld
/home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-gcc -fno-exceptions -Wl,-Map -Wl,/tmp/arduino_build_153770/Blink.ino.map -g -w -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static -L/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/lib -L/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/lib/NONOSDK221 -L/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/ld -L/home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/lib -Teagle.flash.4m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o /tmp/arduino_build_153770/Blink.ino.elf -Wl,--start-group /tmp/arduino_build_153770/sketch/Blink.ino.cpp.o /tmp/arduino_cache_807526/core/core_910a5029597657b1d11aa2f77c69288b.a -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group -L/tmp/arduino_build_153770
python /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/elf2bin.py --eboot /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/bootloaders/eboot/eboot.elf --app /tmp/arduino_build_153770/Blink.ino.elf --flash_mode dio --flash_freq 40 --flash_size 4M --path /home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin --out /tmp/arduino_build_153770/Blink.ino.bin
Creating BIN file "/tmp/arduino_build_153770/Blink.ino.bin" using "/tmp/arduino_build_153770/Blink.ino.elf"
python /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/signing.py --mode sign --privatekey /home/lodv/arduino-1.8.8/examples/01.Basics/Blink/private.key --bin /tmp/arduino_build_153770/Blink.ino.bin --out /tmp/arduino_build_153770/Blink.ino.bin.signed
/home/lodv/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-size -A /tmp/arduino_build_153770/Blink.ino.elf
De schets gebruikt 257248 bytes (24%)  programma-opslagruimte. Maximum is 1044464 bytes.
Globale variabelen gebruiken 26556 bytes (32%) van het dynamisch geheugen. Resteren 55364 bytes voor lokale variabelen. Maximum is 81920 bytes.
python /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266/tools/upload.py --chip esp8266 --port /dev/ttyUSB0 --baud 115200 --trace version --end --chip esp8266 --port /dev/ttyUSB0 --baud 115200 --trace write_flash 0x0 /tmp/arduino_build_153770/Blink.ino.bin --end
Error in command line, need pyserial path as 1st arg and esptool path as 2nd.
Error in command line, need pyserial path as 1st arg and esptool path as 2nd.


This is the code. Thank you so much for your help. I'm really thankful for that.

Yvonne

pert

What is your reason for having the ESP8266 core for Arduino installed at /home/lodv/arduino-1.8.8/hardware/esp8266com/esp8266? This indicates you did not use the standard, reliable, and easy Boards Manager installation process like the other 99.99% of the users of that package.

lodevries

As far as I know I used the board manager. I don't know any other way. Can I delete this library and install it again using the boardmanager?
Just delete the /hardware/esp8266com/esp8266 directory?
Thanks.

pert

Yes, I think this is the best thing to do. The output does indicate that you had also installed the ESP8266 core via Boards Manager at one time. Delete the /home/lodv/arduino-1.8.8/hardware/esp8266com folder, restart the Arduino IDE, and then try compiling again. Please be very careful when deleting things on your computer. When in doubt, back up!

lodevries

#6
Mar 24, 2019, 12:49 pm Last Edit: Mar 24, 2019, 01:44 pm by lodevries
This doesn't solve the problem. Now Arduino doesn't start anymore. I have placed the directory back. Arduino starts, but same problem.
All the manuals I read have the same instructions:
1. Open preferences window from the Arduino IDE
2. Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field and click OK button.

That's how I installed it.
Is this wrong?
Which package do I need from the library manager in the IDE?
Do I have to delete the json line from the Additional Board Manager URL field?

Could the problem be in this file (see attachment)?
The hidden directory .arduino15/preferences.txt.

Thanks again

pert

I think the cause of the Arduino IDE not starting after you delete that folder is that something went wrong with your Boards Manager installation of the ESP8266 core for Arduino. Once you delete the manual installation you did at /home/lodv/arduino-1.8.8/hardware/esp8266com, the Boards Manager installed package at ~/.arduino15/packages/esp8266 is used and causes a problem. Please do this:
  • Delete the /home/lodv/arduino-1.8.8/hardware/esp8266com folder
  • Delete all the files except for preferences.txt in ~/.arduino15
  • Delete ~/.arduino15/packages/esp8266
  • (In the Arduino IDE) Tools > Board > Boards Manager
  • Wait for downloads to finish.
  • Scroll down through the available packages until you see "esp8266 by ESP8266 Community". Click on it.
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".
  • Select and ESP8266 board from the Tools > Board menu.
  • Compile a sketch to see if it's working now.



All the manuals I read have the same instructions:
1. Open preferences window from the Arduino IDE
2. Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field and click OK button.

That's how I installed it.
Is this wrong?
No, that's not wrong. That's the best way to install it, unless you are contributing development work to the ESP8266 core for Arduino or helping as a beta tester.

Do I have to delete the json line from the Additional Board Manager URL field?
No. Please leave that line in your preferences.

lodevries

I'm very pleased that now all works as it should be!!!!
I can upload the code to my ModeNCU without any problems.

Thank you very much for your help and patience.

Yvonne

pert

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

Go Up