2010-04-16 14:16:51     New to uClinux and Blackfin

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-04-16 14:16:51     New to uClinux and Blackfin

Matthew Sacrey (UNITED STATES)

Message: 88529   




I'm working a class project involving a BlackFin 548 evaluation kit. My tea inherited the project from a previous year's group, who installed uClinux and configured most of the operating system including installing MPlayer.


I downloaded the toolchains from the site and installed them on ubunto 9.10. I have attempted multiple times to compile a simple "Hello World" application:


int main(){


printf("Hello World");






when I call the 'bfin-linux-uclib-gcc' compiler I create a helloworld executeable.


I then transfer this to the BlackFin using FTP, (the previous group had set all that up). Then following the instructions from the toolchain documents, I SSH into the board, I change the permissions using, "chmod 777 helloworld" then try to excecute using "./helloworld" When I do this however instead of "Hello World" the terminal responds with "Bus Error". I have looked this up and it ussually refers to a memory error, but I highly doubt that is the case since I have created a very simple application.




Any help would be greatly appreciated.




2010-04-16 15:07:23     Re: New to uClinux and Blackfin

Mike Frysinger (UNITED STATES)

Message: 88531   


run `dmesg` to view the crash message


make sure the kernel and toolchain versions match like the faq says:





2010-04-20 18:02:44     Re: New to uClinux and Blackfin

Matthew Sacrey (UNITED STATES)

Message: 88672   


so i made sure that i downloaded the correct toochain, the 2008R1.5


after compiling and placing the file on the board i still get the same error here is the debug info you asked for:


root:~/Hello> dmesg

Linux version (capstone@blackfin-host) (gcc version 4.1.2 (ADI svn)) #71 PREEMPT Fri May 1 16:29:09 EDT 2009

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF548 Rev any

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x001bc700

  rodata    = 0x001bd000-0x002410ac

  data      = 0x00242000-0x0025e000

    stack   = 0x00242000-0x00244000

  init      = 0x0025e000-0x01232000

  bss       = 0x01232000-0x01247430

  available = 0x01247430-0x03dff000

  DMA Zone  = 0x03e00000-0x04000000

On node 0 totalpages: 15871

  DMA zone: 123 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 15748 pages, LIFO batch:3

  Normal zone: 0 pages used for memmap

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 15748

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Console: colour dummy device 80x25

console handover: boot [early_BFuart0] -> real [tty0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Kernel managed physical pages: 15871

Memory available: 44184k/65536k RAM, (16208k init code, 1773k kernel code, 732k data, 2048k dma, 588k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (42 KB free)

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

ezkit_init(): registering device resources

SCSI subsystem initialized

libata version 2.21 loaded.

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, musb-dma, host, debug=0

musb_hdrc: ConfigData=0x00 (UTMI-8)

musb_hdrc: kernel must blacklist external hubs

musb_hdrc: hw_ep 0shared, max 64

musb_hdrc: hw_ep 1tx, max 128

musb_hdrc: hw_ep 1rx, max 128

musb_hdrc: hw_ep 2tx, max 128

musb_hdrc: hw_ep 2rx, max 128

musb_hdrc: hw_ep 3tx, max 128

musb_hdrc: hw_ep 3rx, max 128

musb_hdrc: hw_ep 4tx, max 128

musb_hdrc: hw_ep 4rx, max 128

musb_hdrc: hw_ep 5tx, max 1024

musb_hdrc: hw_ep 5rx, max 1024

musb_hdrc: hw_ep 6tx, max 1024

musb_hdrc: hw_ep 6rx, max 1024

musb_hdrc: hw_ep 7tx, max 1024

musb_hdrc: hw_ep 7rx, max 1024

musb_hdrc: USB Host mode controller at ffc03c00 using DMA, IRQ 82

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

dma_alloc_init: dma_page @ 0x03d92000 - 512 pages at 0x03e00000

hub 1-0:1.0: 1 port detected

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bf54x-lq043: FrameBuffer initializing...

Console: switching to colour frame buffer device 80x24

bfin-otp: initialized

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

smsc911x: Driver version 2007-07-13.

register bfin atapi driver

scsi0 : pata-bf54x

ata1: PATA max UDMA/66 cmd 0x00000000 ctl 0xffc03800 bmdma 0x00000000 irq 68

ata1.00: ATA-7: FUJITSU MHW2040AT, 0000000B, max UDMA/100

ata1.00: 78140160 sectors, multi 16: LBA

ata1.00: configured for UDMA/66

blk_queue_max_hw_segments: set to minimum 1

scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHW2040A 0000 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors (40008 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors (40008 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

sda: sda1

sd 0:0:0:0: [sda] Attached SCSI disk

physmap platform flash device: 00400000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

NOR chip too large to fit in mapping. Attempting to cope...

Intel/Sharp Extended Query Table at 0x010A

  Unknown Intel/Sharp Extended Query version 1.5.

gen_probe: No supported Vendor Command Set found

physmap-flash physmap-flash.0: map_probe failed

BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.

bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3

NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)

Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":

0x00000000-0x00400000 : "Linux Kernel"

0x00400000-0x10000000 : "File System"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@4

bfin-spi bfin-spi.1: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc02300, dma channel@5

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

input: bf54x-keys as /class/input/input0

bf54x-keys: Blackfin BF54x Keypad registered IRQ 76

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

i2c /dev entries driver

i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller Driver, Version 1.8, regs_base@ffc02200

usbcore: registered new interface driver usbhid

drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).

ASoC version 0.13.1

dma rx:0 tx:1, err irq:10, regs:ffc00800

AD1980 SoC Audio Codec

asoc: AC97 <-> bf5xx-ac97 mapping ok

ALSA device list:

  #0: bf5xx-board (AD1980)

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Setting up Blackfin MMR debugfs

rtc-bfin rtc-bfin: setting the system clock to 1970-03-16 00:13:19 (6394399)

Freeing unused kernel memory: 16208k freed

eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175

eth0: SMSC911x MAC Address: 00:e0:22:fe:bd:e8

eth0: link down

eth0: link up, 100Mbps, full-duplex, lpa 0xC181

Data access CPLB miss

- Used by the MMU to signal a CPLB miss on a data access.

Defered Exception context


COMM=hello PID=273

TEXT = 0x01c1b000-0x01c1b73c        DATA = 0x0261873c-0x0261889c

BSS = 0x0261889c-0x01b80000  USER-STACK = 0x01b9fea0


return address: [0x037d4ad8]; contents of:

0x037d4ab0:  9310  acdd  9128  0c00  1406  209d  6c45  9128

0x037d4ac0:  0c00  1899  0c08  17fb  3206  a068  e401  0015

0x037d4ad0:  51c1  320f  6ff9  6c09 [9948] 0c00  17fd  3041

0x037d4ae0:  0838  1815  0000  0000  e588  ffff  6179  3251


SEQUENCER STATUS:        Not tainted

SEQSTAT: 00000026  IPEND: 0030  SYSCFG: 0006


  EXCAUSE   : 0x26

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x00720000> [ mplayer + 0x0 ]

RETX: <0x037d4ad8> [ /lib/ld-uClibc-0.9.29.so + 0x4ad8 ]

RETS: <0x037d455c> [ /lib/ld-uClibc-0.9.29.so + 0x455c ]

PC  : <0x037d4ad8> [ /lib/ld-uClibc-0.9.29.so + 0x4ad8 ]

DCPLB_FAULT_ADDR: <0x036d3240> /* unknown address */

ICPLB_FAULT_ADDR: <0x0004bd28> { _d_path + 0x40 }



R0 : 6ffffff0    R1 : 00000000    R2 : 00000017    R3 : 0000042b

R4 : 0070cf78    R5 : 037d689c    R6 : 0267b028    R7 : 6ffffff0

P0 : 0267b028    P1 : 6ffffff0    P2 : 0070d254    P3 : 0267b028

P4 : 00000000    P5 : 026187d8    FP : 01b9fcac    SP : 0071ff24

LB0: 0029ef0b    LT0: 0029ef0a    LC0: 00000000

LB1: 037d475d    LT1: 037d475c    LC1: 00000000

B0 : 02f6804c    L0 : 00000000    M0 : c9bdd57d    I0 : 02678005

B1 : 02f6811c    L1 : 00000000    M1 : 88508b8e    I1 : 0070d138

B2 : 40a6919d    L2 : 00000000    M2 : 00641700    I2 : 00000000

B3 : 7c934b23    L3 : 00000000    M3 : 02f803c8    I3 : 02f3f80c

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 01b9fac8  ASTAT: 02002020


No trace since you do not have CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled


Stack from 0071ff04:

        00000000 ffa00720 00246568 00246568 00246564 00000002 00000005 037d1dca

        037d4ad8 00000030 00000026 00000000 00720000 037d4ad8 037d4ad8 037d455c

        6ffffff0 02002020 037d475d 0029ef0b 037d475c 0029ef0a 00000000 00000000

        00000000 00000000 00000000 00000000 7c934b23 40a6919d 02f6811c 02f6804c

        00000000 00000000 00000000 00000000 02f803c8 00641700 88508b8e c9bdd57d

        02f3f80c 00000000 0070d138 02678005 01b9fac8 01b9fcac 026187d8 00000000


Call Trace:




2010-04-20 18:06:39     Re: New to uClinux and Blackfin

Mike Frysinger (UNITED STATES)

Message: 88673   


2008R1.5 is not the latest release, 2009R1.1 is.  we're not going to look at any BF54x issues on old releases especially since the 2008R1.5 support was the first cut at it.





2010-04-21 10:38:21     Re: New to uClinux and Blackfin


Message: 88725   




Just to follow up with Mike's thoughts - we only support the latest release - and trunk (when possible).