2008-08-08 12:48:41     uClinux crash

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

2008-08-08 12:48:41     uClinux crash

Stephen Sheldon (GERMANY)

Message: 60182   




We have a Problem with our Application. The Application works fine on Windows and Suse Linux on a normal Desktop PC. When we build it for blackfin uClinux the application crashs after a while and uClinux reboots. No kernel stack or other error messages. But when I run the application in debug mode with gdbserver it works fine. No crash.


Has someone else a similar problem? Or knows a solution?


uClinux Version: uClinux-dist-2008R1-RC8

Board: ADSP-BF561 EZ-KIT




best regards






2008-08-08 13:05:48     Re: uClinux crash


Message: 60184   




When the kernel reboots - it should say why. Can you have a look at the kernel boot messages? (It should be one of "Recovering from ..." or "Reset caused ...")








2008-08-08 13:17:19     Re: uClinux crash

Stephen Sheldon (GERMANY)

Message: 60185   


this is the hole boot message. The first line is the last line from the application which was running.




INFO: ID=60000003 WK_EntitySink:entity 4000000c rm    31586         8

U-Boot 1.1.6-svn737 (ADI-2007R1) (Apr  4 2007 - 12:04:56)



Board: ADI BF561 EZ-Kit Lite board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 120 MHz



In:    serial

Out:   serial

Err:   serial

Net:    Net:   SMC91111 at 0x2C010300

Hit any key to stop autoboot:  0

## Booting image at 20040000 ...

   Image Name:   Linux-

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    6019495 Bytes =  5.7 MB

   Load Address: 00001000

   Entry Point:  00142000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 142000

Linux version (root@er00090t) (gcc version 4.1.2 (ADI svn)) #119 Mon Aug 4 12:01:18 CEST 2008

Hardware Trace Active and Enabled

Warning: limiting memory to 56MB due to hardware anomaly 05000263

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

Compiled for ADSP-BF561 Rev 0.3

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 600 MHz core clock and 120 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x000ec3b0

  rodata    = 0x000ed000-0x00130348

  data      = 0x00131000-0x00142000

    stack   = 0x00132000-0x00134000

  init      = 0x00142000-0x00bf7000

  bss       = 0x00bf7000-0x00c06530

  available = 0x00c06530-0x037ff000

  DMA Zone  = 0x03f00000-0x04000000

Instruction Cache Enabled

Data Cache Enabled (write-back)

Built 1 zonelists.  Total pages: 14224

Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600

Configuring Blackfin Priority Driven Interrupts

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

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

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

Memory available: 44448k/65536k RAM, (10964k init code, 940k kernel code, 405k data, 1024k dma, 7756k 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: 16 KB (8 KB free)

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

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

Dual core test module inserted: set testarg = [1]

@ [feb00000]

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

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

Serial: Blackfin serial driver

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

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

smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@cam.org>

eth0: SMC91C11xFD (rev 2) at 2c010300 IRQ 82 [nowait]

eth0: Ethernet addr: 00:e0:22:fe:b8:a8

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

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Freeing unused kernel memory: 10964k freed

eth0: link down


        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin


Have a lot of fun...



BusyBox v1.4.1 (2008-07-18 11:21:41 CEST) Built-in shell (msh)

Enter 'help' for a list of built-in commands.


root:/> eth0: link up, 100Mbps, full-duplex, lpa 0x45E1




2008-08-08 15:37:22     Re: uClinux crash


Message: 60187   




If there are no messages (and there appears not to be) - then that means the hardware believes it is comming out of a power on event. (and it is likely it might be a power glitch/brownout).


Can you add something like


printk("_bfin_swrst = %x\n", _bfin_swrst);


in linux-2.6.x/arch/blackfin/kernel/setup.c:setup_arch() (after the read of _bfin_swrst  to make sure).








2008-08-08 18:41:34     Re: uClinux crash

Michael McTernan (UNITED KINGDOM)

Message: 60193   




He's using u-boot 2007R1.  I think this clears SWRST by reading it at boot in /branches/2007R1/u-boot-1.1.6/cpu/bf5*/start.S, for all three chips:


    /* Check soft reset status */

    p0.h = SWRST >> 16;

    p0.l = SWRST & 0xFFFF;

    r0.l = w[p0];


Thankfully looks to have been fixed by the 2008R1 version of uBoot though.






2008-08-09 11:45:19     Re: uClinux crash


Message: 60209   




You can NOT use old U-Boot with new kernels. Please update your U-Boot.


See the faq:








2008-08-11 07:22:46     Re: uClinux crash

Stephen Sheldon (GERMANY)

Message: 60242   


With the correct U-Boot Version I get the reason why the Kernel reboots. It says: "Recovering from Watchdog event"


Does gdbserver disable the watchdog?






2008-08-11 08:49:47     Re: uClinux crash

Mike Frysinger (UNITED STATES)

Message: 60246   






2008-08-11 09:19:03     Re: uClinux crash


Message: 60247   




Just to add something to Mike's "no" - it should not need to either.


I would turn watchdog off, and see if there is any difference in operation. (if it hangs, that is a good thing).






2008-08-12 07:36:07     Re: uClinux crash

Stephen Sheldon (GERMANY)

Message: 60322   


I turned off watchdog. Now it works. The application have run over the night with no reboot.


I disabled the watchdog through uncheck the Watchdog Timer Support in Kernel Configuartion Menu.




2008-08-13 14:47:59     Re: uClinux crash


Message: 60423   




What this means is that the application is hanging up userspace (or the kernel) so much that the userspace watchdog demaon can't poke the watchdog offen enough.


Does that make sense?






2008-08-14 09:27:17     Re: uClinux crash

Stephen Sheldon (GERMANY)

Message: 60477   


Yes it makes sense.


Thank you. :-)