uclinuxblackfin www.hhcn.com 1
Blackfin Why uclinux HHBF561 2
Blackfin New generation of high performance, low power ADI Processors Industrial Controls VoIP VoIP 3
BlackfinBF533 System Peripherals Dynamic Power Management Switching Regulator PLL Watchdog JTAG Up to 750 MHz BLACKfin Processor Core User Peripherals SPORT 2 SPI 1 UART 1 Timers 3 Converter Host PC PWM Real Time Clock Memory GPIO 16 Network Interfaces FLASH/SRAM SDRAM PM up to 80K bytes DM up to 68K bytes DMA Video I/O PPI LCD Camera 4
BlackfinBF561 Emulator & Test Control Voltage Regulator Event Watchdog Controllers Timers System Control Blocks Memory DMA no RTC PLL 32-bit External Bus Interface BF533 : Blackfin Core Up to 750 MHz 32KB 64KB Inst. Data SRAM / Cache L2 L1 System Interface Unit 128 KB SRAM Blackfin Core Up to 750 MHz 32KB 64KB Inst. Data SRAM / Cache High Speed I/O PPI 0 / GPIO PPI1 / GPIO 2 BF Cores 2 PPI 32Bit EBIU No RTC 32Bit DMA 3 DMA controller SPORT0 SPORT1 GPIO TIMERS (12) SPI0 UART IrDA Peripheral Blocks 5
Blackfin Converter Network Display Blackfin Control Signalcode processing RTC Watchdog RTOS DSP 6
Blackfin Advanced Technology In Development Consumer Media BF56x BF561-750 756 MHz 2xPPI, 32-bit EBIU 4xSerial Ports 4xPPI, 4xSerial Ports, 10/100 Ethernet MAC, PCI, HPI BF56x 2xPPI, 4xSerial Ports, USB2.0 BF561 500 600 MHz 2xPPI, 32-bit EBIU 4xSerial Ports BF53x PPI, 3xSerial Ports, USB2.0 Automotive, Industrial and Instrumentation BF539 BF533-750 PPI, 10xSerial Ports, I 2 C, CAN Performance BF533 BF532 BF531 400-600 MHz PPI, 16-bit EBIU 4xSerial Ports 756 MHz PPI, 16-bit EBIU 4xSerial Ports BF536/537 PPI, 5xSerial Ports, I 2 C, CAN, 10/100 Ethernet MAC BF534 PPI, 5xSerial Ports, I 2 C, CAN, 48xGPIO BF535 PCI, USB 4xTimers, Watchdog Timer 16xGPIO, RTC PRESENT FUTURE 7
uclinux Blackfin + OS Embedded Linux GHS Integrity Control Applications OS Real Time DSP Code VCSE Kernel (or RTOS) Blackfin VDK from ADI Unicoi Fusion RTOS Nucleus PLUS ThreadX CMX Live Devices uitron (API)... 8
uclinux VxWorks WinCE Embedded Linux Ohter < 512KB + + < 900KB Linux API 9
uclinux Micro-Control Linux MMU real memory manage flat elf2flt Motorola DragonBall, and other 68K Derivatives Motorola ColdFire ARM7TDMI and MC68EN302 ETRAX Intel i960 PRISMA Atari68K Blackfin RT 10
uclinux TCP/IP data 50~100k bss100~150k text >80k 300k 11
uclinux LinuxuClinux TOP ADDR D000-0000 (virtual) Linux w/ Virtual Memory stack TOP ADDR 00EA-6000 (physical) uclinux heap Heap Pages Allocated Virtual Gap ~ 256 MB heap stack static Data Using MMAP Fixed size Stack No Gaps Gaps Round to Next page BASE ADDR C000-0000 (virtual) static Data text BASE ADDR 00E8-0000 (physical) text 12
uclinux uclinux bootloader vmlinux.lds.s 13
HHBF533 600MHZ BF533 16M SDRAM 2M FLASH UART 10M/100M USB Host USB Device RTC JTAG Bootloader U-Boot 1.1.1 Flash uclinux Linux-2.6.2 Ext2 ftp, ftpd, telnet, telnetd,httpd... 14
HHBF561开发平台 600MHZ BF561处理器 64M SDRAM 16M FLASH UART串口 10M/100M以太网口 音频输入接口 音频输出接口 视频输入接口 视频输出接口 USB Host USB Device JTAG调试口 Bootloader U-Boot 1.1.1 z 硬件测试 z 以太网或串口下载程序 z Flash烧写 uclinux系统 z Linux-2.6.2内核 z 设备驱动 z Ext2根文件系统 z 网络应用 ftp, ftpd, telnet, telnetd,httpd... 15
U-BOOT linux lib 16
HHBF561 Linux 17
flash U- boot linux flash u-boot SDRAM linux linux SDRAM 18
Linux GNU 4 GCC: GNU.o AS: GNU (Assembler).S.s.o LD: GNU (Linker) LDD: NM: AR: -m486 -On -shared -static -Wall 486 19
Make Make Make Makefile Makefile EXEC = test OBJS = test.o all: $(EXEC) $(EXEC): $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS_$@)) romfs: clean: $(ROMFSINST) /bin/$(exec) -rm -f $(EXEC) *.elf *.gdb *.o uclinux-dist/makefile 20
/HHBF561/tools /usr/local cp -rf /HHBF561/tools/* /usr/local 21
blackfin cvs -z9 -d:pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 binutils cvs -z9 -d:pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 elf2flt cvs -z9 -d:pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 gcc http://blackfin.uclinux.org/frs/?group_id=17 Binutils: make distclean./configure --target=bfin-elf --prefix=<output_dir> --exec-prefix=<output_dir> make make install cp -rf <2.6 kernel>/linux-2.6.x/include <output_dir>/bfin-elf cp -rf <2.6 kernel>/lib/libc/include <output_dir>/bfin-elf 22
PATH=<output_dir>/bin:$PATH GCC make disclean./configure --target-bfin-elf --prefix=<output_dir> --exec-prefix=<output_dir> make make install Elf2flt make distclean./configure --target=bfin-elf --with-libbfd=<binutils_dir>/bfd/libbfd.a --with-libiberty=<output_dir>/lib/libiberty.a --with-bfd-include-dir=<binutils_dir>/bfd --with-inutils-include-dir=<binutils_dir>/include --prefix=<ourput_dir> --exec-prefix=<output_dir> make make install 23
U-BOOT LINUX U-BOOT U-BOOT(Universal Bootloader) PowerPCARM U-BOOTLinux Linux Blackfin BF533 U-BOOT http://blackfin.uclinux.org/frs/?group_id=20&release_id=110,u-boot BF561 24
U-BOOT U-BOOT make clean make mrproper make ezkit561_config ROM U-BOOT make clean make all RAM U-BOOT make clean make u-boot.ram 25
U-BOOT U-BOOT help [COMMAND] go ADDR BOOT> help tftp setenv [NAME VALUE] fl DEST SRC LENGTH FLASH BOOT> setenv ipaddr 192.168.2.120 printenv [NAME] md[.b,.w,.l] ADDR BOOT> printenv ipaddr saveenv flash bootelf [ADDR] elf BOOT> saveenv loadb [ADDR BAUDRATE] BOOT> loadb 0x1000 115200 tftp ADDR FILENAME BOOT> tftp 0x1000 linux.bin BOOT> go 0x1000 BOOT> fl 0x20000000 0x10000000 0x20000 BOOT> md 0x1000 BOOT> bootelf 0x1000 26
U-BOOT Visual DSP++ U-BOOT RAMU-BOOT(u-boot.dxe) ROMU-BOOT(u-boot.bin) PC JTAG Visual DSP SDRAM u-boot.dxe EBIU_SDGCTL: EBIU_SDBCTL: EBIU_SDRRC: 0x91998D 0x13 0x74A PC RAMU-BOOT 0x1000000 115200 8N1 U-BOOT ROMU-BOOT FLASH BOOT> loadb 1000000 BOOT>fl 20000000 1000000 20000 FLASH U-BOOT 27
uclinux BF533 LINUX 2.42.6, 2.6 2.6 Blackfin uclinux http://blackfin.uclinux.org/frs/?group_id=17&release_id=107 linux uclinux uclinux Linux Makefile 28
Linux Makefile : make clean make dep(2.4 ) make Linux config.in2.6 Kconfig.config uclinux linux-2.6.x make menuconfig 29
Linux linux BF561: BF561 BF533,CORE A BF533 BF561 CORE A uclinux on BF533BF561 : linux-2.6.x/include/asm/board/bf533.hcclk_xxxbf561 linux-2.6.x/drivers/serial/bf33_serial.c linux-2.6.x/arch/ints-priority.cbfin_request_irqbfin_enable_irq BF561 30
C uclibcuc-libc uc-libc uclinuxc coldfile uclibcuc-libc bug uclibc libc: C libm: libcrpt: libpthread:posix libutil: Unix libz: 31
uclinux-dist/user uclinux-dist make menuconfig Busybox Busybox linux UNIX PC Busybox POSIX arg0 32
Linux linux init shell BlackfinLinux BSP ext2 uclinux-dist/vendors/ TARGET/Makefile uclinux-dist/romfs genext2fs ext2 rootfs.img 33
rootfs.img.ramdisk rootfs.o rootfs.o linux ld vmlinux.lds.s.data:{ }>ram ramdisk_begin =. ; *(.ramdisk) ramdisk_end =. ; ramdisk_beginramdisk_end 34
uclinux-dist make uclinux-dist/images linux.binzimage.bin linux.bin linux zimage.bin linux.bin u-boot FLASH, U-BOOT U-BOOT SDRAM BOOT> tftp 0x1000 linux.bin BOOT> go 1000 BOOT> tftp 0x1000 zimage BOOT> fl 0x20040000 0x1000 0x100000 U-BOOT 35
HHBF561 Linux uclinux 36
HHBF561 D/A ADV7171BF533PPI BF533 GPIO I2C ADV7171 struct file_operations adv7171_fops = { open: ioctl: release: adv7171_open, adv7171_ioctl, adv7171_release, write: adv7171_write, }; init() adv7171 PPI DMA open(): PPI DMA write(): ISR(): ioctl(): DMA 37
HHBF561 Linux dev_basenet_device Linux 38
HHBF561 EBIU DM9000 D0~D1516 DM9000 A2 DM9000 / PF11DM9000 CS1 DM9000 39
HHBF561 drivers/net/space.c ethif_probe dmfe_probe: dev, ethif_probe dmfe_open: ifconfig Open dmfe_stop: dmfe_start_xmit: sk_buffer dmfe_interrupt dm9000... 40
HHBF561 Inetd /etc/inetd.conf service type protocal wait user server cmdlinec service /etc/services Type socket Stream/Dgram Protocol Wait Dgram socket User ID Server Cmdline argument() 41
HHBF561 uclinux make menuconfig inetdtelnetdftpd romfs/etc/inittab inet:unknown:/bin/inetd romfs/etc/inetd.conf ftp tream tcp nowait root /bin/ftpd telnet stream tcp nowait root /bin/telnetd make 42
HHBF561 telnetd: [/]# telnet 192.168.2.254 Trying 192.168.2.254... Connected to 192.168.2.254 (192.168.2.254). Escape character is ^]. Sash command shel (version 1.1.1) />ls bin dev etc home lib mnt proc root sbin tmp usr var /> 43
HHBF561 BF561CORE A LINUX CORE B CORE A CORE B CORE A CORE A 44
HHBF561 VoIP Linux H.264/MPEG4 G.711/G.723.1/G.729/MP3 TCP/IP H.323 GUI MPEG4 MP3WMA email SMSMMS ADI BF561(600MHz) TFT LCD(3.5 ) FLASH SDRAM CCD A/D A/D D/A 45
HHBF561 FAQ 1. uclinux uclinux Application Module MP3 SoHo Gateway Communication Module BF533 +uclinux 50uS 2. GPL GPL module insmod GPL 46
market@hhcn.com : http://hhtech.clubhi.com/ 0551-5333155/5333156/5333157 47