ESP8266: Setting up Netbeans to compile to the esp8266

A quick post in how to setup Netbeans 8 to be able to program native C/C++ programs for the esp8266. Most of the people use Eclipse, but sorry, I’m a Netbeans guy 🙂

1st) Start up Netbeans and go to the menu Tools->Options

2nd) Select C/C++. You might have to install the C/C++ plugin if you haven’t done it yet or if you don’t have a full installation of Netbeans.

3rd) Select the Add button bellow Tool Collection list, and create a new Compiler tools for the esp8266:


Make sure that Tool Collection Family is GNU and give it a cool name. As we can see the tool directory is where the XTensa compiler tools are installed. Please note that I’ve installed the C++ version of tools that have the C and C++ compiler.

Press Apply.

4th) Add the complete path to the C and C++ compiler:

5th) Check configuration. Press the Versions button to show the current versions of the Xtensa compiler and check out the Code Assistance tab to see that the files are automatically defined:


Press Apply and OK and we are ready.

Example: Importing and compiling esp_mqtt project:

Select File->New Project and choose C/C++ Project with existing sources:


Press Next and select the directory where the project files are. (I’ve already have git “cloned” them).


Just make sure that the Tools collection selected is now the previously defined tool set: ESP8266_XTensa.

The new project will run make clean and make automatically and should compile things just fine:



4 thoughts on “ESP8266: Setting up Netbeans to compile to the esp8266

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.