forked from sfeakes/AqualinkD
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Lee Ballard edited this page Sep 11, 2020
·
25 revisions
see also https://github.com/sfeakes/AqualinkD/wiki
sudo apt-get install git
cd ~
mkdir git
cd git
git clone https://github.com/ballle98/AqualinkD.git
make clean
make
sudo make install
sudo apt-get install git
cd ~
mkdir git
cd git
git clone https://github.com/ballle98/AqualinkD.git
git checkout dev/rebase-1.3.x
make clean
make
sudo make install
release/aqualinkd -v -d -c /etc/aqualinkd.conf
- start with these instructions https://www.cososo.co.uk/2015/12/cross-development-using-eclipse-and-gcc-for-the-rpi/
- Install GCC Cross compiler from http://gnutoolchains.com/raspberry/
- Synchronise header file and library versions with c:\SysGCC\Raspberry\TOOLS\UpdateSysroot.exe
- import project from github
- configure as makefile project
- Use these instructions to configure the toolchain https://stackoverflow.com/a/27180772/454658
- Unfortunately it's not obvious or intuitive, how to set the properties for a particular (cross-)toolchain, that should be bound to a project. To make these property settings available, first go to the C++ Build/Builder Settings Tab in the project properties dialog and check the Generate Makefiles automatically option. Don't click the Apply or OK button now!
- Proceed to the C++ Build->Settings sub page and fill in the cross-toolchain prefix, and path where the binaries are actually located.
- Go back to the C++ Build/Builder Settings Tab and uncheck the Generate Makefiles automatically
- Configure Build Output Parser compiler pattern https://help.eclipse.org/2020-06/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Fconcepts%2Fcdt_c_scanner_discovery.htm
- Go to either "Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery Tab -> CDT GCC Build Output Parser" or "Project -> Properties -> C/C++ General -> Preprocessor Include... -> Providers -> CDT GCC Build Output Parser"
- Change compiler pattern to add wildcard match in front of gcc so it will match arm-linux-gnueabihf-gcc
(.*g?cc)|(.*[gc]\+\+)|(clang)
- When you build you should see wrench icons on the c files and the grey out sections in the editor related to #ifdef should be correct. Note you may need to change the active build configuration or select "Project -> C/C++ Index -> Rebuild"
You can follow these instructions to enable core files https://pve.proxmox.com/wiki/Enable_Core_Dump_systemd
rebuild the code with debug symbols, and turn on address sanitize (we're looking for memory corruption)
make DBG="-g -O0 -fsanitize=address -static-libasan"
make install
when it crashes "sudo -i" to become root, run gbd and dump the back trace with the bt command
cd /var/lib/coredumps/
ls
gdb /home/pi/git/AqualinkD/release/aqualinkd core-aqualinkd-sig11-user0-group0-pid386-time1554347133
bt