Skip to content

Instantly share code, notes, and snippets.

View cuihantao's full-sized avatar

Hantao Cui cuihantao

View GitHub Profile
@cuihantao
cuihantao / README-machinekit-terasic-de0.md
Created April 11, 2017 03:42 — forked from mhaberler/README-machinekit-terasic-de0.md
Installing the Machinekit Altera CycloneV test image

Contents

This SD image is a debian jessie console image with:

  • a 4.1.22-ltsi-rt kernel with RT-PREEMPT patches applied
  • tested on Terasic DE0-Nano-SoC Kit, other SoCKit platforms should work with appropriate dtb
  • machinekit RIP-build under /home/machinekit/machinekit, all build artefacts are in place (no need to run make)
  • machinekit packages are NOT installed and you do not have to!
  • all machinekit build- and runtime required packages ARE installed.
  • /home/machinekit/.bashrc already set up to run machinekit from the RIP build directory.
  • one known-to-work configuration with hostmot2/onboard FPGA support is: machinekit/configs/hm2-soc-stepper/5i25-socfpga.ini
@cuihantao
cuihantao / gist:934c50a36c04b8b395834743cd4abdce
Created September 3, 2016 18:46 — forked from craigminihan/gist:b23c06afd9073ec32e0c
Build GCC 4.9.2 for C/C++ on CentOS 7
sudo yum install libmpc-devel mpfr-devel gmp-devel
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
make install

hcui7@CUI-T450:~/py/GridDyn/build/test$ ./testSystem

    Running 30 test cases...
    (-0.001000)[sim]::||WARNING||WARNING::Power Adjust Loop iteration count limit exceeded
    (598.000000)[sim]::||WARNING||solver error return
    Warning file ../matlab_test_files/fault.mis invalid or empty
    /home/hcui7/py/GridDyn/test/systemTests/testInputs.cpp(360): error: in "input_tests/input_execTest": check count == mp.second[3] has failed [0 != 2]
    (1.000000)[sim]::saving recorder output:busdata.dat
    completed power flow

case118.m completed in 0.003686

GridDyn Installation on Ubuntu 14.04.md

Preparation

# apt-get install git cmake doxygen libopenblas-dev

Clone GridDyn Repo

git clone https://github.com/LLNL/GridDyn.git

Install RTAI 5.0-test2 on Ubuntu 14.04 Kernel 3.18.20

Preparation

download and unzip

cd /usr/src
curl -L --insecure https://www.rtai.org/userfiles/downloads/RTAI/rtai-5.0-test2.tar.bz2 | tar xj
curl -L https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.20.tar.xz | tar xJ
curl -L http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.20-vivid/linux-image-3.18.20-031820-generic_3.18.20-031820.201508081633_amd64.deb -o linux-image-3.18.20-generic-amd64.deb