Home

RC01 Setting up the Peak Can Bus native extension (Classic/FD)

The article will help you to configure and set-up the PCAN adapters (Classic/FD) native extension.



Native extension

The Peak CAN-Bus adapter uses a native extension, meaning that it instantiates a native executables to open and read data from the devices. Find more about native extensions in the manual.
This native extension contains a source library from Peak and comes with pre-compiled native executables for both Classic CAN and FD.

A08 Native Extensions



Re-compiling the native extension

You just need to re-compile the native extension if the original native executables do not fit to your system (e.g. library incompatibilities with Linux).

Go to Preferences->impulse->Native Extensions->Peak Can (FD) Bus Native.

mkdir -p linux-x86_64
gcc -m64 main.c ../flux.c ../lz4.c ../fastlz.c linux/src/libpcanbasic_legacy.cpp  -I .. -I .   -D FLX_CONTROL -D FLX_COMPRESS -D FLX_STDIO  -O3 -Ilinux -Ilinux/src -Ilinux/src/libpcanfd  -DNO_RT -lm -lpthread    -o linux-x86_64/peakcan
chmod 777 linux-x86_64/peakcan

(similar output for FD)

If the output shows an error, you might need to extend the parameters for additional flags and libraries. If you can not resolve, send an email to This email address is being protected from spambots. You need JavaScript enabled to view it. with the text of the message output field.



Editing the native extension

If you press Edit Extension, impulse opens an editor with the extension sources.
This enables experienced users to enhance the readers native extension or to explore the CAN content in a different manner. We are looking forward to get your feedback!


toem

technical software and tooling

Company

Contact Us

This email address is being protected from spambots. You need JavaScript enabled to view it.