I realize that there are already multiple tutorials on how to configure GCC along with Eclipse or SEGGER Embedded Studio (for use on a Mac), but this tutorial goes over setting up a different IDE. The more choices the better, right? ;)
The IDE of choice for me is NetBeans. NetBeans is well known for Java development but not as much for C/C++ or embedded. However, I personally have been using it for embedded development for about 10 years now (both embedded Linux and MCU-level development). In this tutorial, I'll be going over how to set up and configure the development environment and NetBeans from scratch for developing and debugging nRF52 applications (I used the nRF52840 Preview Development Kit, but really the steps are transferrable to be used with any nRF5x development kit).
I must warn you that the tutorial may be a bit lengthy, but that's because I tried to include every screenshot and image showing details for each of the steps involved. Because of that, I will provide a link to the blog post (which is hosted on my website).
I thought others may benefit from this tutorial especially if they're looking for other options for development on a Mac using open source tools.
Hope you find it useful!
Read the tutorial here.
So, one quicker way to do this is to edit the configurations.xml file located under the NetBeans project folder, and look for:
Here you can add all the preprocessors. I guess you can even write a shell or python script to automatically parse the Makefile and add the macros to the configurations.xml file! ;)
Sorry for the late response. Yes, this is a downside of NetBeans. However, I will look into a better way and report back. Thanks!
This is great, thanks! Though I have one issue: Code Assistance in Netbeans doesn't pick up #defines from the Makefile, e.g. CFLAGS += -DBOARD_PCA10056 and therefore sees BOARD_PCA10056 as undefined.
I can fix this by manually adding all the relevant defines to Code Assistance -> C Compiler -> Preprocessor Definitions, but that's a little laborious:)
Is there a faster way to make Netbeans' Code Assistance recognise defines from the Makefile?
Very good tutorial!
Thank you a lot for sharing your insights.
This is great, thanks!