Lab 1: Loadable Kernel Modules (LKMs)
|
|
- Esther Grant
- 5 years ago
- Views:
Transcription
1 Lab 1: Loadable Kernel Modules (LKMs) Overview For this lab, we will be interfacing with an LCD screen using the Phytec board. This means we will be creating device drivers for our system to allow it to interact with our hardware. Since our board is running Linux which is a pretty advanced operating system for most embedded devices we will want to accomplish this by appending additional functionality to the working kernel. This is done using loadable kernel modules. Background Before we get too far, here is some important information we will need to know in order to interact with the Linux kernel and perform the functions we want. To write device drivers we must first understand what they are. There are three main types of device drivers; character, block, and network. In this class, we will be writing character device drivers. A character device driver is one that transfers data directly to and from a user process. This is the most common type of device driver. Character device drivers normally perform I/O in a byte stream. They can also provide additional interfaces not present in block drivers, such as I/O control commands, memory mapping, and device polling. Drivers that support a file system are known as block device drivers. Block device drivers take a file system request, in the form of a buffer structure, and issue the I/O operations to the disk to transfer the specified block. Block device drivers can also provide a character driver interface that allows utility programs to bypass the file system and access the device directly. This device access is commonly referred to as the raw interface to a block device. A network device driver is a device driver that enables a network device to communicate between the computer and operating system as well as with other network computers and network devices. Character device drivers Character device drivers are a powerful tool for users to write code that creates a connection between the user space and kernel. It utilizes a file system interface to interact with the device. Just like when you echoed values to device files to enable them. In this case, since we will be writing the kernel module ourselves, the functionality of the file system has to be written by us in the module. The kernel module is the code that gives the functionality to some task in user space. In the user space, we will write a user space C code to communicate with the device driver. We will use the system call interface in our user space C code to access the device files that are created to talk to
2 the device driver. You can read more depth about system calls in the documentation section. Writing device drivers for this board revolves around creating the interface to a file system that controls a given device. The behavior attributed to the read and write functionalities are designated by the developer. An example of this was seen in lab 0, where writing to the files were used to interact with gpio pins to turn LEDs on and off or set different attributes of the PWM. In most cases, device drivers will describe functionalities for file init, exit, open, close, read, and write functionalities. Many other functionalities exist that you are able to change the behavior of, but we will not spend too much time on them for this class. If you wish to read more about them, check out the book Linux Device Drivers. It is completely free available online. Figure 1: The details on how device drivers are accessed inside the Linux operating system Sample code Sample code for a device driver is included with this lab titled new_char.c. The behaviour of this code is intended to simple store the string of characters written to the file. Whenever the dev file to this device is written to, it will store the text into the 100 element character array titled data. When a user reads the file, it will return the stored text inside the array (or at least a pointer to the beginning of the array in C this is how Strings work in C).
3 As you will see in this example there are multiple parts to a character device driver that need to be set up in order for it to properly integrate into the linux kernel. Here are a couple of main points that must be done for your module to work correctly. The space for the data that you will be writing to the device file must be allocated within the kernel module. In this example it is done with the code below. struct fake_device { char data[100]; struct semaphore sem; } virtual_device; A major number must be created for the device and the cdev object must be filled out. In the sample code, this is done with the following structures and the driver_entry(void) function struct cdev* mcdev; int major_number; dev_t dev_num; // Hold major and minor numbers that kernel gives us static int driver_entry(void); A semaphore and any data fields within the module must be initialized Pointing to the correct functions when inserting and removing the module // WHEN TO START AND STOP DRIVER module_init(driver_entry); module_exit(driver_exit); Part 1 Wiring Interacting with any hardware in a digital way comes down to sending signals of high and low voltage through data pins. The LCD used in this lab is no different. This lab will require that you utilize GPIOs to incorporate the LCD in our system. For this section, you will need to familiarize yourself with reading datasheets. The datasheet provided includes information on how to use the pins connecting to the LCD integrated circuit as well as other useful information needed from a hardware perspective. Although the material in these types of datasheets is extremely dry, learning how to read datasheets is an essential skill when working with any type of hardware in an embedded environment. The display requires an input of 8 data pins (D0 D7) along with 3 control pins (E, R/W, RS). The data pins are used to send 1 parallel byte of data to the LCD at a time, dictating which character is printed on the screen. The control pins are toggled in specific patterns to carry out operations such as write or clear. The GPIOs on the board wired to these pins of the LCD are up to you, just be consistent. The LCD will also require a few pins for power. V DD will be connected to 5V, and V SS will be connected to ground. You will also want to connect a 10k potentiometer in series between V EE and ground. If you do not have a potentiometer on hand, a 5k resistor
4 should work well enough. Using a potentiometer allows a change in the screen brightness by varying the current output of V EE. Initializing the LCD It is important to note that our LCD display has very specific start up sequence. Page 32 of the datasheet includes a diagram to properly turn on the display. In between each step of the diagram, you will have to toggle the E pin high and back to low to achieve one clock pulse in the LCD this essentially pushes the bit orientation to the board. In order to get precise timing, it is recommended to include <linux/delay>and use the msleep(int)function to delay for a given number of milliseconds. It is recommended that the C and B bits of the initialization sequence are set to 1 to enable cursor and blink functionalities. The initialization code you write for the LCD should be contained in its own function and called in the module s init function. This will cause the LCD to initialize every time you insert the module you created into the kernel. Get your code to a compilable state so that we can test to see if it works. More on this will be included in the following section. GPIO in kernel space In the previous lab we familiarized ourselves with gpios, but they were called in userspace. For this lab, we will be purely working in the kernel space. Unfortunately, this means you won t be able to use any of the standard C library functions such as printfor access any of the dev files from other modules. Instead, there is another library of #includestatements provided for access within the kernel. There is an appropriate replacement for printftitled printk, which will print its contents to the kernel message log rather than stdout. There are numerous library functions that you are allowed to look up and include in your code when writing your kernel module code. Specifically, you will want to look into using <linux/gpio.h>for this lab. Within <linux/gpio.h>exists functions for you to use to directly call functionalities of gpios on your board without using any dev files. Most of the functions provided by this library are fairly straightforward and only require you know the pin number to use. In order to initialize gpios, you must ensure that it is valid, request the pin, set its direction, and then export it. You will find the ability to do all of these through function calls within <linux/gpio.h>. As with any piece of embedded hardware, timing is also important. Inside of <linux/delay.h>are functions that allow you to delay within your kernel modules. This library isn t very large, but provides access to functions to delay for accurate amounts of time. It s possible that the only functions you will use from <linux/delay.h>are msleepand msleep_interruptible to delay for a given
5 number of milliseconds. There are a few others provided that you are welcome to play around with, but none are required. Compiling kernel modules If your code is written without errors, you should be able to compile it into a.ko file. This is a good sign, but isn t exactly what we want when creating a kernel module. Instead, we will be compiling your code into a.ko file so it can be inserted directly into the kernel. The makefile for this process is slightly different, so you should use this for your new makefile: export ARCH=arm export CROSS_COMPILE=arm linux gnueabihfccflags y := std=gnu99 obj m += lcd.o # Kernel source directory KDIR =kernel_source_directory_goes_here PWD = $(shell pwd) default: $(MAKE) C $(KDIR) SUBDIRS=$(PWD) modules clean: $(MAKE) C $(KDIR) SUBDIRS=$(PWD) clean This makefile was created to make a.ko file from code titled lcd.c. However, before you try to compile your lcd.c, there is a necessary stuff you need to do. As you notice in the code above, the kernel_source_directory_goes_here need to be replaced. You need to install the kernel source directory to the computer which contains all of the backup files and programs in order to compile the kernel module and load the kernel module on the board. To install the kernel source directory, first, check the version of your operating system on the board. To do that, ssh to your beaglebone black and type: uname r then go back to your computer s terminal, and follow the commands below: git clone kernel.git cd bb kernel git tag (This shows what versions can be checked out.) git checkout bone70 b bone70 ( bone70 corresponding to the version of the operating system on your beaglebone black) now we need to build the kernel:
6 ./build_kernel.sh Then the terminal will throw an failure message and an instruction like below: + Detected build host [Ubuntu LTS] + host: [x86_64] + git HEAD commit: [58ee badd3c0a22e39f67068f242d5e068] Debian/Ubuntu/Mint: missing dependencies, please install: sudo apt get update sudo apt get install build essential device tree compiler fakeroot lzma lzop u boot tools libncurses5 dev:amd64 libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 * Failed dependency check follow the instruction above (you may need admin password. Check it out with your TA), then type: gedit version.sh comment out toolchain= gcc_linaro_gnueabihf_4_7 by adding a #before it, and then de comment toolchain= gcc_linaro_gnueabihf_4_8, save and close the version.sh, then rerun the build_kernel.sh. Wait until all of the files and programs to be downloaded and installed (if the system asks you to log in your gitlab account, do so and rerun build_kernel.sh ). After a while, you will see
7 Select Exit. Then it will install the kernel for you. The installing procedure takes about 15 or 20 mins, take a break and come back in 20 mins. If it succeeds, the terminal will show Script Complete. At this point, you have completed building your kernel source directory to your computer. Once you have done that, you don t need to do it anymore in the future. Then we need to find the directory of the kernel source and replace the fake code in the Makefile. cd bb_kernel/kernel pwd you will then get the actual kernel source directory. Replace the fake code with it. And one more small change to the obj m line to the name of your file should then make this makefile script work exactly for you. If not, then the directory of your kernel compiler is probably incorrect and you will have to change the directory entry under KDIR. After your module is compiled you can upload it to the board and try running it. Do this using the same method as you did in Lab 0. SSH into your board and go to the directory where the kernel module is. instead of typing./lcdlike you would with previous code to run your program, you will need to manually insert it into the kernel. It s not too difficult and only requires one extra command: insmod. If you named your file lcd.ko, you just need to type insmod lcd.ko. And that s it! Your module is now inserted. It may seem like nothing has changed, so to prove it that you changed the kernel, you can type lsmodto see a list of running modules on your Phyboard. Upon insertion, it should automatically run the init code you created earlier. For future use, if you wish to remove this module, you will type rmmod lcd.ko. If you have been using printkto print error/success messages out, you can also type dmesgto see a list of driver messages stored on your board. You ll likely want to only see the last few entries if you re debugging one module, so using dmesg tail might be more appropriate. Your LCD will have a blinking cursor on it to prove that your initialization code is working. This is a good point to stop and make sure is correct before you continue. You won t be able to test any of your code until the initialization code is correct. It s unlikely that your code will work as intended the first time, but that s okay! It s very rare for any new piece of hardware to work on your first try. Debugging your code and ironing out the logic will probably take up most of the time for the rest of the labs in this class.
8 Part 2 Printing text With your LCD initialized, you will be able to send it characters to display on the screen. Page 47 of the data sheet will given timing characteristics of the display for the write operation. Further below on page 49 will show a chart with the different timing values included in the diagram. Your goal is to create a function that prints a single character to the board. /dev/ files The module you ve been writing is intended to work as a character device, which means we should be able to interact with it by writing characters to some device file. Device files are not automatically created when the module is inserted, and it is standard practice for you to write a normal linux terminal command to do this yourself. For a file named lcd.ko, you will type the command mknod /dev/lcd c <MAJORNUM> <MINORNUM>. You must know the major and minor numbers of your device to even create it in the first place, so it s very common to use a printkstatement to write out this exact command, and you copy and paste it directly from the dmesgbuffer. It s extremely likely that your major number is 243 if this is your first device added to the Phyboard. It s even more likely that your minor number is always 0 for any new module you create the device file for. You must get these numbers correct when you use this command for it to work, so don t just use 243 and 0 because we say so! Once your dev file is created, you can find it stored in the /dev/ directory. Use the cd command to get there and check it out to make sure it s there. You can try writing a single character a to the dev file by writing echo a > /dev/lcd. Eventually you will want to make a series of testing code that uses your LCD code from user space, but using echo for now saves you time in your debugging process. Once you have your device file created and are able to write to the screen, append the option to clear the screen when a specific character is written to the file. Finally, add the option to print an entire string to the LCD rather than a single character. Part 3 Advanced display You now have enough knowledge to program anything this piece of hardware offers. Page 34 of the data sheet shows additional functionalities allowed by the LCD. Some functions you may want to include into your driver are: cursor/display shift, set DD RAM address, or write DD RAM. How you incorporate them is entirely up to you. You want to
9 make the interaction with your dev file as intuitive and unbreakable as possible. Try imagining that you are creating the official driver for this LCD screen, and people around the world will be installing and using it on their machines! The extra features you include bears the most weight to your grade. Because this class is curved, the amount of extra features added will be compared based on implementation and complexity with other groups in this class. You are given an unlimited amount of breathing room to add any additional hardware or complex software to the projects in this class, so feel free to influence your project with a lot of creativity. Most importantly, try not to feel pressure about the curved portion of the class and have fun! One of the best aspects to being an embedded engineer is your flashy projects that you can show off to your friends. How you decide to implement your screen is entirely up to you. Will you limit your display to two lines? Do you want to allow the user to shift the screen right or left? What happens if someone tries to write 1000 characters to your screen? What other options do you want your screen to have? How will you store the data within your dev file? You can use any number of fields you like. Your grade may vary largely depending on the complexity and robustness of your code. Additionally, you aren't required to print the exact text someone sends to the file. If you want to parse the string that is sent to the file and print part of it, or maybe send it through some encryption and change it, these are acceptable as well. One cool example of this is by writing the world "hello" and having the screen print "hola". Making a translator might be difficult though, so we don t recommend that for your first character device, but it s a neat idea. Harder and more ambitious interfaces with the LCD will be graded with less concern for edge case checking. User space code For the final turn in you will also include user space code that tests a series of strings, or any other functionalities you may have in the final working version. You will do this in the same way you wrote code for lab 0. Now that you have practice writing in userspace and kernel space, the interaction you had with dev files before hopefully makes more sense! It s highly recommended you create a function that will test any given command or string that someone wishes to write to your LCD dev file and call that function multiple times inside main with various test strings. This will be part of the demo you show to us, so the quality of your test code can mean a lot. Header files
10 Code clarity is sometimes as important as working code. In any C project, it is standard you include a header file to go along with any C file. Within the header, you will wrap all of your include statements, preprocessor macros, function prototypes, and global variables into a single file. A sample header is given that should cover most of the style expectations we have for this class. If your header file is written well, it should read like a table of contents to your C code and this will be the goal you will strive for. Appropriate naming conventions and header guards are also important, so don t forget those! While we don t cover header files very deeply in this class, most of the content should be evident in the example file we provide. Additional questions about header files are most likely answerable through quick googling, but don t hesitate to or ask your TA questions. What to turn in Create a new repository on git and push the following files: README.md lcd.c lcd.h lcd_uspace.c lcd_uspace.h Makefile report.pdf // simple overview to your code // your kmodule // your user space test code // please don t turn in any doc or docx. All of the examples for this lab used the name lcd.c as the main kernel file. The names of the files you create will be completely up to you, but remember the naming advice given in lab 0. You should type make clean before pushing anything to the repository to be graded. We want to be able to type makeourselves and look through the source code directly. Additional scripts are allowed as well, such as a file that makes and uploads the file to the Phyboard. Comment and style do make a decent portion of the final grade. Appropriate use of header files, consistent style, appropriately segmenting code into methods, and concise comments all will be taken into consideration. All of the pins you use should be apart of preprocessor define statements. Tab size should be set to 3, and all tabs should be filled as spaces. This is an option available in just about every text editor and ensures that formatting remains consistent on every machine. Lines should not exceed 80 characters. Grading will not be as strict as CSE 14X courses, but will have similar guidelines for commenting expectations. Remember to include names and dates at the top of all documents!
11 All of the variables and function prototypes you include in your header should also be static. Unless stated otherwise, you can assume you only want them to exist within the scope of the containing file. The readme and lab report files are intended to require no more than 1 hour of work. The readme will mostly explain how to use your code and any other basic functionalities a git user might be interested in knowing if they were to pull your code. The lab report is intended to purely contain diagrams and tables of wiring for hardware. You can imagine that it is a minimalistic datasheet. We do want to see a very clean and concise diagram of the wiring you did for each project though, so you should expect to turn in a report every lab. You are welcome to include any other text in the lab report. For this lab, you should include a diagram of all wiring in and out of the Phyboard and the LCD. Make sure to label any pins used, and any additional components such as resistors or diodes should be included in the diagram. A circuit like diagram is the best example of what we are looking for, but you are given stylistic freedom to convey the information how you please. Only turn in.pdf files for the report! Demo With every lab you will need to demo your working code. Pull the code from your repository and walk through the code with your TA. You can expect your TA to ask you difficult questions about design choices or even attempt to break your project by changing the test code. Make good arguments for your implementation of your device file. Documentation C system call interface: calls Linux Device Drivers:
Lab 4: Interrupts and Realtime
Lab 4: Interrupts and Realtime Overview At this point, we have learned the basics of how to write kernel driver module, and we wrote a driver kernel module for the LCD+shift register. Writing kernel driver
More informationLab #3: Keypad Scanning in C Week of 11 February 2019
ECE271: Microcomputer Architecture and Applications University of Maine Lab #3: Keypad Scanning in C Week of 11 February 2019 Goals 1. Be familiar with keypad scanning algorithms. 2. Understand software
More informationLaboratory Assignment #3. Extending scull, a char pseudo-device
Laboratory Assignment #3 Extending scull, a char pseudo-device Value: (See the Grading section of the Syllabus.) Due Date and Time: (See the Course Calendar.) Summary: This is your first exercise that
More informationCOSC 2P95. Procedural Abstraction. Week 3. Brock University. Brock University (Week 3) Procedural Abstraction 1 / 26
COSC 2P95 Procedural Abstraction Week 3 Brock University Brock University (Week 3) Procedural Abstraction 1 / 26 Procedural Abstraction We ve already discussed how to arrange complex sets of actions (e.g.
More informationCSCE 436/836: Embedded Systems Lab 1b: Hoverboard Programming Introduction
1 Overview CSCE 436/836: Embedded Systems Lab 1b: Hoverboard Programming Introduction Instructor: Carrick Detweiler carrick _at_ cse.unl.edu University of Nebraska-Lincoln Spring 2011 Started: Jan 27,
More informationECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:
ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: This lab will introduce basic embedded systems programming concepts by familiarizing the user with an embedded programming
More informationHow to connect the LCD screen
How to connect the LCD screen The Group (Andrei Vacariu, Kevin Ang, Allan Kuan) This guide will guide the reader through picking GPIO pins, setting their mode using device tree overlays, connecting the
More information2 Setting up the RDMA Framework for Development
Spring Term 2015 ADVANCED COMPUTER NETWORKS Project P1: Introduction to RDMA Programming Assigned on: 16 April 2015 Due by: 29 April 2015, 23:59 1 Introduction The goal of this project is to give an introduction
More information2 Initialize a git repository on your machine, add a README file, commit and push
BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal
More informationProject Introduction
Project 1 Assigned date: 10/01/2018 Due Date: 6pm, 10/29/2018 1. Introduction The sliding window protocol (SWP) is one of the most well-known algorithms in computer networking. SWP is used to ensure the
More informationSoftware Development I
6.148 Software Development I Two things How to write code for web apps. How to collaborate and keep track of your work. A text editor A text editor A text editor Anything that you re used to using Even
More informationLab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio
ECE2049 Embedded Computing in Engineering Design Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio In this lab, you will be introduced to the Code Composer Studio
More informationUsing GitHub to Share with SparkFun a
Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing
More informationLinux drivers - Exercise
Embedded Realtime Software Linux drivers - Exercise Scope Keywords Prerequisites Contact Learn how to implement a device driver for the Linux OS. Linux, driver Linux basic knowledges Roberto Bucher, roberto.bucher@supsi.ch
More informationLab2 - Bootloader. Conventions. Department of Computer Science and Information Engineering National Taiwan University
Lab2 - Bootloader 1 / 20 Cross-compile U-Boot. Connect to Raspberry Pi via an USB-TTL cable. Boot Raspberry Pi via U-Boot. 2 / 20 Host Machine OS: Windows Target Machine Raspberry Pi (2 or 3) Build Machine
More informationSubmitting your Work using GIT
Submitting your Work using GIT You will be using the git distributed source control system in order to manage and submit your assignments. Why? allows you to take snapshots of your project at safe points
More informationMagic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name
MPS Magic 8 Ball Lab Exercise Magic 8 Ball Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a printer
More informationLab 2 Building on Linux
Lab 2 Building on Linux Assignment Details Assigned: January 28 th, 2013. Due: January 30 th, 2013 at midnight. Background This assignment should introduce the basic development tools on Linux. This assumes
More informationChapter 3. Revision Control
Chapter 3 Revision Control We begin our journey into software engineering before we write a single line of code. Revision control systems (RCSes) such as Subversion or CVS are astoundingly useful for single-developer
More informationProject C: B+Tree. This project may be done in groups of up to three people.
Project C: B+Tree In this last project, you will implement a B+Tree index in C++. At the end of the project, you will have a C++ class that conforms to a specific interface. Your class is then used by
More informationMake Your Own Linux Module CS 444/544
Make Your Own Linux Module CS 444/544 Lab Preparation: Running VM! Download the image using - wget http://cslabs.clarkson.edu/oslab/syscall_lab.vdi! Applications -> Accessories-> VirtualBox! In Virtual
More informationEXCEL BASICS: MICROSOFT OFFICE 2010
EXCEL BASICS: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes
More informationUSING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY
USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY AGENDA Version control overview Introduction and basics of Git Advanced Git features Collaboration Automation
More informationLinux Home Lab Environment
Environment Introduction Welcome! The best way to learn for most IT people is to actually do it, so that s the goal of this selfpaced lab workbook. The skills outlined here will begin to prepare you for
More informationLab 1: Dynamic Memory: Heap Manager
Lab 1: Dynamic Memory: Heap Manager Introduction to Systems, Duke University 1 Introduction For this lab you implement a basic heap manager. The standard C runtime library provides a standard heap manager
More informationAssignment 1: Build Environment
Read the entire assignment before beginning! Submit deliverables to CourSys: https://courses.cs.sfu.ca/ Late penalty is 10% per calendar day (each 0 to 24 hour period past due, max 2 days). This assignment
More informationProject 1. Fast correction
Project 1 Fast correction Project #1 waitpid vs wait WEXITSTATUS Memory leaks! fflush after the >, before the fork Why? Because the children and the parent can run in any order When piping a list of commands
More informationSpring 2017 Gabriel Kuri
Lab 2 ECE 431L Spring 2017 Gabriel Kuri This lab is made up of two parts. Part 1 will consist of familiarizing yourself with the Raspberry Pi (RPi). It includes running Unix/Linux commands to become somewhat
More informationEXCEL BASICS: MICROSOFT OFFICE 2007
EXCEL BASICS: MICROSOFT OFFICE 2007 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes
More informationmanifold Documentation
manifold Documentation Release 0.0.1 Open Source Robotics Foundation Mar 04, 2017 Contents 1 What is Manifold? 3 2 Installation 5 2.1 Ubuntu Linux............................................... 5 2.2
More informationPython Project Documentation
Python Project Documentation Release 1.0 Tim Diels Jan 10, 2018 Contents 1 Simple project structure 3 1.1 Code repository usage.......................................... 3 1.2 Versioning................................................
More informationPico Computing. M 501 / M 503 Getting Started Guide. March 7, Overview 1. 2 System Requirements 1. 3 Ubuntu Linux Configuration 2
Pico Computing M 501 / M 503 Getting Started Guide March 7, 2012 Contents 1 Overview 1 2 System Requirements 1 3 Ubuntu Linux Configuration 2 4 Installing the Pico Software 4 5 Monitoring Cards With purty
More informationA practicalintroduction to embedded programming. Brian Plancher 10/17/2018
A practicalintroduction to embedded programming Brian Plancher Brian_Plancher@g.harvard.edu 10/17/2018 This week s task is simple: 1. Since the boards you made 2 weeks ago are perfect and are still in
More informationLab 1: Space Invaders. The Introduction
Lab 1: Space Invaders The Introduction Welcome to Lab! Feel free to get started until we start talking! The lab document is located on course website: https://users.wpi.edu/~sjarvis/ece2049_smj/ Be sure
More informationSetup LCD 2x16 Screen I2C Interface
Setup LCD 2x16 Screen I2C Interface Group Name: MegaTronSFU Group Members: Devon Briere, NoorUllah Randhawa, Hansen William, Nathan Dhami Course: CMPT 433 - Embedded Systems The purpose of this guide is
More informationLesson I2C. I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver
Lesson I2C I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver I²C (Inter-Integrated Circuit) What is I 2 C I2C is pronounced "eye-squared see". It is also known as "TWI" because of the initial
More informationLinux Kernel Development (LKD)
Linux Kernel Development (LKD) Session 1 Loadable Kernel Modules (LKM): Laboratory Paulo Baltarejo Sousa pbs@isep.ipp.pt 2017 1 Introduction In the Linux Kernel Development (LKD) module, we will use a
More informationCSE 15L Winter Midterm :) Review
CSE 15L Winter 2015 Midterm :) Review Makefiles Makefiles - The Overview Questions you should be able to answer What is the point of a Makefile Why don t we just compile it again? Why don t we just use
More informationLab 03 - x86-64: atoi
CSCI0330 Intro Computer Systems Doeppner Lab 03 - x86-64: atoi Due: October 1, 2017 at 4pm 1 Introduction 1 2 Assignment 1 2.1 Algorithm 2 3 Assembling and Testing 3 3.1 A Text Editor, Makefile, and gdb
More informationLearn Linux in a Month of Lunches by Steven Ovadia
Learn Linux in a Month of Lunches by Steven Ovadia Sample Chapter 17 Copyright 2017 Manning Publications brief contents PART 1 GETTING LINUX UP AND RUNNING... 1 1 Before you begin 3 2 Getting to know Linux
More informationHow to git with proper etiquette
How to git with proper etiquette Let's start fixing how we use git here in crew so our GitHub looks even more awesome and you all get experience working in a professional-like git environment. How to use
More informationVersion Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now
A version control system (VCS) is a tool or system for keeping track of changes in files. A primitive form of VCS would be making a copy of a file every time you want to make a new version of the file.
More informationHaving Fun with Social Coding. Sean Handley. February 25, 2010
Having Fun with Social Coding February 25, 2010 What is Github? GitHub is to collaborative coding, what Facebook is to social networking 1 It serves as a web front-end to open source projects by allowing
More informationGetting Started With Containers
DEVNET 2042 Getting Started With Containers Matt Johnson Developer Evangelist @mattdashj Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session
More information2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...
Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.
More informationA Tour of Photoshop Elements 8 What s what and what it does
The Muvipix.com Guide to Photoshop Elements & Premiere Elements 8 Chapter 2 A Tour of Photoshop Elements 8 What s what and what it does Welcome to Photoshop Elements a terrific, affordable photo retouching
More informationLinux Kernel Module Programming. Tushar B. Kute,
Linux Kernel Module Programming Tushar B. Kute, http://tusharkute.com Kernel Modules Kernel modules are piece of code, that can be loaded and unloaded from kernel on demand. Kernel modules offers an easy
More informationINTRODUCTION TO LABVIEW
INTRODUCTION TO LABVIEW 2nd Year Microprocessors Laboratory 2012-2013 INTRODUCTION For the first afternoon in the lab you will learn to program using LabVIEW. This handout is designed to give you an introduction
More informationFamiliarity with data types, data structures, as well as standard program design, development, and debugging techniques.
EE 472 Lab 1 (Individual) Introduction to C and the Lab Environment University of Washington - Department of Electrical Engineering Introduction: This lab has two main purposes. The first is to introduce
More informationSwanSim - A Guide to Git / SourceTree / GitLab for Windows
SwanSim - A Guide to Git / SourceTree / GitLab for Windows Dr Jason W. Jones College of Engineering, Swansea University September 2017 Contents 1 Introduction... 2 2 Obtaining the Software... 3 2.1 Software
More informationWhat is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)
1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?
More informationOpsCenter Basics Why Aren t You Using It?
OpsCenter Basics Why Aren t You Using It? This is a SELF-GUIDED LAB if you prefer. You are welcome to get started and leave when you are finished, or you can play with the OC instance to gain more knowledge.
More informationRPi General Purpose IO (GPIO) Pins
GPIO RPi Setup for Today Because the cobbler connector has a notch, you can only put the cable in the right way But, it is possible to put the cable in upside down on the Raspberry Pi The colored wire
More informationThis assignment requires that you complete the following tasks (in no particular order).
Construction Objectives The objectives of this assignment are: (1) Implement your FCS design with high-quality code and thorough unit tests (2) Gain experience doing a task breakdown (3) Gain experience
More informationSECTION 2: Loop Reasoning & HW3 Setup
SECTION 2: Loop Reasoning & HW3 Setup cse331-staff@cs.washington.edu Review: Reasoning about loops What is a loop invariant? An assertion that always holds at the top of a loop Why do we need invariants?
More informationEmbedded Linux. A Tour inside ARM's Kernel
Embedded Linux A Tour inside ARM's Kernel Contents 1. Shell basics 2. Introduction to Embedded Linux 3. Kernel Programming for Module / Driver Installation 4. Module / Device Driver in RPi 5. Cross Compiling
More informationGit Setup Help using GitKraken (CSE 154)
Git Setup Help using GitKraken (CSE 154) Introduction: Git enables keeping track of different versions of files as we keep editing them. To make sure we understand git properly, here are some terms you
More informationnacelle Documentation
nacelle Documentation Release 0.4.1 Patrick Carey August 16, 2014 Contents 1 Standing on the shoulders of giants 3 2 Contents 5 2.1 Getting Started.............................................. 5 2.2
More informationUNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II
Department of Electrical and Computing Engineering UNIVERSITY OF CONNECTICUT ECE 3411 Microprocessor Application Lab: Fall 2015 Quiz II There are 5 questions in this quiz. There are 9 pages in this quiz
More informationCSE 451: Operating Systems. Sec$on 2 Interrupts, system calls, and project 1
CSE 451: Operating Systems Sec$on 2 Interrupts, system calls, and project 1 Interrupts Ü Interrupt Ü Hardware interrupts caused by devices signaling CPU Ü Excep$on Ü Uninten$onal sobware interrupt Ü Ex:
More informationFPLLL. Contributing. Martin R. Albrecht 2017/07/06
FPLLL Contributing Martin R. Albrecht 2017/07/06 Outline Communication Setup Reporting Bugs Topic Branches and Pull Requests How to Get your Pull Request Accepted Documentation Overview All contributions
More informationRedBoard Hookup Guide
Page 1 of 11 RedBoard Hookup Guide CONTRIBUTORS: JIMB0 Introduction The Redboard is an Arduino-compatible development platform that enables quick-and-easy project prototyping. It can interact with real-world
More informationTools Basics. Getting Started with Renesas Development Tools R8C/3LX Family
Getting Started with Renesas Development Tools R8C/3LX Family Description: The purpose of this lab is to allow a user new to the Renesas development environment to quickly come up to speed on the basic
More information2 Installing the Software
INSTALLING 19 2 Installing the Software 2.1 Installation Remember the hour or two of slogging through software installation I promised (or warned) you about in the introduction? Well, it s here. Unless
More informationHow to approach a computational problem
How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to
More informationCleaning up Exited Docker Containers with Help from Awk and Grep
Cleaning up Exited Docker Containers with Help from Awk and Grep As we start to mess around more with Docker, one of the things that I have to do regularly is to purge out the containers that are exited
More informationSystems Programming Advanced Software Development
Systems Programming Advanced Software Development School of Information and Communication Technology Griffith University Semester 1, 2012 Outline 1 Administrative Matters Course Organisation Questions?
More informationInternet of Things: Using MRAA to Abstract Platform I/O Capabilities
Internet of Things: Using MRAA to Abstract Platform I/O Capabilities Integrated Computer Solutions, Inc. Contents 1. Abstract... 3 2. MRAA Overview... 3 2.1. Obtaining MRAA APIs and API Documentation...
More informationProgramming Assignment #4 Writing a simple parallel port device driver
Programming Assignment #4 Writing a simple parallel port device driver Value: (See the Grading section of the Syllabus.) Due Date and Time: (See the Course Calendar.) Summary: This is your second exercise
More informationCSCI Operating Systems, Winter 2019 Lab 1 : Introduction to the BLITZ Tools, git, kpl, makefile, etc. Due Date: 21 January 2019
CSCI 447 - Operating Systems, Winter 2019 Lab 1 : Introduction to the BLITZ Tools, git, kpl, makefile, etc. Due Date: 21 January 2019 Lab and Homework Assignments You may work together to complete the
More informationWhy You Should Not Use Arch
Why You Should Not Use Arch A new users guide to highly personalized, low maintenance operating system. Artur Frącek CC BY-NC-ND 4.0 1 Intro Arch is a very good Linux distribution so it is not a surprise
More informationHuman-Computer Interaction Design
Human-Computer Interaction Design COGS120/CSE170 - Intro. HCI Instructor: Philip Guo Lab 1 - Version control and HTML (2018-10-03) by Michael Bernstein, Scott Klemmer, Philip Guo, and Sean Kross [Announce
More informationIt is academic misconduct to share your work with others in any form including posting it on publicly accessible web sites, such as GitHub.
p4: Cache Simulator 1. Logistics 1. This project must be done individually. It is academic misconduct to share your work with others in any form including posting it on publicly accessible web sites, such
More informationLab 9: Pointers and arrays
CMSC160 Intro to Algorithmic Design Blaheta Lab 9: Pointers and arrays 3 Nov 2011 As promised, we ll spend today working on using pointers and arrays, leading up to a game you ll write that heavily involves
More informationAccess Intermediate
Access 2010 - Intermediate (103-134) Building Access Databases Notes Quick Links Building Databases Pages AC52 AC56 AC91 AC93 Building Access Tables Pages AC59 AC67 Field Types Pages AC54 AC56 AC267 AC270
More informationPhysics 335 Intro to MicroControllers and the PIC Microcontroller
Physics 335 Intro to MicroControllers and the PIC Microcontroller May 4, 2009 1 The Pic Microcontroller Family Here s a diagram of the Pic 16F84A, taken from Microchip s data sheet. Note that things are
More informationOperating Systems (234123) Spring 2017 (Homework Wet 1) Homework 1 Wet
Homework 1 Wet Due Date: 30/4/2017 23:00 Teaching assistant in charge: Yehonatan Buchnik Important: the Q&A for the exercise will take place at a public forum Piazza only. Critical updates about the HW
More informationECE2049 Embedded Computing in Engineering Design. Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio
ECE2049 Embedded Computing in Engineering Design Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio In this lab you will be introduced to the Code Composer Studio
More informationLab Exercise Git: A distributed version control system
Lunds tekniska högskola Datavetenskap, Nov 21, 2016 EDAF45 Programvaruutveckling i grupp projekt Labb 2 (Git): Labbhandledning Checked on Git versions: 2.7.4 Lab Exercise Git: A distributed version control
More informationInstalling and Using Docker Toolbox for Mac OSX and Windows
Installing and Using Docker Toolbox for Mac OSX and Windows One of the most compelling reasons to run Docker on your local machine is the speed at which you can deploy and build lab environments. As a
More informationArchan. Release 2.0.1
Archan Release 2.0.1 Jul 30, 2018 Contents 1 Archan 1 1.1 Features.................................................. 1 1.2 Installation................................................ 1 1.3 Documentation..............................................
More informationLab #2 Physics 91SI Spring 2013
Lab #2 Physics 91SI Spring 2013 Objective: Some more experience with advanced UNIX concepts, such as redirecting and piping. You will also explore the usefulness of Mercurial version control and how to
More informationCS354 gdb Tutorial Written by Chris Feilbach
CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that
More informationHow to Get Started. Figure 3
Tutorial PSpice How to Get Started To start a simulation, begin by going to the Start button on the Windows toolbar, then select Engineering Tools, then OrCAD Demo. From now on the document menu selection
More informationLK-Tris: A embedded game on a phone. from Michael Zimmermann
LK-Tris: A embedded game on a phone from Michael Zimmermann Index 1) Project Goals 1.1) Must Haves 1.2) Nice to Haves 1.3) What I realized 2) What is embedded Software? 2.1) Little Kernel (LK) 3) Hardware
More information» How do I Integrate Excel information and objects in Word documents? How Do I... Page 2 of 10 How do I Integrate Excel information and objects in Word documents? Date: July 16th, 2007 Blogger: Scott Lowe
More informationLab 4: Shell Scripting
Lab 4: Shell Scripting Nathan Jarus June 12, 2017 Introduction This lab will give you some experience writing shell scripts. You will need to sign in to https://git.mst.edu and git clone the repository
More informationLab Overview. Lab Details. ECEN 4613/5613 Embedded System Design Week #7 Spring 2005 Lab #4 2/23/2005
ECEN 4613/5613 Embedded System Design Week #7 Spring 2005 Lab #4 2/23/2005 Lab Overview In this lab assignment, you will do the following: Add a serial EEPROM and an LCD to the hardware developed in Labs
More informationSECTION 2: Loop Reasoning & HW3 Setup
SECTION 2: Loop Reasoning & HW3 Setup cse331-staff@cs.washington.edu slides borrowed and adapted from CSE 331 Winter 2018, CSE 391, and many more Review: Reasoning about loops What is a loop invariant?
More informationEE251: Thursday September 20
EE251: Thursday September 20 Parallel I/O aka General Purpose I/O aka GPIO Common Devices: Switches, LEDs, Keypads Read Lab 4 carefully, and Chapter 14 in text Think about what you would like to review
More informationENGR 40M Project 3c: Switch debouncing
ENGR 40M Project 3c: Switch debouncing For due dates, see the overview handout 1 Introduction This week, you will build on the previous two labs and program the Arduino to respond to an input from the
More informationSECTION 2: HW3 Setup.
SECTION 2: HW3 Setup cse331-staff@cs.washington.edu slides borrowed and adapted from Alex Mariakis,CSE 390a,Justin Bare, Deric Pang, Erin Peach, Vinod Rathnam LINKS TO DETAILED SETUP AND USAGE INSTRUCTIONS
More informationCMSC162 Intro to Algorithmic Design II Blaheta. Lab March 2019
CMSC162 Intro to Algorithmic Design II Blaheta Lab 10 28 March 2019 This week we ll take a brief break from the Set library and revisit a class we saw way back in Lab 4: Card, representing playing cards.
More informationRL-Glue Python Codec 2.0 Manual
RL-Glue Python Codec 2.0 Manual Brian Tanner :: brian@tannerpages.com Contents 1 Introduction 2 1.1 Software Requirements................................... 3 1.2 Getting the Codec.....................................
More informationOnce you have installed MobaXterm, open MobaXterm. Go to Sessions -> New Session, and click on the SSH icon.
Lab 1 In order to get credit for the lab, you need to be checked off by the end of lab. For nonzero labs, you can earn a maximum of 3 points for lab work completed outside of lab time, but you must finish
More informationCMPT 300. Operating Systems. Brief Intro to UNIX and C
CMPT 300 Operating Systems Brief Intro to UNIX and C Outline Welcome Review Questions UNIX basics and Vi editor Using SSH to remote access Lab2(4214) Compiling a C Program Makefile Basic C/C++ programming
More informationCOPYRIGHTED MATERIAL. Starting Strong with Visual C# 2005 Express Edition
1 Starting Strong with Visual C# 2005 Express Edition Okay, so the title of this chapter may be a little over the top. But to be honest, the Visual C# 2005 Express Edition, from now on referred to as C#
More informationthe NXT-G programming environment
2 the NXT-G programming environment This chapter takes a close look at the NXT-G programming environment and presents a few simple programs. The NXT-G programming environment is fairly complex, with lots
More informationCS 0449 Project 4: /dev/rps Due: Friday, December 8, 2017, at 11:59pm
CS 0449 Project 4: /dev/rps Due: Friday, December 8, 2017, at 11:59pm Project Description Standard UNIX and Linux systems come with a few special files like /dev/zero, which returns nothing but zeros when
More informationCS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)
CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) 28 January 2013 Jason Yosinski Original slides available under Creative Commons Attribution-ShareAlike 3.0
More information