Presentation

Download Report

Transcript Presentation

Please Standby
Galileo Tech Talk at ASU Will Begin
Shortly
Real-time Systems Lab, Computer Science and Engineering, ASU
Teaching Embedded Systems
Programming using Galileo Board
School of Computing, Informatics, and
Decision Systems
Arizona State University
Tempe, AZ 85287
Dr. Yann-Hang Lee
[email protected]
(480) 727-7507
Real-time Systems Lab, Computer Science and Engineering, ASU
Introduction
 The course: Embedded Systems Programming
 Senior and entry-level graduate students
 Major in CS or CE
 The expectations
 what is inside the boxes
 understand the interactions between hardware, system
software, and applications
 capable computer system engineers
 the characteristics of embedded systems
 hardware and software architecture
 logical reasoning and problem solving
Real-time Systems Lab, Computer Science and Engineering, ASU
2
CSE Undergraduate Programs in ASU
 B.S. in Computer Science and B.S.E in Computer
System Engineering
Freshman
General science and engineering and
basic CS/CSE study
Sophomore
Additional general study and CS/CSE
foundation courses
Junior
Core CS/CSE technical and theoretical
courses
Senior
Advanced CS/CSE courses in various
application domains
Real-time Systems Lab, Computer Science and Engineering, ASU
3
Curriculum Structure in CSE
CS1 CS2
Logic Design
Computer Organization
CS
CSE
Programming
Language
Theory
AI
Database
Graphics
Data Structure &
Algorithm
Software
Engineering
Microprocessor
System
Hardware Design
Software Information
Engineering Assurance
Architecture
&
Embedded
systems
Operating
&
Distributed
systems,
Networking
Real-time Systems Lab, Computer Science and Engineering, ASU
4
Major Courses in Embedded Systems
 CSE 220 – Programming for Computer Engineering
 C programming language
 Linux environment (script, tools, and thread programming)
 CSE 320 – Hardware Design
 hardware modeling in Verilog or VHDL
 synthesize hardware prototypes using FPGA devices
 CSE 325 – Embedded Microprocessor Systems
 software and hardware integration to construct embedded systems
 characteristics of various input/out interfaces and peripherals.
 programming and debugging I/O operations
 CSE 438/598 – Embedded System Programming
 Project Development in Capstone Design I and II
Real-time Systems Lab, Computer Science and Engineering, ASU
5
CSE 438 Embedded System Programming
 The key issues in embedded software
 concurrency
 interaction with devices
 timely operations and scheduling
 Course coverage:
 Design issues of embedded software and the knowledge of
development and execution environment on target processors.
 The functions and the internal structure of device interfaces,
drivers, and real-time operating systems.
 Multi-threaded embedded software in target environment
 coding style for embedded programming
 testing and debugging approaches
 Task scheduling and schedulability analyses.
Real-time Systems Lab, Computer Science and Engineering, ASU
6
Software Development in CSE 438
 Programming assignments are essential
 Target – Galileo board, bread board, and peripherals
 Linux on target board
 Preferred cross-development tools in host Linux
 Eclipse, command lines, GUN tools
Real-time Systems Lab, Computer Science and Engineering, ASU
7
What are taught in CSE 438
 Introduction:
 characteristics of embedded applications, cross-development environment.
 x86 embedded processor architecture
 RDTSC, atomic operations, interrupt mechanism, PCI bus, plug and play
 Linux device drivers
 loadable modules
 character devices, sysfs, drivers for bus structures and adapters
 Concurrent and asynchronous execution
 multi-threading in user and kernel spaces
 ISR, work queue, blocking and non-blocking, and signaling
 Embedded software
 design patterns for periodical and sporadic tasks
 imprecise computation, overrun management, asynchronous transfer of
control
 Scheduling
 cyclic, EDF, rate monotonic, priority inheritance, and schedulability
analysis
Real-time Systems Lab, Computer Science and Engineering, ASU
8
What are Exercised in Assignments (1)
 A device driver for shared queues and timestamps
bus_out_q1
 loadable module
Sender1
bus-daemon
 character device driver
Sender2
 ring buffer
bus_out_q2
bus_in_q
 threading and co-routine Sender 3
bus_out_q3
 RDTSC
 mutex in user and kernel space
receiver1
receiver2
receiver3
 A driver for a 24FC256 EEPROM on i2c bus
 i2c bus operations and IO expander on Galileo board
 gpio control via script, user program, and kernel module
 bus driver architecture in Linux
 non-blocking IO operation and work queue
Real-time Systems Lab, Computer Science and Engineering, ASU
9
What are Exercised in Assignments (2)
 Distance-controlled LED animation
 SPI bus operations on Galileo
 kernel thread for periodic operation
 ISR for pulse measurement
 Motion Tracking with Kalman Filter, Accelerometer and
Gyroscope
 real-time application development
 periodic task model
 mouse Input events
Real-time Systems Lab, Computer Science and Engineering, ASU
10
What are Exercised in Assignments (3)
 Handling asynchronous events
 Linux input devices and handlers
 event abstraction
 signaling mechanism
 setjmp and longjmp
 imprecise computation model
 Linux ftrace and kernelshark
Real-time Systems Lab, Computer Science and Engineering, ASU
11
Why Galileo
 Need a suitable embedded system
 to host an open-source and versatile OS
 software development tools
 networking
 Peripherals (sensors and actuators)
 Acquisition and connection
 Arduino shields
 Support
 quality code and documentation
 technical consultation
 Follow-up development and extensions
 PCIe and wireless communication (wifi+bluetooth)
 IOT applications
Real-time Systems Lab, Computer Science and Engineering, ASU
12
Summary
 Overall, many assignments for students to practice
 students know the subjects are useful and interesting
 they learn (or observe) how to make it work, but need to think about design
decisions or alternatives.
 CSE 438 – a difficult course to teach
 no textbook, use Internet document, code examination, and manual
 for students, time consuming and challenging
 the (Sun) Devil is in the details
 Look for
 projects that can be integrated as a sequence and lead to useful
applications
 pedagogy for embedded systems that is effective and inspiring
 Thanks to Intel Higher Education for the support and assistance.
Real-time Systems Lab, Computer Science and Engineering, ASU
13