Page 1 of 1

[Info] Using Raspberry Pi as a development environment

Posted: Sun Sep 25, 2016 9:34 pm
by kolban
When we build solutions using the ESP32, we need a development environment on which to build those solutions. We also need some infrastructure for testing. For example if we are using I2C, SPI, UART or other protocols, we may wish to test that those are working. In the current DevKitC I have, it doesn't automatically cause the ESP32 to enter flash mode when I wish to flash. I also like to watch my serial console during development. And of course, the ESP32 needs to be powered.

With these thoughts in mind, I wondered if we could use a Raspberry Pi 3 to assist with some or all of these tasks. The result is a bread-boarded DevKitC connected to the Pi as shown in the following picture:


The Pi can now control all aspects of I/O on the ESP32 ... including serial access and reboots into different modes. From there, we have a lot of choices. Here is a screen shot of a simple browser based app connecting to a Node.js server running on the Pi that is controlling boots and console output:


We can also run the full compile tool-chain on Pi including the Espressif IDF. So in principle, no need for any desktop PCs. I'm working with some folks on porting software to ESP32 and those folks don't yet have ESP32s ... so now we have a "cloud hosted" environment ... and when all is said and done, they could even write their code, perform their compiles, flash to ESP32 and see the console ... all from a browser ... anywhere on the Internet.

Notes on using the Raspberry Pi as a development environment can found in a free downloadable PDF available here:

A download of a compressed tar file containing the binaries of a build of the Xtensa tool chain for the ARM processors (specifically the Raspberry Pi 3) can be downloaded here: ... elf.tar.gz

I recommend the content be extracted to the /opt directory.

A YouTube video illustrating the story is available here:

*** this post contains some edits made over time ***

Re: Using Raspberry Pi as a development environment

Posted: Mon Sep 26, 2016 4:23 am
by ESP_Sprite
Sounds like a nice standalone dev environment! You may even be able to integrate a JTAG debugger in there. The Raspberry Pi GPIO can be used as a JTAG host interface that OpenOCD can control. ( ... TAG-Dongle for an example). So, with four or five extra wires, you should be able to live-debug your ESP32 from the Pi as well.

Re: Using Raspberry Pi as a development environment

Posted: Mon Sep 26, 2016 4:36 am
by kolban
I'm very interested in learning more about "JTAG" which I know nothing about and will start studying that. I built the toolchain from your instructions in the IDF ... compiled without incident ... however it needed nearly 4GBytes of storage space to build and as such I had to use an NFS mount which slowed things considerably. All in all in took over 10 hours to build. The resulting toolchain is under 100MBytes which is fine. Would Espressif consider hosting a compiled build for developer download to save us having to build an ARM based toolchain ourselves? If not, in your experience, is there a place where community members like myself may upload the compiled binaries for distribution?

In these early days of ESP32 experience, I find myself concerned when I find something that doesn't work as expected. Using this ARM based environment ... I now no longer know if an issue with an ESP32 is my own coding, my mis-understanding of the APIs/environment, something not working yet in the early code drops of the ESP32 framework or ... and this would be new ... something I have introduced because I am compiling and uploading from an ARM device.

Re: Using Raspberry Pi as a development environment

Posted: Thu Sep 29, 2016 11:16 am
by ESP_igrr
Regarding ESP32 toolchain for Linux ARM hosts: thanks for a reminder, I will add it to the list of pre-built toolchains.