Embedded Linux Platform by JineshGandhi

VIEWS: 27 PAGES: 13

									   Teaching Microprocessor Systems
Design Using a SoC and Embedded Linux
                Platform

             Yann-Hang Lee and Aung Oo
      Computer Science and Engineering Department
                Arizona State University
                    yhlee@asu.edu



                                Real-time Embedded System Lab, ASU   WCAE_05_ 1
     Microprocessor System Course

 A typical Computer Engineering course (core)
    Organization of microprocessor systems (8 or 16-bit
     microcontrollers, such as 8051, HC11, HC12, etc.)
 Input/Output interfaces and peripherals
    Programmable timer
    Serial (UART) and parallel ports
    Data acquisition (A/D and D/A)
 ROM monitor to provide a simple execution and
  debugging environment
 Assembly programming
    Single execution thread with ISRs



                                        Real-time Embedded System Lab, ASU   WCAE_05_ 2
        Emerging Embedded Systems
 SoC-based platforms                                        Abundant I/O interfaces:
    one or more processor cores                                human interfaces, multimedia,
    memory-address mapped I/O IP                                networking, and inter-IC/device
     blocks                                                      communication.
    Intel PXA, Motorola Dragonball,
     TI OMAP

             5               JTAG                  ARM920T                       USBd                7
             4                                   ARM9TDMI   Bootstr              MS/SD               6
                             UART1                            ap
             8                                               Bus                  A/D                20
                             UART2          I Cache D Cache Arbiter
                              RTC                                                 BTA                13




                                                                                          I/O pads
                                                   MMU          INTC
             2                                                                                       5
                 I/O pads




                             Timer                                               CSPI
                                                      AHB                       SSI/I2S              6
                            WatchDog    AIPI#1              AIPI#2
             1                                                                    I2C                2
                              PWM
                                         DMA                                                         14
                                       (11 chnl)                                  CSI
            25               LCDC                                                GPIO
                                                    Bus         MM
                                                    CTL          A                                   6
                             EIM &                                                SIM
            92
                            SDRAMC                                                                   5
                                                                                 DPLL
                                                   eSRAM                          x2
                                                   (128KB
                                                      )


                                                                     Real-time Embedded System Lab, ASU   WCAE_05_ 3
       Emerging Embedded Systems
 I/O programming
                                                                           Flash memory
  using high-level                                     SDRAM
                                                                            (for booting)
  languages
    For portability,
                                Mouse
     modularity, and       (USB interface)
                           (serial interface)
                                                                                                    LCD

     readability.
                              Keyboard                            Dragonball
                                                                                                 Touch panel
    Appropriate use of      (PS2 serial                            MX1
                              interface)
     programming
                               GPIO to
     languages and          digital/analog
                                                             Development board                   CMOS video
                                                                                                   sensor
     software structures       converter


                                                Serial EPROM                   Serial EPROM
 Operating systems on                          (SPI interface)                (I2C interface)

  target boards



                                                          Real-time Embedded System Lab, ASU           WCAE_05_ 4
 A New Course on Microprocessor Systems

 Course Objectives: to develop
    an understanding for using a CPU core in system-level design.
    the ability to integrate CPU core with various interface units.
    the skills for programming and debugging I/O operations to manage
     peripherals for embedded applications.
 Major topics covered:
    Introduction and review of ISA and assembly language (4 lectures)
    C programming for embedded systems (2 lectures)
    Interrupts and I/O multiplexing (2 lectures)
    Parallel I/O interface and signal handshaking (1 lecture)
    Timers and counters (2 lectures)
    Serial communication: UART, SPI, and I2C (4 lectures)
    LCD interfaces (3 lectures)
    Transducers and sensors, touch panels, A/D-D/A converters (3
     lectures)
    Memory devices, SRAM, SDRAM, and flash memory(3 lectures)
    Buses, access arbitration, timing, and bus protocols (2 lectures)

                                         Real-time Embedded System Lab, ASU   WCAE_05_ 5
                   Development Platforms

 Hardware
   Freescale’s MXLADS (with Dragonball MXL processor)
   Peripherals:
      serial mouse, LCD, magnetic card reader, buzzer
      EEPROM, digital potentiometer, ADC
                               Serial port

                Power Supply
                                                        Multi-ICE probe



                                             BlueTooth RF
    Memory                                   I/F
    Extension
    slot                                                                     LCD/Touch
                                                                             Panel



                                   Camera
                                   I/F

                                              Real-time Embedded System Lab, ASU         WCAE_05_ 6
                Development Platforms

 Software
   ARM SDT 2.02u (assembler, compiler, and ARMulator)
   Linux tool chain from MontaVista


                ARM elf     GDB
                  gcc     debugger        Applications
                 cross-
                compiler                  GDB Server
   Host PC        MontaVista IDE                                        Target
  workstation                                                          MXLADS
                     cygwin            Embedded Linux

                    Windows            DB MX1 ADS board
                                        support package




                                       Real-time Embedded System Lab, ASU   WCAE_05_ 7
              Development Projects
 Introduction project
    programming environment on a target development board.
    Mixed C/C++ and assembly programming, calling conversion,
     instruction count measurement
 Software to manage interfaces and peripherals
    IO space as a part of kernel space
    programs must run as kernel tasks
 Develop loadable kernel modules as device
  drivers
    Invoked by device file calls (open, close, read, write, and
     ioctl)
    Students don’t have much experience with Linux kernel or
     system programming


                                        Real-time Embedded System Lab, ASU   WCAE_05_ 8
                      A Pseudo Device Driver
 To exercise kernel I/O address space and interrupts

               Register signal handler with
                      task structure
                                                                                           Task structure for
                                                                                           the user process
                                               Device driver      ….
                                                module with       sig handler
                                                 registered       sig mask
                                               IRQ handlers       sig pending
                                                                  ….
  Application code     Register user process                                                  memory-
                         for signaling and
                                                                                             mapped IO’s
                         read/write to IO’s      buffers

                                                                      Core
  Signal Handler(s)                                                  Kernel
                                                  IRQs
                           Asynchronous
                              signals
     User Space                                                                              interrupts
                                                      Kernel Space


                                                               Real-time Embedded System Lab, ASU       WCAE_05_ 9
                   Sample Projects
 Midi file player
    a driver to control PWM as a tone generator
       a blocking call which returns once the play duration is over
         (interruptible_sleep_on and timer interrupt)
    a main program to parse an input midi file and to invoke the
     driver for each note (frequency and duration)
 Magnetic card reader
    a card reader driver (bit streams input from general-purpose
     IO pins)
       the ISR-driven approach for block data transfer (bit banging)
         and signal handlers
    a driver for serial port (ioctl to configure UART)
    a main program to read card information and send to serial
     port


                                          Real-time Embedded System Lab, ASU   WCAE_05_ 10
                                                        Evaluation
 Survey at the end of Fall 2004
 Summary in 5 categories
C Programming skill improved                               Use Linux/Development Tools                        Understand Architecture/Schematics
                   Strongly                                         effectively                                                       Strongly
                   Disagree                                                  Strongly                                                 Disagree
                                                                             Disagree
                          Strongly                                                                                                         Strongly
       Disagree            Agree                                                 Strongly                                 Disagree          Agree
   Neutral                                                        Disagree        Agree
                                                                                                                    Neutral
                                                               Neutral




                  Agree
                                                                                                                                         Agree
                   Can write drivers to manage interfaces                     Agree         Motivated to work in embedded
                                                                                                       Systems
                              and peripherals
                                         Strongly                                                        Strongly
                                                    Strongly                                                        Strongly
                                         Disagree                                                        Disagree
                                                     Agree                                                           Agree
                              Disagree                                                        Disagree




                                                          Agree                                                               Agree
                              Neutral                                                        Neutral




                                                                                        Real-time Embedded System Lab, ASU                       WCAE_05_ 11
                      Conclusion

 Re-tool the existing microprocessor system
  course
    SoC platform
    High-level language programming
    IO management as a part of operating system
 Didn’t abandon assembly language
    to explain processor execution model
    to interact with programs of multiple languages
    to determine the tradeoffs of selecting a proper language
 No textbook, manuals and data sheets are more
  than 2000 pages


                                       Real-time Embedded System Lab, ASU   WCAE_05_ 12
              Acknowledgement


 NSF EIA program


 Motorola Dragonball University Program


 Embedded System Consortium (ASU, Intel, and
  Motorola)




                             Real-time Embedded System Lab, ASU   WCAE_05_ 13

								
To top