User Tools

Site Tools


tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tools [2014/03/01 01:02] – created cedric.eloytools [2021/07/30 10:56] (current) – [FLIR camera] damien
Line 1: Line 1:
 +====== Development tools ======
  
 +===== ARM GNU C/C++ toolchain for bare-metal devices =====
 +
 +Download the arm-none-eabi-gcc-4.9 toolchain from the GNU ARM Embedded Toolchain project (currently tested with the 14.07 release https://launchpad.net/gcc-arm-embedded/+milestone/4.9-2014-q4-major ).
 +
 +Extract the archive (e.g. to ~/toolchains ).
 +
 +Update your PATH to find the newly installed toolchain. In your ''~/.profile'' (for //bash//) or your ''~/.zshrc'' (for //zsh//) , add 
 +<code>
 +PATH="$HOME/toolchains/gcc-arm-none-eabi-4_9-2014q4/bin:$PATH"
 +</code>
 +
 +Restart your session so that is sourced again, and verify that you are running the correct arm-none-eabi-gcc version:
 +
 +<code>
 +$ arm-none-eabi-gcc --version
 +arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]
 +Copyright (C) 2014 Free Software Foundation, Inc.
 +This is free software; see the source for copying conditions.  There is NO
 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 +</code>
 +
 +
 +
 +===== Add compiler to Code::Blocks =====
 +
 +If you want to use an IDE like Code::Blocks, you can configure it to use the newly installed toolchain.
 +
 +  * Settings > Compiler
 +  * Copy "GNU GCC Compiler", call the new compiler "Quimesis ARM Linux Compiler"
 +  * Toolchain executables:
 +    * Compiler's installation directory: $HOME/toolchain/usr/bin
 +    * C compiler: //arm-linux-gcc//
 +    * C++ compiler: //arm-linux-g++//
 +    * Linker for dynamic libs: //arm-linux-g++//
 +    * Linker for static libs: //arm-linux-ar//
 +
 +When you create your project in Code::Blocks, be sure to select the "Quimesis ARM Linux Compiler".
 +
 +===== Libraries for host developments =====
 +
 +  * libfuse-dev
 +
 +
 +===== Run a 32-bit toolchain on a 64-bit Ubuntu =====
 +
 +<code>
 +sudo apt-get install lib32stdc++6
 +sudo apt-get install lib32z1
 +</code>
 +
 +
 +===== Windows tools =====
 +
 +ST/Link v2 windows driver: STSW-LINK009 :  http://www.st.com/web/en/catalog/tools/PF260219 
 +
 +ST/Link Utility: STSW-LINK004 : http://www.st.com/web/en/catalog/tools/PF258168
 +
 +GDB server for emIDE: http://emide.org/files/stlinkgdbserver.7z
 +
 +
 +===== CANUSB module =====
 +
 +To use the CANUSB module :
 +  - Connect CAN_L (pin2), CAN_H (pin7) and CAN_GND (pin3) (see http://www.can232.com/?page_id=16)
 +  - Follow this step-by-step guide to install the Lawicel CANUSB adapter on Linux (**mainly step 1 to 6**) : http://pascal-walter.blogspot.com/2015/08/installing-lawicel-canusb-on-linux.html
 +
 +In brief :
 +  * Install **can-utils** package :
 +<code>
 +sudo apt-get install can-utils
 +</code>
 +  * Check if the kernel modules "can", "can_raw" and "slcan" are already loaded using **lsmod**. If not 
 +<code>
 +sudo modprobe can
 +sudo modprobe can_raw
 +sudo modprobe slcan
 +</code>
 +Make them load automatically :
 +<code>
 +sudo nano /etc/modules
 +</code>
 +Add the three modules "can", "can_raw" and "slcan" to the list (each goes in one line).
 +  * Bind the CANUSB device (on port **/dev/ttyUSB0**) to the slcan interface (**slcan0**) and set up baud rate to 1Mbit/s (**-s8**) :
 +<code>
 +sudo slcand -o -c -f -s8 /dev/ttyUSB0 slcan0
 +</code>
 +  * Bring the slcan interface up :
 +<code>
 +sudo ifconfig slcan0 up
 +</code>
 +  * To intercept CAN messages (sended and received) :
 +<code>
 +candump slcan0
 +</code>
 +  * To send a CAN message (for CAN 2.0 frames, max 8 bytes separated by '.' and given in hex format) :
 +<code>
 +cansend slcan0 <ID>#<byte1>.<byte2>.<...>.<byte8>
 +</code>
 +
 +
 +===== USB-I2C (USB-ISS) module =====
 +
 +from [[https://www.robot-electronics.co.uk/htm/usb_iss_tech.htm]]
 +
 +To be used with [[https://github.com/milidam/devantech | i2c-devantech-iss]] kernel module, to access a dedicated ''/dev/i2c-x'' device on one's Linux desktop.
 +
 +Then you can use the ''/dev/i2c-x'' device directly, or request another kernel module to use it:
 +<code>
 +echo <your_module> <device_address> > /sys/bus/i2c/devices/i2c-<x>/new_device
 +</code>
 +
 +When using ''zsh'', the latest command may result into failure ''zsh: file exists: /sys/bus/i2c/devices/i2c-<x>/new_device''; in that case, just switch to //bash//, and the same command will succeed.
 +
 +===== FLIR cameras =====
 +==== PureThermal2 USB module ====
 +
 +https://groupgets.com/manufacturers/getlab/products/purethermal-2-flir-lepton-smart-i-o-module
 +https://lepton.flir.com/getting-started/
 +
 +On Ubuntu, can be used with the [[https://github.com/groupgets/GetThermal|GetThermal interface]].
 +
 +
 +==== FLIR ONE PRO ====
 +
 +Normally foressen to work with Android.
 +
 +But can be used on Linux using [[https://source.dpin.de/nica/flir-gtk|flir-gtk]]((on Ubuntu < 20.04, this requires the amnual install of https://github.com/DaveGamble/cJSON)).
 +
 +See also https://www.dpin.de/nf/thermal-camera-on-linux-flir-one-pro/.