Embedded Systems Programming - PowerPoint PPT Presentation

About This Presentation
Title:

Embedded Systems Programming

Description:

Many, if not most, embedded systems require networking support ... This is done in pangolin.c. static struct map_desc pangolin_io_desc[] __initdata ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 13
Provided by: cd780
Category:

less

Transcript and Presenter's Notes

Title: Embedded Systems Programming


1
Embedded Systems Programming
  • Networking on the puppeteer

2
Networking in embedded systems
  • Many, if not most, embedded systems require
    networking support
  • This can be for development purposes
  • From of Ethernet to download kernel to use NFS
    mounted root file system for development
  • Or it can be for application/end user
  • Web enabled devices, getting upgrades

3
Networking fundamentals
  • To network we require
  • A NIC
  • Network interface chip
  • Software support for the chip
  • A (working) device driver
  • Protocol support
  • TCP/IP, ftp, telnet, nfs
  • A configured protocol stack
  • Knowing how to talk
  • A configured server/client
  • Someone to talk to
  • A network media
  • A bit of wire!

4
The Puppeteer - networking
  • To network we require
  • A NIC
  • Network interface chip
  • Software support for the chip
  • A (working) device driver
  • Protocol support
  • TCP/IP, ftp, telnet, nfs
  • A configured protocol stack
  • Knowing how to talk
  • A configured server/client
  • Someone to talk to
  • A network media
  • A bit of wire!
  • We have got
  • SMCs91C96I
  • FPGA complications
  • SMC9194 driver in linux 2.4 kernel source
  • Doesnt work!
  • TCP/IP is in kernel
  • Works
  • Needs configuration
  • Fairly straightforward
  • We can use kenny
  • LDAP problems
  • Use Ethernet fly leads
  • Remember to reconnect!

5
The SMC91C96I Chip
  • Standard series of chips
  • Originally ISA bus chips
  • Local bus, PCMCIA versions
  • Horrendously complex
  • The documentation leaves a lot to be desired
  • Well supported under Linux
  • Various versions of drivers around
  • We will look at this later

6
The SMC91C96I features
  • Half and full duplex chip
  • Has 6k bytes of on board ram memory
  • Internal MMU
  • Supports IEEE 802.3 (Ethernet)
  • Status leds
  • Has magic packet!

7
Linux SMC9194 device driver
  • Doesnt work out of the box!
  • There are a few lines that need editing before it
    will compile
  • It requires quite a bit of configuration for our
    system
  • The memory address of the chip needs specifying
  • The FPGA code needs writing and incorporating

8
The SMC registers
9
The SMC registers
  • The SMC chip is located at ox20000300
  • We repogram the MMU to reflect it at 0xF3800300,
    IO space
  • This is done in pangolin.c

static struct map_desc pangolin_io_desc
__initdata / virtual physical length
domain r w c b / 0xe8000000,
0x00000000, 0x00800000, DOMAIN_IO, 0, 1, 0, 0 ,
/ Flash bank 0 / 0xf2400000, 0x10400000,
0x00030000, DOMAIN_IO, 0, 1, 0, 0 , / FPGA 0
/ 0xf3800300, 0x20000300, 0x00004000,
DOMAIN_IO, 0, 1, 0, 0 , / SMC91c96 ethernet
chip / LAST_DESC
10
Probing the chip
  • We need to probe the chip
  • There are some bugs in the probe code that need
    fixing
  • It finds the chip but cant set up the irq for it

unsigned int addr int base_addr dev-gtbase_addr
0xf3800300 dev-gtirq0 base_addr
dev-gtbase_addr SET_MODULE_OWNER(dev) / try
a specific location / addr ioremap(0xf3800300,
10 16) if (!addr) return
-ENOMEM retsmc_probe(dev, base_addr) iounmap(
addr)
11
IRQs on the Puppeteer
  • The interrupt structure on the StrongArm (and ARM
    generally) is very simple
  • To create more complex interrupt structures in
    hardware designers will use interrupt controllers
  • The Puppeteer use the FPGA for this task
  • This means that we are dependant on the level of
    documentation of the Verilog/VHDL rather than the
    datasheets

12
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com