Netbeans Initial Project Setup (#40)

Merged #40
This commit is contained in:
Oliver Ainger 2017-01-20 18:24:16 +00:00 committed by Dimitris Panokostas
parent 5686300b3f
commit 865598743a
13 changed files with 6127 additions and 0 deletions

32
nbproject/Readme.md Normal file
View file

@ -0,0 +1,32 @@
## NetBeans Project
This folder contains the project files to enable remote compiling and debugging of Amiberry. Currently tested on Windows version of the NetBeans IDE.
### IDE Setup
* Download Netbeans C++ IDE from: https://netbeans.org/
* Download JDK from : http://www.oracle.com/technetwork/java/javase/downloads
* Update Netbeans Shortcut Target to the following provided default paths are used: `"C:\Program Files\NetBeans 8.2\bin\netbeans64.exe" --jdkhome "C:\Program Files\Java\jdk1.8.0_121"`
* Launch NetBeans from the modified shortcut
* Open Project > Navigate to this folder on your local system
* Assumed your RPi has the hostname of `retropie`, if not, add a new C/C++ Build Host under the Services tab, entering Hostname/IP and username/password, leaving the rest as default
### Pi Setup
* On the remote RaspberryPi
* Setup a script for executing gdb as root
* `sudo nano /home/pi/debug_script`
* Copy the following in to this new file:
```shell
#!/bin/bash
PROG=$(which gdb)
sudo $PROG "$@" 2>&1 /tmp/error.log
```
* Set new script as excutable
* `sudo chmod +x /home/pi/debug_script`
### Remote Debugging
Make sure the Debug profile is selected in NetBeans to ensure `-g` switch is enabled when compiling. If breakpoints don't hit when you expect them to do a make clean from NetBeans.