net+os 6.1 training. introduction what is net+os? in circuit emulator (raven) ethernet dev.-driver...

15
NET+OS 6.1 Training

Upload: samuel-todd

Post on 28-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

NET+OS 6.1 Training

Page 2: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

Introduction

Page 3: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

What is Net+Os?

In Circuit Emulator(Raven)

Ethernet Dev.-Driver

GPIOPHY

Ser. DD.

OS (ThreadX)

IP, ICMP, IGMP, PPP, …

TCP UDP

Higher Level Networking Protocols

MEM

DMA. DD.

Application

TargetTarget

2 Serial

DMAMAC

IP, ICMP

UDP

BootP,DHCP,TFTP

NVMEM

NVMEM Driver

Bootloader

POSTZip

UnzipRem. Update

Dev. Tools

binutils 2.12gcc 3.2.0newlib 1.11.0libstdc++ 3.0gdb 5.3

GHSMulti2000

Page 4: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

The Operating System - ThreadX

• ThreadX is the underlying RTOS in NET+OS• Scalable, high performance, real-time kernel• Developed by Express Logic

(www.expresslogic.com)• Included in NET+OS as a library

/netos/lib/32b/tx.a• Only objects used are linked to the image• ANSI C compliant• Source code optionally available

Page 5: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

The TCP/IP Stack

• Stack is based on the >>Fusion<< TCP/IP Stack(former Pacific Softworks)

• Protocols: PPP, ARP/RARP, ICMP, IGMP, IP, UDP, TCP, DHCP

• Berkeley BSD compliant Socket Interface

• Included in NET+OS as a library /netos/lib/32b/tcpip.a

• Only objects used are linked to the image

• ANSI C compliant

Page 6: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

Guide to Protocols inside NET+OS

10 Base-T 100 Base-T

10 Base-F 100 Base-F

HPNA

IEEE802.3

CSMA/CD

ARP

IP

ICMP IGMP

V.24

V.21 V.22

DHCP BootP

PPP

CSLIPSLIP

toIP

fromSLIP

CSLIP

fromPPP

toIP

PAP

CHAP

TCP UDP

DNS

TFTP NTPFTP Telnet SMTP HTTP SNMP SNMPv2

Layer 2Data LinkEthertype

08060800

Layer 3Network

Layer 4Transport

Layer 5Session

Layer 7Application

V.90

RARP 8035

Page 7: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

Higher Level Networking Protocols• Easy to use APIs for

– POP3 / SMTP– FTP client and server– HTTP– Telnet– SNMP,

SNMPv2– DNS– NTP

• Fast IP• Fast UDP

void applicationStart (void){ unsigned long rc; unsigned long handle; char to[] = "[email protected]"; //char to[] = "[email protected]"; char from[] = "[email protected]"; char subject[] = "Hi there"; char msg[] = "Howdy.";

handle = MCCreate(POP3, 110, "192.168.101.240", \ 25, "192.168.101.240");

rc = MCSendSimpleMail(handle, from, to, subject, msg, strlen(msg)); printf("MCSendSimpleMail returned %d\n", rc); rc = MCClose(handle); tx_thread_suspend(tx_thread_identify());}

void applicationStart (void){ unsigned long rc; unsigned long handle; char to[] = "[email protected]"; //char to[] = "[email protected]"; char from[] = "[email protected]"; char subject[] = "Hi there"; char msg[] = "Howdy.";

handle = MCCreate(POP3, 110, "192.168.101.240", \ 25, "192.168.101.240");

rc = MCSendSimpleMail(handle, from, to, subject, msg, strlen(msg)); printf("MCSendSimpleMail returned %d\n", rc); rc = MCClose(handle); tx_thread_suspend(tx_thread_identify());}

Page 8: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

Low Level Code• Board Support Package (BSP) completely available

in source, including device drivers for:– Network Interface, Loop Back Device– Serial: UART, SPI, HDLC– DMA– I2C, LCD– USB: Host, Device– Power Save

Page 9: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

GHS - Multi 2000

Page 10: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

GHS – Multi 2000• Green Hills Multi 2000, includes

– Project Builder

– C/C++ Compiler, Linker, Source Level Debugger

– Performance Profiler

– Run-time Error Checking

– Graphical Function Browser

– Version Control Systemincludes Interface to ClearCase as well

– Event Analyzer

Page 11: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

The GNU Development Tools …run in a UNIX shell emulation called Cygwin

/

home

tuttle

usr

local

x-arm

x-m68k

opt

NetOS

Cygwin bash

Page 12: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

Covering the Tools w/ graphical FEs

Dev. Tools

binutils 2.10gcc 2.95.2newlib 1.8.1libstdc++ 2.81gdb 5.0

Insight/gdbtk

Page 13: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

GDBTK - Insight – A graphical FE for GDB

Page 14: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

The Boot Up Procedure

• Bootloader Image • Application Image

Boot Loader - rom.binFirst Sector of Flash – 64K

Application Image – image.bin

Nvram – Last Sector of flash – 64K

Page 15: NET+OS 6.1 Training. Introduction What is Net+Os? In Circuit Emulator (Raven) Ethernet Dev.-Driver GPIO PHY Ser. DD. OS (ThreadX) IP, ICMP, IGMP, PPP,

Boot loaderDoes the same BSP Initialization

POST

Reset

Error-message

Valid Imagein FLASH?

fail

yes

unzip codeto

RAM

DHCP-request

boot, usingDHCP & TFTP

transfer control todownloaded / unziped

code in RAM

zip codeto

FLASH

no

pass

wait forreply

no reply

TFTPdownload

reply

no reply after5 retries

Error-

messagevalid

update?

no

yes

failure