Skip to content

Getting error while uploading sketch ESP8266 #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
embhobbb opened this issue Oct 6, 2018 · 7 comments
Closed

Getting error while uploading sketch ESP8266 #61

embhobbb opened this issue Oct 6, 2018 · 7 comments

Comments

@embhobbb
Copy link

embhobbb commented Oct 6, 2018

Hi,
i have install esp8266 package and i could able to compile the code.
but not able to upload the code to esp8266.
Here is error i got while uploading code..

./arduino-cli-0.2.2-alpha.preview-linuxarm upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcu Arduino/blinking/
No new serial port detected.
warning: serialport_set_baudrate: baud rate 0 may not work
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
Error: exit status 2
Error during upload.

@embhobbb embhobbb changed the title Getting error while uploading sketch Getting error while uploading sketch ESP8266 Oct 6, 2018
@zunoffon
Copy link

zunoffon commented Oct 7, 2018

I think it has maybe caused by some reasons such as: bad usb cable connection, the serial port is busy (/dev/ttyUSB0 is using by another session). I'm having a problem while uploading too. My question is: Though I built sketch sucessfully, can I upload to device which can not be detected?

zun@ubuntu:~$ arduino-cli --format json board list | jq
{
  "serialBoards": [
    {
      "name": "unknown",
      "fqbn": "",
      "port": "/dev/ttyUSB0",
      "usbID": "1a86:7523 - "
    }
  ],
  "networkBoards": []
}
zun@ubuntu:~$ arduino-cli compile -b esp8266:esp8266:d1_mini Arduino/myFirstSketch
Build options changed, rebuilding all
Sketch uses 247848 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27984 bytes (34%) of dynamic memory, leaving 53936 bytes for local variables. Maximum is 81920 bytes.
zun@ubuntu:~$ arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:d1_mini Arduino/myFirstSketch
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/arduino/arduino-cli/vendor/github.com/arduino/go-properties-orderedmap.(*Map).Set(0xc42056dca8, 0xc42037e0a5, 0x4, 0xc42037e0aa, 0xf)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/github.com/arduino/go-properties-orderedmap/properties.go:226 +0x90
github.com/arduino/arduino-cli/vendor/github.com/arduino/go-properties-orderedmap.(*Map).Merge(0xc42056dca8, 0xc42056dc78, 0x1, 0x1, 0xc420335b60)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/github.com/arduino/go-properties-orderedmap/properties.go:396 +0x9d
github.com/arduino/arduino-cli/commands/upload.run(0xc42025f900, 0xc420240320, 0x1, 0x5)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/commands/upload/upload.go:165 +0x44d
github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc42025f900, 0xc4202402d0, 0x5, 0x5, 0xc42025f900, 0xc4202402d0)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra/command.go:760 +0x2c1
github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42023ca00, 0xc42025b680, 0xc42025a280, 0xc42023d900)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra/command.go:846 +0x30a
github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42023ca00, 0x9e4c88, 0xc420205f78)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/github.com/spf13/cobra/command.go:794 +0x2b
main.main()
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/main.go:30 +0x27

@embhobbb
Copy link
Author

embhobbb commented Oct 8, 2018

USB is detected properly. I am facing problem while setting Baud rate. How to set the baud rate and how to upload the code to esp8266?
@zunoffon please create another thread if you are facing some other problem than what i mentioned?

@cmaglie
Copy link
Member

cmaglie commented Oct 8, 2018

This is a bug in 0.3.0-alpha, I've fixied it and releasing an update shortly...

@cmaglie cmaglie closed this as completed Oct 8, 2018
@cmaglie cmaglie added this to the 0.3.1-alpha.preview milestone Oct 8, 2018
@embhobbb
Copy link
Author

embhobbb commented Oct 9, 2018

i have downloaded the 0.3.1 version. But i am still getting same error.
Do i need to update anything other than CLI executable?

$ ./arduino-cli-0.3.1-alpha.preview-linuxarm core install esp8266:esp8266
Downloading esp8266:esptool@0.4.13...
esp8266:esptool@0.4.13 downloaded
Error: server returned a non-2XX status code
Error downloading esp8266:esptool@0.4.13
$ ./arduino-cli-0.3.1-alpha.preview-linuxarm upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcu.menu.UploadSpeed.115200.upload.spee
d=115200 Arduino/blinking/
Error: board esp8266:esp8266@2.4.2:nodemcu.menu.UploadSpeed.115200.upload.speed=115200 not found
Invalid FQBN.
$ ./arduino-cli-0.3.1-alpha.preview-linuxarm upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcu.menu.UploadSpeed=115200 Arduino/bli
nking/
Error: board esp8266:esp8266@2.4.2:nodemcu.menu.UploadSpeed=115200 not found
Invalid FQBN.

$ ./arduino-cli-0.3.1-alpha.preview-linuxarm upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcu:UploadSpeed=115200 Arduino/blinking
/
Compiled sketch not found. Please compile first.

i tried many combination but still not working.

Please guide me to use correct switches.

@cmaglie
Copy link
Member

cmaglie commented Oct 11, 2018

Please remove the @2.4.2 piece is not part of the FQBN, try with:

esp8266:esp8266:nodemcu.menu.UploadSpeed=115200

@cmaglie cmaglie reopened this Oct 11, 2018
@cmaglie
Copy link
Member

cmaglie commented Oct 11, 2018

sorry I mean:
esp8266:esp8266:nodemcu:UploadSpeed=115200

@cmaglie
Copy link
Member

cmaglie commented Oct 11, 2018

BTW this is another issue, if the problem persists please open a new issue with a transcript of your latest try.

@cmaglie cmaglie closed this as completed Oct 11, 2018
per1234 added a commit that referenced this issue Aug 9, 2021
…ment

Default PROJECT_PATH argument to current working directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants