as the shipped Yagarto GNU-ARM-Toolchain from http://www.yagarto.org/ is 'just' a comfortable package for Windows I asked myself if I could build PCAN-Router binaries in my prefered Linux environment

It works!

So here's the short tutorial to build PCAN-Router binaries on Linux. I successfully tested the Linux-built binary from the Examples/1_ROUTING/.out/example_can.bin with the Windows PCANflash2 tool.
So having a commandline flash tool for Linux could be the next step to go

Have fun,
Oliver
ps. Maybe the small changes regarding the Makefile and the fixed filename can go into future PCAN-Router packages - as it works for Windows and Linux now.
### PCAN Router TOOLCHAIN for Debian Linux (unstable / sid)
### Install debian packages with packet manager:
apt-get install gcc-arm-none-eabi
apt-get install binutils-arm-none-eabi
### Downloaded & installed sid packages by hand:
http://ftp.de.debian.org/debian/pool/ma ... -5_all.deb
dpkg -i libnewlib-dev_2.1.0-5_all.deb
http://ftp.de.debian.org/debian/pool/ma ... -5_all.deb
dpkg -i libnewlib-arm-none-eabi_2.1.0-5_all.deb
http://ftp.de.debian.org/debian/pool/ma ... +1_all.deb
dpkg -i libstdc++-arm-none-eabi-newlib_4.8.2-16+1_all.deb
### Result from 'dpkg -l'
ii binutils-arm-none-eabi 2.24-2+4 i386 GNU assembler, linker and binary utilities for ARM Cortex-A/R/M processors
ii gcc-arm-none-eabi 4.8.2-16+8 i386 GCC cross compiler for ARM Cortex-A/R/M processors
ii libnewlib-arm-none-eabi 2.1.0-5 all C library and math library compiled for bare metal using Cortex A/R/M
ii libnewlib-dev 2.1.0-5 all C library and math library intended for use on embedded systems
ii libstdc++-arm-none-eabi-newlib 4.8.2-16+1 all GNU Standard C++ Library v3 for ARM Cortex-A/R/M processors (newlib)
### Compile HEX2BIN tool for Linux
http://sourceforge.net/projects/hex2bin/
http://sourceforge.net/projects/hex2bin ... t/download
tar xvjf Hex2bin-1.0.10.tar.bz2
cd Hex2bin-1.0.10
make clean
make
make install
(installs hex2bin in /usr/local/bin/hex2bin)
### Makefile changes (works for Linux and Windows then)
diff Makefile~ Makefile
217c217
< HEX2BIN = hex2bin.exe
---
> HEX2BIN = hex2bin
### Renaming due to MSDOS naming inconsistency so that it fits the exact name in can_user.c (works for Linux and Windows then)
mv LPC21xx.h lpc21xx.h
(EOF)
Code: Select all
### PCAN Router TOOLCHAIN for Debian Linux (unstable / sid)
### Install debian packages with packet manager:
apt-get install gcc-arm-none-eabi
apt-get install binutils-arm-none-eabi
### Downloaded & installed sid packages by hand:
http://ftp.de.debian.org/debian/pool/main/n/newlib/libnewlib-dev_2.1.0-5_all.deb
dpkg -i libnewlib-dev_2.1.0-5_all.deb
http://ftp.de.debian.org/debian/pool/main/n/newlib/libnewlib-arm-none-eabi_2.1.0-5_all.deb
dpkg -i libnewlib-arm-none-eabi_2.1.0-5_all.deb
http://ftp.de.debian.org/debian/pool/main/libs/libstdc++-arm-none-eabi/libstdc++-arm-none-eabi-newlib_4.8.2-16+1_all.deb
dpkg -i libstdc++-arm-none-eabi-newlib_4.8.2-16+1_all.deb
### Result from 'dpkg -l'
ii binutils-arm-none-eabi 2.24-2+4 i386 GNU assembler, linker and binary utilities for ARM Cortex-A/R/M processors
ii gcc-arm-none-eabi 4.8.2-16+8 i386 GCC cross compiler for ARM Cortex-A/R/M processors
ii libnewlib-arm-none-eabi 2.1.0-5 all C library and math library compiled for bare metal using Cortex A/R/M
ii libnewlib-dev 2.1.0-5 all C library and math library intended for use on embedded systems
ii libstdc++-arm-none-eabi-newlib 4.8.2-16+1 all GNU Standard C++ Library v3 for ARM Cortex-A/R/M processors (newlib)
### Compile HEX2BIN tool for Linux
http://sourceforge.net/projects/hex2bin/
http://sourceforge.net/projects/hex2bin/files/latest/download
tar xvjf Hex2bin-1.0.10.tar.bz2
cd Hex2bin-1.0.10
make clean
make
make install
(installs hex2bin in /usr/local/bin/hex2bin)
### Makefile changes (works for Linux and Windows then)
diff Makefile~ Makefile
217c217
< HEX2BIN = hex2bin.exe
---
> HEX2BIN = hex2bin
### Renaming due to MSDOS naming inconsistency so that it fits the exact name in can_user.c (works for Linux and Windows then)
mv LPC21xx.h lpc21xx.h
(EOF)