embeddedProject

Setup toolchain and remote debug

https://blog.jetbrains.com/clion/2018/09/initial-remote-dev-support-clion/?fbclid=IwAR1x0Y8wC8Lr7KHFZui8Xj9QEbFQ5DoBaKVO55o_0b6USQ-Yidcolhl4PQU#initial_remote_projects_support_what_s_that    

Build instructions

Build steps:

  1. Build libzmq via cmake. This does an out of source build and installs the build files

    • download and unzip the lib, cd to directory
    • mkdir build
    • cd build
    • cmake ..
    • sudo make -j4 install
  2. Build cppzmq via cmake. This does an out of source build and installs the build files

    • download and unzip the lib, cd to directory
    • mkdir build
    • cd build
    • cmake ..
    • sudo make -j4 install

Using this:

A cmake find package scripts is provided for you to easily include this library. Add these lines in your CMakeLists.txt to include the headers and library files of cpp zmq (which will also include libzmq for you).

#find cppzmq wrapper, installed by make of cppzmq
find_package(cppzmq)
target_link_libraries(*Your Project Name* cppzmq)

Setup symbolic links for customer display

  1. Create the file in /etc/udev/rules.d/99-usb-serial.rules
  2. To the file write: KERNEL=="1-1.1.3", ATTRS{idVendor}=="0557", SYMLINK+="display"
  3. reload udev ruled: udevadm control --reload-rules

sudo sh -c "echo 0557 2008 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id"

Setup a thread to run the server on zybo at boot:

To run the server, see the readme from blackboard about the database demo! Create a file called startdb.service in /lib/systemd/system/startdb.service containing:

[Unit]
Description=zybo database service

[Service]
ExecStart=/root/zybo-files/db_server_zybo

[Install]
WantedBy=multi-user.target

Start and enable the service:

sudo systemctl start startdb
sudo systemctl enable startdb