figure 18.1 programming languages used to develop embedded devices

10
Operating System Support for SOPC Design

Upload: minda

Post on 18-Feb-2016

47 views

Category:

Documents


0 download

DESCRIPTION

Figure 18.1 Programming languages used to develop embedded devices. Language Survey data is from the 2006 annual embedded market survey conducted by EETimes and Embedded Systems Design Magazine ( www.embedded.com ). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Figure 18.1  Programming languages used to develop embedded devices

Operating System Support for SOPC Design

Page 2: Figure 18.1  Programming languages used to develop embedded devices

Language Survey data is from the 2006 annual embedded market survey conducted by EETimes and Embedded Systems Design Magazine (www.embedded.com). Articles published throughout the year discuss the results of the annual survey and examine the implications and trends found in the data.

0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00%

Others

Assembly

Java

C#

C++

C

Figure 18.1 Programming languages used to develop embedded devices.

Page 3: Figure 18.1  Programming languages used to develop embedded devices

Figure 18.2 Real-time OS kernels used in new embedded designs.

Page 4: Figure 18.1  Programming languages used to develop embedded devices

RTOS OS Type Company Name

Nios II IDE Plug-in

eCos Yes Open Source

eCosCentric -

Euros RTOS Yes Commercial Euros -Erika

EnterpriseYes Commercial Evidence Yes

ThreadX Yes Commercial Express Logic YesNucleus Plus Yes Commercial Graphics -MicroC/OS-II Yes Commercial Micrium Yes

embOS Yes Commercial Segger -osCAN Yes Commercial Vector Informatik -μClinux - Open

SourceMicrotronix Yes

μClinux - Open Source

Community Supported(based on Microtronix

port)

OS

Table 18.1 OS support for the Nios II Processor

Page 5: Figure 18.1  Programming languages used to develop embedded devices

Hardware Abstraction Layer (HAL)

Device

Driver

Device

Driver

Device

Driver

Device

Driver

Device

Driver

User Application Program

Nios II Processor System Hardware

Standard C Library

MicroC/OS-IIAPI

Figure 18.3 MicroC/OS II System Architecture.

Page 6: Figure 18.1  Programming languages used to develop embedded devices

Figure 18.4 This is the completed µClinux compatible Nios II design in SOPC Builder.

Page 7: Figure 18.1  Programming languages used to develop embedded devices

/cygdrive/c/altera/71/nios2eds/examples[SOPC Builder]$ cd c:/cygdrive/c[SOPC Builder]$ cd altera/qdesigns/rpds18/complete//cygdrive/c/altera/qdesigns/rpds18/complete[SOPC Builder]$ nios2-configure-sof rpds18.sofSearching for SOF file:in . rpds18.sofInfo: *******************************************************************Info: Running Quartus II ProgrammerInfo: Command: quartus_pgm --no_banner --mode=jtag -o p;rpds18.sofInfo: Using programming cable "USB-Blaster [USB-0]"Info: Started Programmer operation at Wed Aug 01 14:11:26 2007Info: Configuring device index 1Info: Device 1 contains JTAG ID code 0x020B40DDInfo: Configuration succeeded -- 1 device(s) configuredInfo: Successfully performed operation(s)Info: Ended Programmer operation at Wed Aug 01 14:11:28 2007Info: Quartus II Programmer was successful. 0 errors, 0 warnings Info: Allocated 51 megabytes of memory during processing Info: Processing ended: Wed Aug 01 14:11:28 2007 Info: Elapsed time: 00:00:09/cygdrive/c/altera/qdesigns/rpds18/complete[SOPC Builder]$ nios2-download -g zImageUsing cable "USB-Blaster [USB-0]", device 1, instance 0x00Pausing target processor: OKInitializing CPU cache (if present)OKDownloaded 1775KB in 22.6s (78.5KB/s)Verified OKStarting processor at address 0x00D00000/cygdrive/c/altera/qdesigns/rpds18/complete[SOPC Builder]$

Figure 18.5 The sequence of commands and output that appear when programming the FPGA via the Nios II Command Shell is shown here.

Page 8: Figure 18.1  Programming languages used to develop embedded devices

Uncompressing Linux... Ok, booting the kernel.Linux version 2.6.19-uc1 (tyson@tyson-ubuntu) (gcc version 3.4.6) #125 PREEMPT Tue Jul 31 14:10:46 EDT 2007 uClinux/Nios IIAltera Nios II support (C) 2004 Microtronix Datacom Ltd.setup_arch: No persistant network settings signature at 003F0000Built 1 zonelists. Total pages: 2032Kernel command line: PID hash table entries: 32 (order: 5, 128 bytes)Console: colour dummy device 80x25Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)Memory available: 5044k/8192k RAM, 0k/0k ROM (1971k kernel code, 1084k data)...fb0: Altera frame buffer device, using 600K of video memoryaltps2 : base 805010d0 irq 7io scheduler noop registeredio scheduler deadline registered (default)NIOS serial driver version 0.0ttyS0 (irq = 2) is a builtin NIOS UART<DM9KS> I/O: 805010c8, VID: 90000a46 usbmon: debugfs is not availabledriver isp1362-hcd, 2005-04-04isp1362-hcd isp1362-hcd: ISP1362 Host Controllerisp1362-hcd isp1362-hcd: new USB bus registered, assigned bus number 1isp1362_hc_reset:...Welcome to ____ _ _ / __| ||_| _ _| | | | _ ____ _ _ _ _ | | | | | | || | _ \| | | |\ \/ / | |_| | |__| || | | | | |_| |/ \ | ___\____|_||_|_| |_|\____|\_/\_/ | | |_|For further information check:http://www.uclinux.org/...Sash command shell (version 1.1.1)/>

Figure 18.6 This is an abbreviated version of the messages that print out in the console terminal when µClinux is booting.

Page 9: Figure 18.1  Programming languages used to develop embedded devices

Command/Program Description

ls List the files and folders in the current directory.

ps List information about the currently running processes including the PID number for each process.

kill Stops a running process. The PID for the process that will be halted must be specified.

free Lists the amount of used and available memory.

ping Starts a network utility that can be used to test network communication.

ifconfig Displays and sets network configuration settings.

dhcpcd Starts a DHCP client daemon that will automatically acquire an IP address and other the network settings from a DHCP server.

ftpd Starts an FTP server daemon that can be used to access files on the µClinux system from over the network.

telnetd Starts a telnet server daemon that can be used to access a µClinux console terminal over the network.

boa Starts a lightweight web server on the µClinux system. The root web page is stored in /home/httpd/.

mount Used to mount/access different filesystems including USB memory sticks.

nano-X Starts a windowing environment in µClinux.

nanowm Starts a window manager that runs in the nano-X environment.

nxterm Starts a terminal program in nano-X. ntetris Starts a graphical version of the Tetris game in nano-X. nxview Displays a JPEG image in a window in nano-X.

Table 18.2 Selected Supported Commands in µClinux

Page 10: Figure 18.1  Programming languages used to develop embedded devices

#include <stdio.h>#include <unistd.h>#include "nios2_system.h"int main( void ){ int i; volatile unsigned *leds = ((volatile unsigned *)(na_leds)); for(i=0; i<256; i++) { *leds = i; sleep(1); } return 0;}

Figure 18.7 This is the source code for a user program that has been included in the µClinux kernel image included on the DVD.