Title: Embedded Systems Programming
1Embedded Systems Programming
- Networking on the puppeteer
2Networking 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
3Networking 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!
4The 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!
5The 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
6The 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!
7Linux 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
8The SMC registers
9The 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
10Probing 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)
11IRQs 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)