Skip to content

Setting up development environment on Linux

Robert edited this page Aug 7, 2021 · 24 revisions
  1. Install tools via apt-get:
apt-get install screen git sdcc doxygen uncrustify libusb-1.0-0-dev python3-pip texlive-latex-base texlive-latex-extra texlive-extra-utils poppler-utils cmake cppcheck r-base-core shellcheck

Note: libusb is needed by stm8flash.

  1. Clone, build and install stm8flash:
git clone https://github.com/vdudouyt/stm8flash.git
cd stm8flash/
make
make install
  1. Install python libraries.
pip3 install pyserial
pip3 install flake8 flake8-html
  1. Install R libraries, run R in command line:
pi@raspberrypi:~/IonizationChamber/software/DataAcquisitionFromDevice $ R

R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: arm-unknown-linux-gnueabihf (32-bit)

Type (write yes on next prompts):

install.packages('latticeExtra')
install.packages('gridExtra')
install.packages('Hmisc')
  1. Stm8flash enumerates as USB device, add access to this device for non-root users (so that its possible to flash the chip without being root):
chmod o+w /dev/bus/usb/001/004

In above example, /dev/bus/usb/001/004 is where the stm8flash enumerates, you will get id of your stm8flash from error message when trying to flash the board.