arduino-vscode
arduino-vscode copied to clipboard
Unknown package error
I don't think it's an issue. Since there was no gitter chat option available, I am posting this as an issue.
I just wanted to ask, I have configured these settings:
"arduino.libraryPath": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/",
"arduino.uploader": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages/esp8266/tools/esptool/0.4.9/",
"arduino.fqbn": "esp8266:esp8266:nodemcu:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M",
"arduino.verbose": true,
"arduino.serialPort": "COMx",
"arduino.uploadOptions": "-vv -cd ck -cb 115200 -cp COMx -ca 0x00000 -cf C:/Users/Tejas/AppData/Local/Temp/arduino_build_990450/NINJA_Server.ino.bin"
Are these correct? Any additional lines to be added still?
Also, if it sorts out for me, I ll write a report on it. So that new users can easily adopt it. Because, I think, it's very useful.
if you write that kind of uploadOptions
, then the extension will always use the specified file to upload no matter what is the real source file.
why not use these?
"arduino.uploadOptions": "-vv -cd ck -cb $BAUDRATE -cp $SERIALPORT -ca 0x00000 -cf $TARGET.bin",
please check the README.md, the example section are set for esp8266 compile and upload
Thank you for the response. Now I have changed specific values to variables as you suggested:
"arduino.idePath": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/",
"arduino.libraryPath": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/",
"arduino.uploader": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages/esp8266/tools/esptool/0.4.9/",
"arduino.fqbn": "esp8266:esp8266:nodemcu:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M",
"arduino.verbose": true,
"arduino.serialPort": "COMx",
"arduino.uploadOptions": "-vv -cd ck -cb $BAUDRATE -cp $SERIALPORT -ca 0x00000 -cf $TARGET.bin"
But the "Unknown package" error persists. And yes, I have set the settings similar to the example that you have showed.
Log:
============== Begin to compile. ==============
E:\iThings\arduino-1.8.1-windows\arduino-1.8.1\arduino-builder.exe -compile -logger human -hardware
E:\iThings\arduino-1.8.1-windows\arduino-1.8.1\\hardware -tools E:\iThings\arduino-1.8.1
windows\arduino-1.8.1\\tools-builder -tools E:\iThings\arduino-1.8.1-windows\arduino
1.8.1\\hardware\tools\avr -built-in-libraries E:\iThings\arduino-1.8.1-windows\arduino-1.8.1\\libraries
libraries E:\iThings\arduino-1.8.1-windows\arduino-1.8.1\
fqbn=esp8266:esp8266:nodemcu:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M -build-path
e:\iThings\My projects\Ninja_new\NINJA_Server\.build\settings.json -warnings=none
prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=E:\iThings\arduino-1.8.1
windows\arduino-1.8.1\\hardware\tools\avr -prefs=runtime.tools.avrdude.path=E:\iThings\arduino-1.8.1
windows\arduino-1.8.1\\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=E:\iThings\arduino
1.8.1-windows\arduino-1.8.1\\hardware\tools\avr -verbose
c:\Users\Tejas\AppData\Roaming\Code\User\settings.json
esp8266: Unknown package
for esp8266, you will need to set custom compilerOptions
, and you uploader
should point to the uploader program, not uploader path.
check README.md again.
I am sorry. That was my mistake. I didn't configure compilerOption
, there was a season, though.
Anyway, now Build is working fine after whatever-you-said + making some-more changes. But not able to Upload.
Error:
============== Begin to upload. ==============
E:\iThings\arduino-1.8.1-windows\arduino-1.8.1\hardware\tools\avr\bin\avrdude.exe -CE:\iThings\arduino-1.8.1-windows\arduino-1.8.1\\hardware\tools\avr\etc\avrdude.conf -patmega328p -carduino -PCOMx -b115200 -vv -cd ck -cb $BAUDRATE -cp $SERIALPORT -ca 0x00000 -cf $TARGET.bin -Uflash:w:e:\iThings\My projects\Ninja_new\NINJA_Server\.build\NINJA_Server\NINJA_Server.ino.hex:i
avrdude.exe: Version 6.3, compiled on Dec 16 2016 at 13:33:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "E:\iThings\arduino-1.8.1-windows\arduino-1.8.1\\hardware\tools\avr\etc\avrdude.conf"
avrdude.exe: Can't find programmer id "d"
Any idea??
avrdude can not be used as uploader for esp8266. that's why your upload will never work.
So, what I should use instead? I mean, I am able to Upload using regular Arduino IDE.. What setting I should change?
Yeah, of course. AVRDude can not be used. There esptool.exe for that. But I have configured it. Then why it's taking avr dude? Where to change that?
the four options showed in README.md are exact options needed for esp8266. try those.
for esp8266, you will need at least these options: uploader
, uploaderOptions
, compileOptions
,
or you can show me your options.
This is what You have given:
"arduino.fqbn": "esp8266:esp8266:nodemcu:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M",
"arduino.uploader" : "/Users/steve/Library/Arduino15/packages/esp8266/tools/esptool/0.4.9/esptool",
"arduino.uploadOptions": "-vv -cd ck -cb $BAUDRATE -cp $SERIALPORT -ca 0x00000 -cf $TARGET.bin",
"arduino.compileOptions": "-hardware /Users/steve/Library/Arduino15/packages -tools /Users/steve/Library/Arduino15/packages -prefs=runtime.tools.esptool.path=/Users/steve/Library/Arduino15/packages/esp8266/tools/esptool/0.4.9 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=/Users/steve/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2 -prefs=runtime.tools.mkspiffs.path=/Users/steve/Library/Arduino15/packages/esp8266/tools/mkspiffs/0.1.2"
This is what I have configured:
"arduino.idePath": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/",
"arduino.libraryPath": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/",
"arduino.uploader": "E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages/esp8266/tools/esptool/0.4.9/esptool.exe",
"arduino.fqbn": "esp8266:esp8266:nodemcu:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M",
"arduino.verbose": true,
"arduino.serialPort": "COMx",
"arduino.uploadOptions": "-vv -cd ck -cb $BAUDRATE -cp $SERIALPORT -ca 0x00000 -cf $TARGET.bin",
"arduino.compileOptions": "-hardware E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages -tools E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages -prefs=runtime.tools.esptool.path=E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages/esp8266/tools/esptool/0.4.9 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2 -prefs=runtime.tools.mkspiffs.path=E:/iThings/arduino-1.8.1-windows/arduino-1.8.1/Portable/packages/esp8266/tools/mkspiffs/0.1.2",
"files.autoSave": "afterDelay"
(I did try without .exe too for esptool, still the same)
But there are these defaults:
"arduino.partno": "atmega328p"
"arduino.programmer": "arduino"
What I should change those to?