Project

General

Profile

ICB-HSMC Daughter Card

This project adds support for using the RS-232 port and two RS-485 ports on Terasic's Altera ICB-HSMC daughter card with the 5CSX-H6-42A Development Kit (PN: 80-000640/80-000639).

The RS-232 port is J4 on the daughter card and also shares its pins with JP8. It maps to /dev/ttyAL0 in Linux. You may need to use JP8 as J4 is partially obscured by another header on the Development Kit baseboard.

The RS-485 ports are J2 and J1, which share their pins with JP3 and JP2, respectively. J2 maps to /dev/ttyAL1 in Linux and J1 maps to /dev/ttyAL2.

Note: You may have to set the baud rates of the serial ports before using them. For example:

stty -F /dev/ttyAL0 speed 115200
stty -F /dev/ttyAL1 speed 115200
stty -F /dev/ttyAL2 speed 115200

Both pre-built files and build instructions for Linux are provided below for all components of the SD card image.

Files

Prebuilt SD card image: dev_5csx_h6_42a_icb-hsmc.img.zip
Prebuilt components and make_sd.sh script: dev_5csx_h6_42a_icb-hsmc.tar.gz
Quartus project: dev_5cs_base.tar.gz
Yocto config: bblayers.conf
Yocto layer: meta-icb-hsmc.tar.gz

Quartus Project

The project was created in Quartus Prime 18.0 Standard Edition on Ubuntu 16.04. It uses a fifoed UART core with documentation available here. Version 13.2 of the UART core is included with the Quartus project.

First source the Quartus environment in a terminal:

/opt/intelFPGA/18.0/embedded/embedded_command_shell.sh

Change into the project directory and run the following commands to build the rbf, preloader, u-boot image, and u-boot environment.

make rbf
make uboot
make ubootenv

The outputs are located as follows relative to the project directory:

rbf output_files/dev_5cs.rbf
preloader software/preloader/preloader-mkpimage.bin
u-boot image software/preloader/uboot-socfpga/u-boot.img
u-boot environment ubootenv.bin

Kernel and Filesystem

The meta-icb-hsmc layer (built against the Rocko branch of Yocto) configures the Linux kernel and device tree to use the RS-232 and two RS-485 ports on the daughter card. It also adds minicom to the filesystem.

Follow the instructions in Yocto for MitySOM-5CSX through "Setting up Yocto".

Download and untar the meta-icb-hsmc layer from this wiki and move it into the poky directory. Replace your poky/build/conf/bblayers.conf file with the one attached with this wiki (bblayers.conf).

To finish the build, continue following the instructions in Yocto for MitySOM-5CSX.

Relative to the poky build directory, the filesystem tarball is located at: tmp/deploy/images/mitysom-c5/mitysom-image-base-mitysom-c5.tar.gz

SD Card

Prerequisites

The following needs to be installed before the SD card creation script can be run:

sudo apt-get install --no-install-recommends -y  libguestfs-tools qemu-utils linux-image-generic
sudo chmod o+r,g+r /boot/vmlinuz-*

Build the SD Card Image

Copy the rbf, preloader, u-boot image, u-boot environment, and filesystem tarball into a directory with the make_sd.sh script.

Create the SD card image with the following command:

./make_sd.sh -o dev_5csx_h6_42a_icb-hsmc.img -f dev_5cs.rbf mitysom-image-base-mitysom-c5.tar.gz                                   

This will output the image file dev_5csx_h6_42a_icb-hsmc.img which can be flashed to an SD card using the instructions here.

Go to top
Add picture from clipboard (Maximum size: 1 GB)