gch1p / inverter-tools

advanced tools for voltronic inverters
BSD 3-Clause "New" or "Revised" License
18 stars 6 forks source link

Install GCC on Raspberry Pi and build C++17 programs #1

Closed blacksocket closed 1 year ago

blacksocket commented 3 years ago

Hello,

Do I need first Install GCC on Raspberry Pi and build C++17 programs ? I used this guide below but not sure how to compile the inverter tools. Could you please provide the exact commands to build this software on RPI ?

https://gist.github.com/sol-prog/95e4e7e3674ac819179acf33172de8a9

Commands used in the video https://youtu.be/-bCG87jBDqA :

sudo apt update && sudo apt upgrade -y

git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git cd raspberry-pi-gcc-binary tar -xjvf gcc-9.1.0-armhf-raspbian.tar.bz2 sudo mv gcc-9.1.0 /opt cd .. rm -rf raspberry-pi-gcc-binary

cd ~ echo 'export PATH=/opt/gcc-9.1.0/bin:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/opt/gcc-9.1.0/lib:$LD_LIBRARY_PATH' >> ~/.bashrc . ~/.bashrc sudo ln -s /usr/include/arm-linux-gnueabihf/sys /usr/include/sys sudo ln -s /usr/include/arm-linux-gnueabihf/bits /usr/include/bits sudo ln -s /usr/include/arm-linux-gnueabihf/gnu /usr/include/gnu sudo ln -s /usr/include/arm-linux-gnueabihf/asm /usr/include/asm sudo ln -s /usr/lib/arm-linux-gnueabihf/crti.o /usr/lib/crti.o sudo ln -s /usr/lib/arm-linux-gnueabihf/crt1.o /usr/lib/crt1.o sudo ln -s /usr/lib/arm-linux-gnueabihf/crtn.o /usr/lib/crtn.o

g++-9.1 -std=c++17 -Wall -pedantic test_fs.cpp -o test_fs ./test_fs

Thank You!

blacksocket commented 2 years ago

Just found another implementation of P17 protocol in php via USB:

https://github.com/domib97/solar.io/blob/main/source/var/www/html/mpi_3phasen_serie.php