Setup
./setup.sh
d,:'......'.
:cO;'..
.. .'';l,;..'..
.cdd;.. .:o:',;co,c : ;
.,,,;' kWXKKK0d. .dx. .,'xl:,...'',. .;
klo .:lO .lodl:kkddxloc:' ,.., ..','....,'
Od0 l:N. .'lOx:. ....;oxlcl'.. ',,oxd
,d. ;lolccccc:;lc;;:cllc::;;;;;;::::::clodxxxdlc:;,,:lxdc
\.,coxKkdOXXXkx0Xxdddddddooooooooolloooooddxxkk0NNOdc,,:
,,.cKWOkdd. 'll:.
,l;;kWXkd. 'cl,
,;:dkOOx:c:,'..''... ..,,,;.
.';;':OXXKK0OOxkcc:,.
;oo0000000oc:
platin install issue:
ROOT=$(pwd)
INSTALL_DIR=$ROOT/local/bin/
rm -r $INSTALL_DIR/lib/platin/gems/
$ROOT/llvm/tools/platin/install.sh -i $INSTALL_DIR
Setup $PATH (GenE & aladdin)
GENE_BASE=...
export PATH=$GENE_BASE/local/bin:$PATH
export PATH=$GENE_BASE/aladdin:$PATH
Issues with xmc4500
When generating the xmccomm tool there might be an issue with undefined reference to `__aeabi_memcpy' This is because arm-none-eabi-gcc 4.8 has a bug with the -fno-builtin flag The fix is to use versions >= 4.9 (downloadable from https://launchpad.net/gcc-arm-embedded)
Requirements
apt-get install texinfo patch make cmake subversion gcc g++ bison flex libc6-dev-i386
# for patmos/platin
apt-get install ruby ruby-dev liblpsolve55-dev libelf-dev libboost-dev libboost-program-options-dev openjdk-8-jdk gawk flex bison libtinfo-dev libxml2-dev
# for aladdin (using python3)
apt-get install python3
apt-get install python3-{numpy,future,matplotlib,git,psutil,pexpect,serial,tk,prompt-toolkit,pyqt5}
pip3 install tqdm
# for GenE
apt-get install libgmp-dev
setup JLink
it works with version 6.10a
wget https://www.segger.com/downloads/ ... JLink_Linux_V610a_x86_64.tgz
JLinkExe needs to be in the $PATH
udev rules
edit /etc/udev/rules.d/10-infineon-xmc4500.rules
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="058b", ATTR{idProduct}=="0058", MODE:="0666"
edit /etc/udev/rules.d/10-jlink.rules
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="1366", ATTR{idProduct}=="0101", MODE:="0666"
write access for /dev/{ttyS*|ttyUSB|ttyACM}
edit /etc/udev/rules.d/90-relax-ttyS-perms.rules
#KERNEL=="ttyS*", MODE="0666"
#KERNEL=="ttyUSB*", MODE="0666"
KERNEL=="ttyACM*", MODE="0666"
disable ModemManager
ModemManager may try find a modem at serial ports, rendering aladding unable to
establish a connection to the device. Either tell ModemManager to ignore the
device by setting $ID_MM_DEVICE_IGNORE
in udev rules for the device or just
disable ModemManager:
sudo systemctl stop ModemManager.service
sudo systemctl disable ModemManager.service
setup metrics
to copy metrics files to ${ROOT}/local/bin with the patmos- prefix setup.sh must run again after the first run of setup.sh where metrics are cloned
Workflow
See example in patmos/doc/handbook/sort/ (run.sh) and documentation in patmos/doc/handbook/patmos_handbook.pdf
Simulate
pasim sort
Development Environment
Activate Debug Build of LLVM
cmake -DCMAKE_BUILD_TYPE=Debug ..
ARMv6M Support
echo "int main(){return 23;}" > file.c
patmos-clang -target armv6m-none-eabi -O0 -o file.elf file.c -mllvm '-mserialize=file_arm.pml' -integrated-as -ccc-gcc-name arm-none-eabi-gcc --specs=nosys.specs
platin for ARM
cd $PLATIN_SRC_ROOT_DIRECTORY
export GEM_PATH=`pwd -P`/install/lib/platin/gems:/var/lib/gems/1.9.1:$HOME/.gem/ruby/1.9.1
mkdir -p install
./install.sh -i install
./install/bin/platin pml-config --target thumbv6m-none--eabi -o thumbv6m_config.pml -m 2k -M fifo8
ruby -I ./install/bin/../lib/platin ./install/bin/../lib/platin/tools/wcet.rb -i './thumbv6m_config.pml' --enable-wca -b file.elf -e main -i 'file_arm.pml' -o file_arm_out.pml --outdir file_arm_main --report file_arm_report.txt
Issues
ARM Support
Support for armv7 (Cortex-M3, Cortex-M4) seems not to be fully complete: platin pml-config --target arm-unknown-unknown-elf -o config.pml -m 2k -M fifo8 FATAL: unknown architecture ["arm", "unknown", "unknown", "elf"] ({"patmos"=>Patmos::Architecture, "armv4t"=>ARM::Architecture, "armv7"=>ARM::Architecture}) platin pml-config --target armv7-unknown-unknown-elf -o config.pml -m 2k -M fifo8 => not working !
Building patmos-emulator fails
with exception [error] File name too long manuall set (in setup.sh) BUILD_EMULATOR=false
configure: error: `CCASFLAGS' was not set in the previous run
rm gene/newlib/build/patmos-unknown-unknown-elf/libgloss/config.cache