0% found this document useful (0 votes)
2 views

Lab 1

The document outlines a laboratory session focused on using Ubuntu, TivaWare SDK, and Git. It covers essential command line operations in Ubuntu, the installation steps for TivaWare SDK, and the basics of Git for version control. Additionally, it includes practical exercises for creating directories, managing users, and coding tasks to reinforce the concepts learned.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab 1

The document outlines a laboratory session focused on using Ubuntu, TivaWare SDK, and Git. It covers essential command line operations in Ubuntu, the installation steps for TivaWare SDK, and the basics of Git for version control. Additionally, it includes practical exercises for creating directories, managing users, and coding tasks to reinforce the concepts learned.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

LABORATORY 1: Ubuntu, Tivaware and Git

Part 1: Ubuntu terminal use:


Theory Concepts
Ubuntu is an OS based on Linux, meaning that it has a strong command line
management. For that reason, is important to know the main and most used
commands.
What advantages can we get from an CLI OS? What disadvantages it has?
A CLI OS is completely used with a command line, this can be handy if we need
a lighter OS to run specific tasks. Another advantage is that we have more control
over the system, we can manage users, groups, and permissions with ease.
The biggest disadvantage is the lack of visual elements that guide the user in the
use of the OS.
Is important to mention that Linux and Ubuntu are free software and it makes a
big difference when a OS is selected.
What is Windows WSL? How can we use it for Linux systems? Which is its
difference with dual boot or virtual machines?
Can you mention some of the most important commands for command line? Why
do you consider these commands important?
Here is a table of some commands that are handy for our daily use:
# Command Use
1 ls List of files and
directories
2 ls -l
3 cd Change directory
4 pwd Print work directory
5 sudo Super User does
6 sudo su
7 mkdir
8 touch Create text file
9 sudo apt update
10 sudo apt upgrade
11 sudo apt install Install repositories
12 tree Shows directory tree
(requires installation)
13 rm Remove directory
14 rm -r
15 mv
16 cp Copy files
17 chown Change Ownership
18 chmod
19 adduser Adds a user
20 usermod Change user
modifications
21 gpasswd Change group
configurations
22 cat, nano, gedit Text edition

Is there another command that you consider important to mention?


As you can see there are a lot of commands that we can use during our daily
work, is important to know the most important and understand how they affect the
OS.
Laboratory implementation
Command Line short Exercises
1. An ice cream company wants to develop a product history log for their
2023 sales campaign.
a. The company needs a main directory called ‘ice cream 2023’. Inside
this folder there should exist 2 directories: ‘water flavors’ and ‘milk
flavors. Inside the ‘water flavors’ folder 3 additional directories are
needed: “Cinnabon’ apple” and “pineapple”. For the milk ice creams
the directories are ‘chocolate’ and ‘cappuccino’. Make all the
directories tree using one command line and show it using the tree
command.
2. Create a text file called ‘color’ with your favorite color, then move that file
to a folder called ‘colors and finally add a second color. Use the cat
command.
3. Create a txt file called ‘name’ with your first name. Then, make a copy of
that file inside a folder called ‘student registry’. Finally, add your last name
to the copy file. Use gedit command.
Command Line excercises
1. A canning company wants to use Ubuntu as their main OS for their
activities. You have been hired to develop the following features:
a. Create a user called ‘Company’ with super user privileges.
b. Create a user called ‘Engineer’.
c. Create a user called ‘Operator’.
d. All these users must belong to the ‘Distribution’ group.
2. Using the previous exercise is required to make a route tree with the
following features:
a. Create a main folder called ‘Designed tasks’.
b. Inside that folder the directories: ‘Maintenance’, ‘Production Line’
‘Fixes’ and ‘Costs’ must be created.
c. Each folder must have a file called ‘dates’ which contains specific
workers schedules according to their roles. You can select the
schedule for each role.
d. Add a file to the ‘Designed tasks’ folder called ‘Products’. This file
must contain at least 3 canned products of your choice.
e. Modify the ‘dates’ files adding: ‘Maintenance - Friday, ‘Production
line – Monday to Thursday’, ‘Fixes – with 2 days of anticipation’ and
‘Costs – at the end of the month’.
3. After some months you are contacted by the same canned company to
make some modifications to the system you developed before:
a. Create a ‘Supervisor’ user.
b. Add that user to the ‘Distribution’ group.
c. Modify the ‘Designed Tasks’ folder owner to be Supervisor.
d. Modify the permissions of the ‘Designed tasks’ folder. The
‘Distribution’ group must have read, write, and execute permission.
Theory Concepts
A Software Development Kit (SDK) is a piece of software that we can use to
implement different solutions based on build tools, libraries, etc. That helps
the user to learn some implementations and improve the user learning. For
this class we will use TivaWare SDK as the main tool for TIVA development.
Here are some main steps that we can follow to install TivaWare SDK on our

linux OS:
1. Visit Texas Instruments page:

2. Select SDK SW-TM4C and download options:


3. Select the board model (a TI account will be needed):

4. In command line put the following command (sudo apt-get update


and upgrade might be needed):
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
5. Use the following command:

sudo apt-get install gcc-arm-embedded


6. Install git if is not installed.
7. Clone the following repository:

git clone https://github.com/utzig/lm4tools.git


8. Access to: lm4tools/lm4flash
9. Use the command marked in red:
10. Use the following commands to unzip the SDK download:

11. EXTRA: If there are problems with the make command use the
following possible solution:

Now we have the Tivaware SDK installed correctly. This will be useful to work
during all the class with a TM4C1294 board.
Part 2: TIVAWare SDK Installation
1. Explain the TIVAWare SDK installation in your computer step by step.
Address the specific details about it. Did you have any issues during the
installation? If so, how did you manage to solve them?
2. What is a make file? Why is it important? Explain its use.
Part 3: Git installation
Git is a modern version control system that allows team collaboration in a fast
and efficient pace. Git manages a software system in a way that all the
collaborators can contribute to it reducing possible code errors and incoherences.
Git is a powerful tool for modern software development and allows developers to
complete specific tasks and focus development without affecting all the system.

• Create an account in https://github.com/


• What is a repository? Why should we use it?
• Create a new repository called “lab_1”
• Invite all the group members to the repository
• Give them write and read permission.
In VSCode there is a Git extension that enables developers to create, modify,
merge, delete, rebase, etc. Branches in their local environment and then upload
the changes to the remote repository. The following link is a quick guide to start
using git in VSCode connecting the account created:
https://code.visualstudio.com/docs/sourcecontrol/intro-to-git
• Create a new branch, this can be done using the command git checkout
-b “branch name” “branch source name” with your last name and
name
• In your branch create a python code that 1. Adds n numbers, 2. Gets the
inverted numbers ex 619 ->916, 3. Asks the user his name, age and
profession and returns it in a custom message, 4. Asks x numbers from a
user and returns only unique values.
• Upload your code to your branch, you can do this using the commands:
o git add .
o git commit – m “Message of commit”
o git push origin “branch name”
• Verify your changes are on github repository.

You might also like