You are on page 1of 9

Embedded Internship

Name: Internship flow document


This document describes the different segments of the embedded internship of
Description:
AEE

Author(s):
Stefan Vukčević (stefan.vukcevic@avisto-eastern.com),
Bodin Matejić (bodin.matejic@avisto-eastern.com),
Nikola Nešković (nikola.neskovic@avisto-eastern.com)

Version Revision date Changes Name


0.1 10-Apr-2020 Creation of document Stefan Vukčević
0.2 27-Apr-2020 General update of the TIVA C section Stefan Vukčević
0.3 29-Apr-2020 Creation of C application examples section Bodin Matejić
0.4 29-Apr-2020 Update of Zybo Z7 section Nikola Nešković
0.5 03-Jun-2021 General updates Stefan Vukčević
0.6 03-Jun-2021 C/C++ app examples updates Bodin Matejić

Internal
Intro 3
Linux intro 4
C/C++ and GIT 5
Sorting comparison 5
N queens’ problem 5
Knight tour problem 5
String search algorithm 5
POSIX producer-consumer (optional) 6
Possible upgrades to the process 6
TIVA C 7
UART Echo 7
MikroE module 7
Expanded UART echo 7
Possible upgrades to the process 7
Zybo Z7 8
Deploy Linux with Petalinux tool 8
Booting with ramfs 8
Booting with Linaro filesystem 8
Deploy Linux with Vivado 8
Deploy Linux with Buildroot 8

2
Intro
This document describes what is given to interns to do during the internship.
The section Zybo Z7 is optional and situational. The section Linux intro is also optional but
recommended.

3
Linux intro
Basics of the Linux kernel, compiling and booting of a kernel.
Basics of Linux Device Drivers and making of a char driver.
Literature: https://lwn.net/Kernel/LDD3/
Usually only the first 4 chapters.

4
C/C++ and GIT
Create several C/C++ applications and test programmer skills. Throughout the development
process, interns learn about GIT and version control in general and are introduced to good
programming practices.

Git guide book: https://git-scm.com/book/en/v2


Nice website: https://learngitbranching.js.org/

Sorting comparison
Compare four sorting algorithms of various sizes. Use the following four sorting algos:
● Quick sort.
● Bubble sort.
● Insertion sort
● Merge sort

Use following sizes for sort: 10, 100, 1000, 10000, 100000, 1000000. To have
the same test conditions use the same test vector for each algorithm. Measure the
time and print the results in the file.

Modification: Use C++ and create a class structure.

N queens’ problem
Create the application which will put N queens on the chess table (N x N). Print all solutions.

Modification: Create a multi-threaded solution using semaphores, queues and threads.

Knight tour problem


Use the table of 2n x 2n. Write the application which will start from the one field on the table
and using the chess knight move (L-move) travel over each field of the table. Try to find
several solutions for one table size. Try several table sizes (n >= 4).

String search algorithm


Implement Boyer-Moore-Horspool search algorithm. It is a clever algorithm to search
substrings in a larger string. Input should be string and substring and output should be
locations of the substring in a string.
The simple search algo complexity is O(nm) where n is a string length and m is a substring
length. Boyer Moore algo complexity is O(n+m).

5
POSIX producer-consumer (optional)
Implement a producer and consumer thread with a FIFO that emulates the cp command.
Use POSIX C99 standard and stdin and out.

Possible upgrades to the process


Introduce new or change existing C/C++ programming examples, maybe some new
algorithms.

6
TIVA C
The board: http://www.ti.com/tool/EK-TM4C123GXL
Useful: https://www.ti.com/lit/ug/spmu298d/spmu298d.pdf

Everybody gets a MikroE click board with the Tiva C.


The goal is to learn how to read documentation, RTOS systems, the difference between
RTOS and BareMetal, different protocols that are used.

UART Echo
Send a message and receive it back on the same device. BareMetal and RTOS
implementation.

Learned: UART bus and protocol, finding and reading documentation, the start of
BareMetal and RTOS embedded programming.

MikroE module
Communicate and use functionalities from the provided MikroE click board. BareMetal and
RTOS implementation.

Learned: Mostly SPI/I2C, finding and reading documentation, interfacing with a


device, BareMetal and RTOS embedded programming continued.

Expanded UART echo


Send a message and receive it back on the same device. Use a different interface (CAN)
and FIFOs, MessageBoxes, Semaphores.
Connection PC -> UART RX -> CAN TX -> CAN RX -> UART RX -> PC

Learned: CAN bus and protocol, finding and reading documentation, BareMetal and
RTOS embedded programming.

Possible upgrades to the process


1. Making a usable device from scratch in BareMetal and RTOS implementations.
For example: A smart flowerpot, an IoT smoke detector, or a keyboard.

7
Zybo Z7
The objective of this part is for interns to get familiar with embedded Linux systems. Interns
will go through a couple of different ways of deploying Linux on the Digilent Zybo Z7 board.

The outcome of every step is to have a functional Linux system that can be accessed via the
serial interface.

The board: https://reference.digilentinc.com/reference/programmable-logic/zybo-z7/start

Deploy Linux with Petalinux tool

Easy use of the Petalinux tool will introduce interns to the ways of deploying Linux to
embedded systems.

Useful: https://www.xilinx.com/products/design-tools/embedded-software/petalinux-sdk.html

Booting with ramfs

Booting Linux kernel with a minimal filesystem.


Learned: Petalinux, Linux deployment with integrated filesystem

Booting with Linaro filesystem

Useful: https://www.linaro.org/about/

Booting Linux kernel with a larger filesystem.


Learned: Linux deployment with separate filesystem

Deploy Linux with Vivado

Build separate Linux kernel and u-boot bootloader and make an executable image with
Vivado to boot on Zybo Z7 board.
Learned: build process of Linux and u-boot, Vivado and SDK tools

1. With ramfs
2. With linaro filesystem

Deploy Linux with Buildroot

8
Deploy Linux to Zybo Z7 using Buildroot.
Learned: Buildroot image build flow

You might also like