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
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.
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: