Author Topic: Development Environment for ESP32 - Arduino or ESP-IDF?  (Read 14248 times)

0 Members and 1 Guest are viewing this topic.

Offline don.rTopic starter

  • Frequent Contributor
  • **
  • Posts: 740
  • Country: ca
Development Environment for ESP32 - Arduino or ESP-IDF?
« on: September 22, 2017, 04:38:51 pm »
Going to start some ESP32 programming and wondering what people are using for a dev environment. I don't have a lot of legacy Arduino-specific code, just C/C++ generic. Needs are modest but don't want to learn a toolchain that will be overly restrictive or lacking in features.
« Last Edit: September 22, 2017, 07:52:02 pm by don.r »
 
The following users thanked this post: tablatronix

Offline TJ232

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: Development Environment for ESP32 - Arduino or ESP-IDE?
« Reply #1 on: September 22, 2017, 05:57:19 pm »
Arduino IDE framework might be quite restrictive sometime.
If you want to squeeze your ESP32 at the maximum just go with ESP-IDF: https://github.com/espressif/esp-idf
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13629
  • Country: gb
    • Mike's Electric Stuff
Re: Development Environment for ESP32 - Arduino or ESP-IDE?
« Reply #2 on: September 22, 2017, 06:24:47 pm »
Arduino is a toy for beginners to get started quickly.
No idea if ESP-IDE is any better but if it has any kind of debug support it has to be better than Arduino
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline don.rTopic starter

  • Frequent Contributor
  • **
  • Posts: 740
  • Country: ca
Re: Development Environment for ESP32 - Arduino or ESP-IDE?
« Reply #3 on: September 22, 2017, 07:51:25 pm »
Arduino is a toy for beginners to get started quickly.
No idea if ESP-IDE is any better but if it has any kind of debug support it has to be better than Arduino
Yeah, that was what I was worried about. Since the ESP-IDF (yeah, I made a typo) is the official one from Espressif, I'll go down that route. It does have a JTAG debugger.
 

Offline martinayotte

  • Regular Contributor
  • *
  • Posts: 64
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #4 on: September 23, 2017, 12:58:15 pm »
Arduino-esp32 doesn't prevent using ESP-IDF, since it could be used as IDF components.
 

Offline don.rTopic starter

  • Frequent Contributor
  • **
  • Posts: 740
  • Country: ca
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #5 on: September 23, 2017, 03:18:17 pm »
Arduino-esp32 doesn't prevent using ESP-IDF, since it could be used as IDF components.

Yes. It looks like I can just borrow from Arduino-esp32 and load into esp-idf. Looking at the C API for the esp32 everything looks straightforward anyhow. The only issue would be inter-operability with other components that will probably have Arduino code but no ESP code but that looks to be not a problem.
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 809
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #6 on: September 23, 2017, 08:45:04 pm »
You may want to check out Micropython.

I have a few Olimex ESP8266-MOD-WIFI that I have flashed with Micropython firmware. The Olimex board has solder jumpers to select the boot mode, so constantly flashing firmware was not really an option. I just use the mod-wifi rx to receive status messages from a pic16f and simply serve a web page to show the status. It works pretty good.

I have a handful of py modules I created- ntp, telnetd, httpd, rcopy, utils, wifi, plus some other files like hostname, log.txt for logging, ssidpw file to store wifi logins. I have my own little micro unix-like system :)

Since you have a filesystem (about 1.4MB on my board which has 2MB spi flash), its simple to update the files. I usually leave open a terminal with a telnet connection to the board (will be at a REPL prompt to enter commands, just like being at a shell prompt), To update the py modules, I create/edit them on the pc, run netcat -l -p 8888 < myfile.py , then on the mod-wifi I type rget('myfile.py'), a few seconds later I have my new file uploaded.  The pic16f simply sends a python command to log events - like  log('P')\r\n  to log a pump on event- the log function will prepend a time stamp and append the log file (csv format). The index.html will get the log.txt file and long poll for any updates to it.

For my web page, I use the httpd.py file to serve a single index.html (or through query strings can do some simple admin tasks). Since I don't know html/css/javascript/svg/ajax,long polling all that well, it works pretty well to change the index.html file- edit on pc, upload, refresh browser, debug in browser if needed, repeat. I'm a Python beginner also, so it took me a week (spare time) to get the httpd module working reliably.

The mod-wifi board does not have any io pins other than tx/rx brought out to the connector (there are two on the board that could be used, though), so cannot comment on how well hardware io works with Micropython. I would rather the pic16f do the real work anyway. Maybe I can get the mod-wifi to LVP program the pic16f someday.

Just a thought.
 

Offline TJ232

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #7 on: September 24, 2017, 04:28:09 am »
Question was about ESP32 dev env not ESP8266.
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4189
  • Country: us
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #8 on: September 24, 2017, 10:17:42 am »
Using the Arduino package manager is a pretty convenient way to install the ESP toolchain, includes, and libraries, even if you never actually touch the Arduino IDE or their "quaint" libraries.
(although it looks to me like ESP-IDF is a lot better than the last time I looked at it!)
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 809
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #9 on: September 24, 2017, 05:09:16 pm »
Quote
Question was about ESP32 dev env not ESP8266
I can read, mostly. I thought it relevant as Micropython is also available for ESP32.

Quote
Needs are modest but don't want to learn a toolchain that will be overly restrictive or lacking in features
Maybe Micropython will not suite the modest needs, but decided to share just in case it would be useful.

I'll crawl back into my hole.
 

Offline Aodhan145

  • Frequent Contributor
  • **
  • Posts: 403
  • Country: 00
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #10 on: September 24, 2017, 05:13:44 pm »
I have done a bit of work with the ESP32 and the esp-idf is the only way I would go. For my purposes the idf wasn't even good enough and was still a bit bloated.
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #11 on: October 16, 2017, 05:30:15 am »
I have used the IDF quite a bit and it is still improving greatly.
Quite a lot of the bloat is gone, though some still remains.

It is quite easy to get up and running and there are now quite a lot of examples.
If you aren't wedded to the arduino ecosystem then the idf is probably the better way to go.
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #12 on: October 16, 2017, 05:47:16 am »
I also think that ESP-IDF (optionally with Eclipse) is the way to go. The eclipse setup is a bit tricky and not so well documented. Edit the compile scripts to add "-j5" or whatnot to get multithreaded builds.

I've not used them but the Lua and Python environments also look promising.

Note that the ESP-IDF library isn't complete (e.g. some wireless functionality is missing), and I find the documentation lacking.  You may end up needing third party Bluetooth stacks, if you're using Bluetooth.
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: Development Environment for ESP32 - Arduino or ESP-IDF?
« Reply #13 on: October 17, 2017, 05:26:47 am »
I am using BLE and using the espressif stack. It is working really well now. (currently using the master branch, v3.0 RC1 is due out next week which will be based off the master)

Also have a look into vs code as a dev environment for the esp32. Much easier to setup than eclipse and a better code editor.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf