Skip to content
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

flash integration into Arduino GUI #294

Closed
pgollor opened this issue Jun 5, 2017 · 7 comments
Closed

flash integration into Arduino GUI #294

pgollor opened this issue Jun 5, 2017 · 7 comments

Comments

@pgollor
Copy link

pgollor commented Jun 5, 2017

Hi everyone.,
first of all i would to says this project is a great one. :-)

I have a question. Is it possible to flash an Arduino directly from the Arduino GUI?
In the GUI i get under ports the esp link (this information comes from mDNS). But if i try to flash it i get the following error:

/usr/local/arduino-1.8.2/hardware/tools/avr/bin/arduinoOTA -address XXX.XXX.XXX.XXX -port {upload.network.port} -sketch /tmp/arduino_build_970563/Ofentermometer.ino.hex -upload {upload.network.endpoint_upload} -sync {upload.network.endpoint_sync} -reset {upload.network.endpoint_reset} -sync_exp {upload.network.sync_return} 
Resetting the board
Failed to reset the board, upload failed

XXX.XXX.XXX.XXX is the right address, but the other parameters are not be available.

  • It is possible to use the ArduinoOTA script from above?
  • Or could you integrate the avrflash tool into the GUI like this one under the tools menu?

My system:

  • Linux
  • esplink 3.0.14 alpha
  • Arduino UNO
  • Arduino 1.8.2

Thanks.

@pgollor pgollor changed the title Integration in Arduino flash integration into Arduino GUI Jun 5, 2017
@tve
Copy link
Member

tve commented Jun 5, 2017

Thanks for your interest in esp-link! Yes, integration into the GUI is theoretically possible, but someone has to write the code for it... I never really used the GUI and am mostly using stm32 processors at this time, so I cannot spend the time to do the integration, sorry. Pull requests always welcome.

WRT the failure you're observing, I would highly recommend you use the avrflash script that comes with esp-link. It uses direct HTTP requests to esp-link to do the programming and will give you better error messages. Once that works, you can try arduinoOTA again (I didn't know that existed).

@jlegen
Copy link

jlegen commented Jun 5, 2017

i am doing exactly this since quite a time using this great esp-link software - i am flashing Arduino devices installed elsewhere right from the Arduino IDE. All you need for this is a virtual com port (using a software like e.g. "netburner") pointing to the IP & port of the target...

@pgollor
Copy link
Author

pgollor commented Jun 5, 2017

Thanks for your posts. For me it is not problem to use the avrflash script or another solution. But I'm locking for a easy GUI solution for my project group in my university. An i have the same problem like @tve: the time ;)

@tve do you have any (easy to access) information for flashing an STM32 chip with esp-link? We are using STM32 boards too. Thanks.

@jlegen
Copy link

jlegen commented Jun 6, 2017

not sure if i understood your problem - i also meant this to be an "easy GUI solution". I am using the Arduino IDE and click on "compile & upload" - that's it.
You only have to configure this once (for a target); with Linux, this is even more easy, and only a one-liner, e.g.:
socat pty,link=/dev/virtualcom0,raw tcp:192.168.254.254:8080&

@tve
Copy link
Member

tve commented Jun 6, 2017

Thanks for your posts. For me it is not problem to use the avrflash script or another solution.

You need to make sure it works using avrflash first, one that works, use the virtual com port.

do you have any (easy to access) information for flashing an STM32 chip with esp-link?

Dunno about "easy" :-). I use stm32L0 and stm32F1 series that can be reprogrammed over serial and I use the update command in https://github.com/jeelabs/folie but you would likely want to extract the update code and make your own tool.

@pgollor
Copy link
Author

pgollor commented Jun 10, 2017

thanks for your info @tve

@rtek1000
Copy link

rtek1000 commented Aug 11, 2018

If someone else receives this error in the IDE (> 1.8.5):

I was trying to use the NodeMCU V3 Lolin instead of the ESP-01, and the IDE started reporting this error "Failed to reset the board, upload failed"

Then I realized that I was trying to upload to "Arduino UNO",
But the correct one is for "Arduino UNO WiFi".

I am using Arduino Pro Mini with UNO bootloader.
(Currently the Pro Mini bootloader does not work with Watchdog).

I was successful in setting up:
The assignment of "swap_uart" pins in the esp-link web interface,
(NodeMCU D6) GPIO12: connect to the RESET of the microcontroller
(NodeMCU D7) GPIO13: Connect to the TX of the microcontroller
(NodeMCU D8) GPIO15: Connect to the microcontroller RX (need pull-down to ensure proper startup)
esp-link pin

Electronic reference diagram for NodeMCU:
https://i.pinimg.com/originals/f7/81/ef/f781efedf44a3b9673f1e88d2d8253c8.png
nodemcu

arduino-iot-lolin-nodemcu-v3-lua-based-esp8266-wifi-development-board-littlecraft-1801-27-littlecraft 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants