RoadTest: Microchip SAMA5D2 (Rev. B) Xplained Ultra Evaluation Kit
Author: matfur92
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: SAMA5D3 Xplained, Atmel SAMA5D4 Xplained Ultra, Arduino Yun, Raspberry Pi 3
What were the biggest problems encountered?: Poky Yocto with a package manager (ex: apt-get) Ubuntu or Debian working images already compiled and compatible with SDHC
Detailed Review:
Hi to all.
This is my review of SAMA5D2 (Rev. B) Xplained Ultra Evaluation Kit.
Let's we started with the unboxing :
As you can see the box contains only the board and one USB cable to connect it to the PC.
No paper manual is included, only a cardboard with some details regarding how and where is possible to find documentation and some files like drivers o SO images / demo .
To do a complete review of this board, my idea was to install OctoPrint enviroment, create a plugin for it that was able to read temperature from an attached sensor on Arduiono pins.
My first step was in order to install the Octoprint environment.
1) Install USB drivers for Atmel and Segger tools : https://gallery.atmel.com/Products/Details/6272a8fd-68fe-43d8-a990-741878cfe7b6
2) Open JP1 to enable EDBG
3) Close JP2 to disable de DEBUG port J1 (needed to avoid conflict on the UART TX line)
4) Connect the USB cable to the board (J14 EDBG-USB)
5) Install putty on my PC: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
6) On windows : Device management > Ports > EDBG Virtual COM Port (COM3) > Properties > Port Setting
Baud rate 115200
Data 8 bits
Parity None
Stop 1 bit
Flow control None
7) Open putty serial session with the same settings
8) Type enter button on the console session to see :
Poky (Yocto Project Reference Distro) 2.0.1 sama5d2-xplained /dev/ttyS0 sama5d2-xplained login:
9) Type "root" to enter as root user.
10) Type "uname -a" to have more informations :
root@sama5d2-xplained:~# uname -a Linux sama5d2-xplained 4.1.0-linux4sam_5.3 #1 Sat Apr 16 10:19:57 CEST 2016 armv7l GNU/Linux root@sama5d2-xplained:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 939M 258M 634M 29% / devtmpfs 219M 0 219M 0% /dev tmpfs 251M 156K 251M 1% /run tmpfs 251M 96K 251M 1% /var/volatile root@sama5d2-xplained:~# free -m total used free shared buff/cache available Mem: 500 7 472 0 20 482 Swap: 0 0 0 root@sama5d2-xplained:~# ifconfig eth0 Link encap:Ethernet HWaddr fc:c2:3d:04:70:72 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:33 Base address:0x8000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:700 (700.0 B) TX bytes:700 (700.0 B) root@sama5d2-xplained:~# python -V Python 2.7.9 root@sama5d2-xplained:~# pip -V pip 7.1.0 from /usr/lib/python2.7/site-packages (python 2.7)
11) Install virtualenv (prerequisite for OctoPrint)
curl -O --insecure https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz tar xvfz virtualenv-15.1.0.tar.gz cd virtualenv-15.1.0 python setup.py install virtualenv --version
With these commands the "15.1.0" version of virtualenv is installed
12) Install OctoPrint
date -s "05 NOV 2017 14:22:00" mkdir octoprint cd octoprint wget --no-check-certificate https://github.com/foosel/OctoPrint/archive/master.zip unzip master.zip cd OctoPrint-master pip install --trusted-host pypi.python.org autopep8 certifi pip install --trusted-host pypi.python.org pip --upgrade virtualenv venv ./venv/bin/python setup.py install
At this point one thing block me to the next steps : the absence of the gcc compiler, it block the setup.py.
My intention was to install it from a repository, but I find no precompiled version ready to download. No Advanced Packaging Tool or something like that is present in this board. The only idea that I had was to make it :
On Sama :
mkdir gcc cd gcc
On my PC (with Bash on Ubuntu on Windows):
wget http://ftp.it.debian.org/debian/pool/main/g/gcc-defaults/gcc_6.3.0-4_armhf.deb ar x gcc_6.3.0-4_armhf.deb tar xf data.tar.xz tar -cvf gccArmV7.tar ./usr scp gccArmV7.tar root@192.168.1.6:/home/root/gcc
On sama:
tar -xvf gccArmV7.tar
But at this point I was blocked by the space, the expand process was in error. This wasn't the correct way.
Frustrated by this point, I tryed to found a new way to have a more flexible environment. My choose was to get a working Ubuntu distro on Sama5D2 on a SDHC card of 8GB.
I found a splendid guide that, step-by-step, illustrated the wawy to create a working Ubuntu distro at http://www.eewiki.net/display/linuxonarm/SAMA5D2+Xplained+Ultra .
I followed this with some details on the steps:
cd ~/ wget -c https://releases.linaro.org/components/toolchain/binaries/6.4-2017.08/arm-linux-gnueabihf/gcc-linaro-6.4.1-2017.08-x86_64_arm-linux-gnueabihf.tar.xz tar xf gcc-linaro-6.4.1-2017.08-x86_64_arm-linux-gnueabihf.tar.xz export CC=`pwd`/gcc-linaro-6.4.1-2017.08-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- ${CC}gcc --version
And the last response was :
arm-linux-gnueabihf-gcc (Linaro GCC 6.4-2017.08) 6.4.1 20170707 Copyright (C) 2017 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.
cd ~/ git clone https://github.com/u-boot/u-boot cd u-boot/ git checkout v2017.09 -b tmp wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.09/0001-sama5dX-fixes.patch patch -p1 < 0001-sama5dX-fixes.patch make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} sama5d2_xplained_mmc_defconfig make ARCH=arm CROSS_COMPILE=${CC}
cd ~/ git clone https://github.com/RobertCNelson/armv7_devel cd armv7_devel/
For v4.9.x-sama5-armv7 (Longterm 4.9.x):
git checkout origin/v4.9.x-sama5-armv7 -b tmp
For v4.14.x-sama5-armv7 (Longterm 4.14.x): <-- I selected this
git checkout origin/v4.14.x-sama5-armv7 -b tmp
Build
./build_kernel.sh
Root File System
Debian 9
debian|temppwd
root|root
cd ~/ wget -c https://rcn-ee.com/rootfs/eewiki/minfs/debian-9.2-minimal-armhf-2017-10-10.tar.xz sha256sum debian-9.2-minimal-armhf-2017-10-10.tar.xz 31419dacdde26c62ea17670d262c01bc562881f5129b43b822c5de1286ba29d3 debian-9.2-minimal-armhf-2017-10-10.tar.xz tar xf debian-9.2-minimal-armhf-2017-10-10.tar.xz
Ubuntu 16.04 LTS
ubuntu|temppwd
cd ~/ wget -c https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-16.04.3-minimal-armhf-2017-10-10.tar.xz sha256sum ubuntu-16.04.3-minimal-armhf-2017-10-10.tar.xz b9c56cc566978addd00e9187fbf19bea3f3ef9ac4256927451043341a9ca1ad6 ubuntu-16.04.3-minimal-armhf-2017-10-10.tar.xz tar xf ubuntu-16.04.3-minimal-armhf-2017-10-10.tar.xz
For these instruction we are assuming, DISK=/dev/sdX
, lsblk is very useful for determining the device id.
NOTE : I deleted all partitions on the SD card. The space was totally empty.
export DISK=/dev/sda
Create Partition Layout: With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
sudo sfdisk --version sfdisk from util-linux 2.27.1
If sfdisk >= 2.26.x <-- I selected this
sudo sfdisk ${DISK} --force <<-__EOF__ 1M,48M,0xE,* 49M,,,- __EOF__
If sfdisk <= 2.25.x
sudo sfdisk --unit M ${DISK} <<-__EOF__ 1,48,0xE,* 49,,,- __EOF__
Format Partition for DISK=/dev/mmcblk0 :
sudo mkfs.vfat -F 16 -n BOOT ${DISK}p1 sudo mkfs.ext4 -L rootfs ${DISK}p2
Format Partition for DISK=/dev/sdX :
sudo mkfs.vfat -F 16 -n BOOT ${DISK}1 sudo mkfs.ext4 -L rootfs ${DISK}2
Mount Partition:
sudo mkdir -p /media/boot/ sudo mkdir -p /media/rootfs/
Mount Partition for DISK=/dev/mmcblk0 :
sudo mount ${DISK}p1 /media/boot/ sudo mount ${DISK}p2 /media/rootfs/
Mount Partition for DISK=/dev/sdX :
sudo mount ${DISK}1 /media/boot/ sudo mount ${DISK}2 /media/rootfs/
Install Bootloader:
sudo cp -v ./u-boot/boot.bin /media/boot/BOOT.BIN sudo cp -v ./u-boot/u-boot.img /media/boot/
Install Kernel and Root File System
To help new users, since the kernel version can change on a daily basis. The kernel building scripts listed on this page will now give you a hint of what kernel version was built.
Copy and paste that "export kernel_version=4.X.Y-Z" exactly as shown in your own build/desktop environment and hit enter to create an environment variable to be used later.
export kernel_version=4.14.0-rc4-sama5-armv7-r0
Copy Root File System
sudo tar xfvp ./*-*-*-armhf-*/armhf-rootfs-*.tar -C /media/rootfs/ sync sudo chown root:root /media/rootfs/ sudo chmod 755 /media/rootfs/
Copy Kernel Image
sudo cp -v ./armv7_devel/deploy/${kernel_version}.zImage /media/boot/zImage
Copy Kernel Device Tree Binaries
sudo mkdir -p /media/boot/dtbs/ sudo tar xfvo ./armv7_devel/deploy/${kernel_version}-dtbs.tar.gz -C /media/boot/dtbs/
Copy Kernel Modules
sudo tar xfv ./armv7_devel/deploy/${kernel_version}-modules.tar.gz -C /media/rootfs/
File Systems Table (/etc/fstab)
sudo sh -c "echo '/dev/mmcblk1p2 / auto errors=remount-ro 0 1' >> /media/rootfs/etc/fstab" sudo sh -c "echo '/dev/mmcblk1p1 /boot/uboot auto defaults 0 2' >> /media/rootfs/etc/fstab"
Remove microSD/SD card
sync sudo umount /media/boot sudo umount /media/rootfs
At thi point the SD was complete.
The first run had this response :
reading /dtbs/at91-sama5d2_xplained.dtb 30424 bytes read in 153 ms (193.4 KiB/s) reading zImage sdhci_transfer_data: Transfer data timeout Error reading cluster ** Unable to read file zImage ** ## Flattened Device Tree blob at 21000000 Booting using the fdt blob at 0x21000000 Loading Device Tree to 3fb58000, end 3fb626d7 ... OK Starting kernel ...
..and nothing happened.
I try to change the SD with a SDHC and this was I saw: [look at sdHc1.log in attachment]
I try to change the SDHC with a SDHC that I had into the Raspberry Pi 3 and this was I saw: [look at sdHc2.log in attachment]
This is my actual situation and I still working on a fix for these problems.
My experience with this board is not very good. I can resume this with "frustrating" because the it is not a fast development board for my scopes.
I think that only if I need to run a python script or a c++ compiled app is very fast to use, but not if I want to have a different linux distro.
For me this is a new challange to do what I want with this board, but, If someone need to be very fast in development and need to have some alternatives distros, I suggest to use a more common board like the Raspberry Pi 3.
I think that this board is very customizable, as I can see into the documentation, but it have a few complicated setup to do it.
In my opinion a better step-by-step and simple documentation to do some operations [like build apps, change distro, configure pin-out] is very appreciated.
The compatibility with arduino mega shields is very impressive, as also the ARM Cortex-A5 and the pin-out for LCD monitor.
Thanks a lot for this opportunity of review
Matteo
Top Comments
Nice test report.
I know how frustrating some of these boards can be.
DAB
Hi DAB,
thanks a lot! In my opinion this is the bigger problems of this category of boards. It's a pity!
Matteo