For me personally is more convenient to build the code directly from the IDE where I'm editing it so here is an article how to configure building of NuttX from Eclipse. I'm configuring this in Ubuntu 14.04. Also I assume that you already have configured the build environment for the NuttX. If you haven't you can check this first:
1. Download the latest Eclipse IDE for C++ developers
2. Load the NuttX into Eclipse
Select "New" and then select "Makefile Project with Existing Code'
3. Point the location of the code and select the toolchain
You can "Browse" or just enter the location to your nuttx folder.
Also you need to select "GNU Autotools Toolchain"
Click "Finish" and you should see the NuttX source loaded
4. Build the code
Right click on the project "nuttx" and select "Build Project" or click the icon as shown here
I already build the code from the menu and that's why you can see output in console.
Since now we have our build set up it's time to configure the debugging: