2010-08-09 03:06:18     bf512 uboot on custom board not booting [fails in start.S]

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

2010-08-09 03:06:18     bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92255   

 

将编译出来的u-boot.ldr烧进bf518f-ezbrd后,串口输出如下:

 

?岎黤goEadFabcdeGabeHabcI>      

       Support: ht

Early:start.S: Init Registers                           

Early:start.S: Find ourselvesz, Core: 400 MHz, System: 80

Early:start.S: Lower to 15                        

Early: Board init flash

NAND:  No NAND device

Early: Init CPLB tables             

0 MiB

Early: Exceptions setupwith page size 256, tot

Early: Turn on ICACHE                   

Early: Turn on DCACHEarning - bad CRC, usi

Early: Init global data                     

Early: IRQ init     

 

 

   

Early: Environment init                     

Early: Baudrate init                  

Early: Serial ini             

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz                                                

RAM:   32 MB          

NAND:  No NAND device found!!!                            

0 MiB   

SF: Detected M25P16 with page size 256, total  2 MB                                                 

*** Warning - bad CRC, using default environment                                              

 

In:    serial           

Out:   serial           

Err:   serial           

KGDB:  [on serial] ready                    

gd: 01f1ff80

|-flags: 3

|-board_type: 0

|-baudrate: 115200

|-have_console: 1

|-ram_size: 0

|-env_addr: 1f2000c

|-env_valid: 1

|-jt(01f220c8): 01f8c618

\-bd: 01f1ffa4

   |-bi_baudrate: 1c200

   |-bi_ip_addr: 0

   |-bi_boot_params: 0

   |-bi_memstart: 0

   |-bi_memsize: 2000000

   |-bi_flashstart: 0

   |-bi_flashsize: 0

   \-bi_flashoffset: 0

Hit any key to stop autoboot:  0

 

no devices available

Wrong Image Format for bootm command

ERROR: can't get kernel image!

bfin>

 

但将其改为bf516并烧至自己的目标板,则串口输出如下:

 

?岎黤goEadFabcdeGabeHabcI>

 

 

从上面的现象来看, 应该是start.S(_start)末执行或有误,请帮忙分析一下

 

u-boot配置文件如下:

 

/*

* U-boot - Configuration file for ZWBF512 V1.0 board

*/

 

#ifndef __CONFIG_ZWBF512_V10_H__

#define __CONFIG_ZWBF512_V10_H__

 

 

#include <asm/config-pre.h>

 

 

/*

* Processor Settings

*/

#define CONFIG_BFIN_CPU             bf516-0.1

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER

 

 

/*

* Clock Settings

* CCLK = (CLKIN * VCO_MULT) / CCLK_DIV

* SCLK = (CLKIN * VCO_MULT) / SCLK_DIV

*/

/* CONFIG_CLKIN_HZ is any value in Hz     */

#define CONFIG_CLKIN_HZ   25000000

/* CLKIN_HALF controls the DF bit in PLL_CTL      0 = CLKIN  */

/*                                                1 = CLKIN / 2  */

#define CONFIG_CLKIN_HALF  0

/* PLL_BYPASS controls the BYPASS bit in PLL_CTL  0 = do not bypass */

/*                                                1 = bypass PLL */

#define CONFIG_PLL_BYPASS  0

/* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL  */

/* Values can range from 0-63 (where 0 means 64)   */

#define CONFIG_VCO_MULT   16

/* CCLK_DIV controls the core clock divider    */

/* Values can be 1, 2, 4, or 8 ONLY     */

#define CONFIG_CCLK_DIV   1

/* SCLK_DIV controls the system clock divider    */

/* Values can range from 1-15      */

#define CONFIG_SCLK_DIV   5

 

 

/*

* Memory Settings

*/

/* This board has a 32meg  */

#define CONFIG_MEM_ADD_WDTH 10

#define CONFIG_MEM_SIZE  32

 

#define CONFIG_EBIU_SDRRC_VAL 0x029B

#define CONFIG_EBIU_SDGCTL_VAL (SCTLE | CL_3 | PASR_ALL | TRAS_4 | TRP_2 | TRCD_3 | TWR_2 | PSS)

 

#define CONFIG_EBIU_AMGCTL_VAL (AMCKEN | AMBEN_ALL)

#define CONFIG_EBIU_AMBCTL0_VAL (B1WAT_15 | B1RAT_15 | B1HT_3 | B1RDYPOL | B0WAT_15 | B0RAT_15 | B0HT_3 | B0RDYPOL)

#define CONFIG_EBIU_AMBCTL1_VAL (B3WAT_15 | B3RAT_15 | B3HT_3 | B3RDYPOL | B2WAT_15 | B2RAT_15 | B2HT_3 | B2RDYPOL)

 

#define CONFIG_SYS_MONITOR_LEN (512 * 1024)

#define CONFIG_SYS_MALLOC_LEN (384 * 1024)

 

/*

* Network Settings

*/

/*

#define ADI_CMDS_NETWORK 1

#define CONFIG_NET_MULTI 1

#define CONFIG_HOSTNAME  ZWBF512-V1.0

 

#define CONFIG_DRIVER_DM9000 1

#define CONFIG_DM9000_NO_SROM

#define CONFIG_DM9000_BASE 0x20100000

#define DM9000_IO  CONFIG_DM9000_BASE

#define DM9000_DATA  (CONFIG_DM9000_BASE + 2)

*/

 

/*

* Flash Settings

*/

#define CONFIG_ENV_OVERWRITE 1

#define CONFIG_SYS_NO_FLASH  /* we have only NAND */

 

 

 

 

/*

* SPI Settings

*/

#define CONFIG_BFIN_SPI

#define CONFIG_ENV_SPI_MAX_HZ 30000000

#define CONFIG_SF_DEFAULT_SPEED 30000000

#define CONFIG_SPI_FLASH

#define CONFIG_SPI_FLASH_SST

#define CONFIG_SPI_FLASH_STMICRO

 

 

/*

* Env Storage Settings

*/

#define CONFIG_ENV_IS_IN_SPI_FLASH

#define CONFIG_ENV_OFFSET 0x10000

#define CONFIG_ENV_SIZE  0x2000

#define CONFIG_ENV_SECT_SIZE 0x10000

 

 

 

/*

* NAND Settings

*/

#define CONFIG_NAND_PLAT

#define CONFIG_SYS_NAND_BASE  0x20000000

#define CONFIG_SYS_MAX_NAND_DEVICE 1

 

#define BFIN_NAND_CLE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 2))

#define BFIN_NAND_ALE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 1))

#define BFIN_NAND_WRITE(addr, cmd) \

do { \

  *pPORTHIO_CLEAR |= PH4; \

  bfin_write8(addr, cmd); \

  *pPORTHIO_SET |= PH4; \

  SSYNC(); \

  } while (0)

 

#define NAND_PLAT_WRITE_CMD(chip, cmd) BFIN_NAND_WRITE(BFIN_NAND_CLE(chip), cmd)

#define NAND_PLAT_WRITE_ADR(chip, cmd) BFIN_NAND_WRITE(BFIN_NAND_ALE(chip), cmd)

#define NAND_PLAT_INIT() \

do{ \

  *pPORTH_MUX |= (PH2 | PH3); \

  *pPORTH_FER &= ~(PH4 | PH5); \

} while(0)

 

 

#define NAND_PLAT_GPIO_DEV_READY       GPIO_PH5

 

 

 

 

 

 

/*

* Misc Settings

*/

#define CONFIG_BAUDRATE  115200

/*#define CONFIG_MISC_INIT_R // needed for MAC address */

#define CONFIG_UART_CONSOLE 0

 

#define CONFIG_DEBUG_EARLY_SERIAL

 

#undef CONFIG_SHOW_BOOT_PROGRESS

/* Enable this if bootretry required; currently it's disabled */

#define CONFIG_BOOT_RETRY_TIME -1

#define CONFIG_BOOTCOMMAND "run nandboot"

#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n"

 

 

 

 

/*

* Pull in common ADI header for remaining command/environment setup

*/

#include <configs/bfin_adi_common.h>

 

#endif

TranslateQuoteReplyEditDelete

 

 

2010-08-09 03:32:15     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92258   

 

as the documentation explains, the initcode runs out of L1.  if everything finished properly there, but hung when executing in external memory, then you need to verify your SDRAM is sane at the hardware level as well as your board config settings correctly match the hardware.

 

you can use JTAG to examine external memory after the board hangs to see the state of where u-boot should be loaded.

QuoteReplyEditDelete

 

 

2010-08-11 17:41:08     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92336   

 

i have ICE-100B and VDSP++, how can is do?

 

my custom board  spi flash and SDRAM the same as BF518F-EZBRD

TranslateQuoteReplyEditDelete

 

 

2010-08-11 17:47:32     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92337   

 

VDSP isnt supported.  the ICE-100B works fine with the current trunk toolchain and will be in the 2010R1 release.

QuoteReplyEditDelete

 

 

2010-08-16 10:36:17     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92458   

 

我的板是只有spi flash和nand flash, u-boot存放在spi flash, 并把BMODE设为011, 即从SPI_MASTER引导,通过串口打印出来的信息来看, cpu/blcakfin/initcode.c已正确执行,但是cpu/blackfin/start.S并没有执行, 请帮忙分析该如何解决?

 

另外,我已将toolchain 2010R1已在ubuntu编译完成, 并且gdbproxy已可检测到相应的板:

 

zwx@zwx-laptop:/blackfin/build/bfin-elf/bin$ sudo ./bfin-gdbproxy bfin

 

Remote proxy for GDB, v0.7.2, Copyright (C) 1999 Quality Quorum Inc.

MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

Blackfin adaption Copyright (C) 2008 Analog Devices, Inc.

 

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details

use `--warranty' option. This is Open Source software. You are

welcome to redistribute it under certain conditions. Use the

'--copying' option for details.

 

Found USB cable: ICE-100B

ICE-100B Firmware Version is 2.0.0

IR length: 5

Chain length: 1

Device Id: 00010010011111101000000011001011 (0x127E80CB)

  Manufacturer: Analog Devices, Inc. (0x0CB)

  Part(0):      BF518 (0x27E8)

  Stepping:     1

  Filename:     ./../share/urjtag/analog/bf518/bf518

/blackfin/toolchain/urjtag/src/bfin/bfin-part-bfin.c:154 bfin_wait_ready() Warning: untested cable or frequency, set wait_clocks to 21

warning:   bfin: no board selected, BF518 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy: waiting on TCP port 2000

 

请问我该如何测试?是否有详细的测试步骤的手册

 

TranslateQuoteReplyEditDelete

 

 

2010-08-16 12:23:43     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92462   

 

the debugging document explains what should be happening:

https://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:debugging

 

so you can trace the process with jtag and see where it's going wrong.  you still should do what i suggested originally: using jtag, examine external memory to make sure it is correct and matches your u-boot image.

QuoteReplyEditDelete

 

 

2010-08-16 21:23:38     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92471   

 

i run :

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gcc -nostartfiles init.S cpu/blackfin/initcode.o -o init.elf -Iinclude -D__ASSEMBLY__ -mcpu=bf512

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ ls init.elf -l

-rwxr-xr-x 1 zwx zwx 18193 2010-08-17 08:58 init.elf

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gdb ./init.elf

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$

 

 

why i run bfin-elf-gdb no into debug?

 

 

 

but i run bfin-uclinux-gdb :

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-uclinux-gdb

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-uclinux".

(gdb) target remote 2002

2002: No such file or directory.

(gdb)

TranslateQuoteReplyEditDelete

 

 

2010-08-16 21:28:05     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92472   

 

you'll have to debug why bfin-elf-gdb isnt executing properly.  runi it through strace, or through gdb.

 

bfin-uclinux-gdb should work with bare metal just fine.  your remote syntax is incorrect though ... you didnt specify a host.

QuoteReplyEditDelete

 

 

2010-08-17 01:53:34     Re: bf512 uboot on custom board not booting [fails in start.S]

Sonic Zhang (CHINA)

Message: 92476   

 

You should run gdb against the uboot elf image other than init.elf

 

> bfin-elf-gdb u-boot

 

gdb> target remote :2000

QuoteReplyEditDelete

 

 

2010-08-17 02:48:24     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92478   

 

我运行bfin-elf-gdb, 都没有打印出任何信息,而直接返回

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ ls u-boot* -l

-rwxr-xr-x 1 zwx zwx 629901 2010-08-17 08:58 u-boot

-rwxr-xr-x 1 zwx zwx 137488 2010-08-17 08:58 u-boot.bin

-rw-r--r-- 1 zwx zwx 147600 2010-08-17 08:58 u-boot.ldr

-rw-r--r-- 1 zwx zwx   1538 2010-08-17 08:58 u-boot.lds

-rw-r--r-- 1 zwx zwx 220642 2010-08-17 08:58 u-boot.map

-rwxr-xr-x 1 zwx zwx 412562 2010-08-17 08:58 u-boot.srec

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ ls init.elf -l

-rwxr-xr-x 1 zwx zwx 18193 2010-08-17 09:19 init.elf

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gdb u-boot

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gdb init.elf

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$

TranslateQuoteReplyEditDelete

 

 

2010-08-17 08:09:42     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92503   

 

i download Nightly Snapshots toolchain binrary, then it work ok

 

_bss_start and _bss_end is no symbol, how determine they value

 

 

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gdb ./u-boot

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-elf"...

(gdb) target remote : 2000

Remote debugging using : 2000

0xef000000 in ?? ()

(gdb) set remotetimeout 300

(gdb) load init.elf

Loading section .text, size 0x6d0 lma 0xffa00000

Start address 0xffa00000, load size 1744

Transfer rate: 174400 bits/sec, 1744 bytes/write.

(gdb) c

Continuing.

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xffa0000e in ?? ()

(gdb) load u-boot

Loading section .text.pre, size 0x1f8 lma 0x3f80000

Loading section .text.init, size 0x6c0 lma 0x3f801f8

Loading section .text, size 0x1570c lma 0x3f808b8

Loading section .rodata, size 0x9a84 lma 0x3f95fc4

Loading section .data, size 0x1964 lma 0x3f9fa48

Loading section .u_boot_cmd, size 0x55c lma 0x3fa13ac

Loading section .text_l1, size 0x8 lma 0x3fa1908

Start address 0x3f80000, load size 137488

Transfer rate: 738190 bits/sec, 9820 bytes/write.

(gdb) call memset(&_bss_start, 0, &_bss_end - &_bss_start)

No symbol "_bss_start" in current context.

(gdb)

 

 

 

 

*******************************************************************

 

zwx@zwx-laptop:/blackfin/svnbuild/bfin-elf/bin$ sudo ./bfin-gdbproxy bfin

 

Remote proxy for GDB, v0.7.2, Copyright (C) 1999 Quality Quorum Inc.

MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

Blackfin adaption Copyright (C) 2008 Analog Devices, Inc.

 

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details

use `--warranty' option. This is Open Source software. You are

welcome to redistribute it under certain conditions. Use the

'--copying' option for details.

 

Found USB cable: ICE-100B

ICE-100B Firmware Version is 2.0.0

IR length: 5

Chain length: 1

Device Id: 00010010011111101000000011001011 (0x127E80CB)

  Manufacturer: Analog Devices, Inc. (0x0CB)

  Part(0):      BF518 (0x27E8)

  Stepping:     1

  Filename:     ./../share/urjtag/analog/bf518/bf518

/usr/local/src/blackfin/git/toolchain/urjtag/src/bfin/bfin-part-bfin.c:154 bfin_wait_ready() Warning: untested cable or frequency, set wait_clocks to 21

warning:   bfin: no board selected, BF518 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy: waiting on TCP port 2000

notice:    bfin-gdbproxy: connected

info:      [0] core fault: DBGSTAT [0x4050]

info:      Resetting ...

info:      bfin: [0] EMUEXCPT instruction was executed: PC [0xFFA0000E] FP [0x00000000]

 

*****************************************************************

 

Welcome to minicom 2.4

 

OPTIONS: I18n

Compiled on Jan 25 2010, 06:49:09.

Port /dev/ttyUSB0

 

Press CTRL-A Z for help on special keys            

                                                   

ABacCabcdghijDabcdefgoEadFabcdeGabeHabcI>          

                                                   

                                                   

TranslateQuoteReplyEditDelete

 

 

2010-08-17 08:22:18     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92504   

 

those symbols dont exist in trunk.  _bss_vma and _bss_len cover that.

QuoteReplyEditDelete

 

 

2010-08-17 08:33:33     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92505   

 

i clean BSS then input "c", then arise " CORE FAULT core cannot read register"

 

 

 

(gdb) load u-boot

Loading section .text.pre, size 0x1f8 lma 0x3f80000

Loading section .text.init, size 0x6c0 lma 0x3f801f8

Loading section .text, size 0x1039c lma 0x3f808b8

Loading section .rodata, size 0x7d8c lma 0x3f90c54

Loading section .data, size 0x9dc lma 0x3f989e0

Loading section .u_boot_cmd, size 0x524 lma 0x3f993bc

Loading section .text_l1, size 0x8 lma 0x3f998e0

Start address 0x3f80000, load size 104680

Transfer rate: 1235162 bits/sec, 8723 bytes/write.

(gdb) call memset(_bss_vma, 0, _bss_len)

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xef000000 in ?? ()

The program being debugged was signaled while in a function called from GDB.

GDB remains in the frame where the signal was received.

To change this behavior use "set unwindonsignal on"

Evaluation of the expression containing the function (memset) will be abandoned.

(gdb) c

Continuing.

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xef000000 in ?? ()

 

 

 

 

*****************************************************

 

zwx@zwx-laptop:/blackfin/svnbuild/bfin-elf/bin$ sudo ./bfin-gdbproxy bfin

 

Remote proxy for GDB, v0.7.2, Copyright (C) 1999 Quality Quorum Inc.

MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

Blackfin adaption Copyright (C) 2008 Analog Devices, Inc.

 

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details

use `--warranty' option. This is Open Source software. You are

welcome to redistribute it under certain conditions. Use the

'--copying' option for details.

 

Found USB cable: ICE-100B

ICE-100B Firmware Version is 2.0.0

IR length: 5

Chain length: 1

Device Id: 00010010011111101000000011001011 (0x127E80CB)

  Manufacturer: Analog Devices, Inc. (0x0CB)

  Part(0):      BF518 (0x27E8)

  Stepping:     1

  Filename:     ./../share/urjtag/analog/bf518/bf518

/usr/local/src/blackfin/git/toolchain/urjtag/src/bfin/bfin-part-bfin.c:154 bfin_wait_ready() Warning: untested cable or frequency, set wait_clocks to 21

warning:   bfin: no board selected, BF518 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy: waiting on TCP port 2000

notice:    bfin-gdbproxy: connected

info:      [0] core fault: DBGSTAT [0x4050]

info:      Resetting ...

info:      bfin: [0] EMUEXCPT instruction was executed: PC [0xFFA0000E] FP [0xFFB00FFC]

info:      bfin: [0] a double fault has occured EMUPC [0xEF000000]

error:     bfin: [0] CORE FAULT core cannot read register [14]

error:     bfin: [0] CORE FAULT core cannot read register [0]

error:     bfin: [0] CORE FAULT core cannot read register [1]

error:     bfin: [0] CORE FAULT core cannot read register [2]

error:     bfin: [0] CORE FAULT core cannot read register [3]

error:     bfin: [0] CORE FAULT core cannot read register [4]

error:     bfin: [0] CORE FAULT core cannot read register [5]

error:     bfin: [0] CORE FAULT core cannot read register [6]

error:     bfin: [0] CORE FAULT core cannot read register [7]

error:     bfin: [0] CORE FAULT core cannot read register [8]

error:     bfin: [0] CORE FAULT core cannot read register [9]

error:     bfin: [0] CORE FAULT core cannot read register [10]

error:     bfin: [0] CORE FAULT core cannot read register [11]

error:     bfin: [0] CORE FAULT core cannot read register [12]

error:     bfin: [0] CORE FAULT core cannot read register [13]

error:     bfin: [0] CORE FAULT core cannot read register [15]

error:     bfin: [0] CORE FAULT core cannot read register [16]

error:     bfin: [0] CORE FAULT core cannot read register [17]

error:     bfin: [0] CORE FAULT core cannot read register [18]

error:     bfin: [0] CORE FAULT core cannot read register [19]

error:     bfin: [0] CORE FAULT core cannot read register [20]

error:     bfin: [0] CORE FAULT core cannot read register [21]

error:     bfin: [0] CORE FAULT core cannot read register [22]

error:     bfin: [0] CORE FAULT core cannot read register [23]

error:     bfin: [0] CORE FAULT core cannot read register [24]

error:     bfin: [0] CORE FAULT core cannot read register [25]

error:     bfin: [0] CORE FAULT core cannot read register [26]

error:     bfin: [0] CORE FAULT core cannot read register [27]

error:     bfin: [0] CORE FAULT core cannot read register [28]

error:     bfin: [0] CORE FAULT core cannot read register [29]

error:     bfin: [0] CORE FAULT core cannot read register [30]

error:     bfin: [0] CORE FAULT core cannot read register [31]

error:     bfin: [0] CORE FAULT core cannot read register [32]

error:     bfin: [0] CORE FAULT core cannot read register [33]

error:     bfin: [0] CORE FAULT core cannot read register [34]

error:     bfin: [0] CORE FAULT core cannot read register [35]

error:     bfin: [0] CORE FAULT core cannot read register [36]

error:     bfin: [0] CORE FAULT core cannot read register [37]

error:     bfin: [0] CORE FAULT core cannot read register [38]

error:     bfin: [0] CORE FAULT core cannot read register [39]

error:     bfin: [0] CORE FAULT core cannot read register [40]

error:     bfin: [0] CORE FAULT core cannot read register [41]

error:     bfin: [0] CORE FAULT core cannot read register [42]

error:     bfin: [0] CORE FAULT core cannot read register [43]

error:     bfin: [0] CORE FAULT core cannot read register [44]

error:     bfin: [0] CORE FAULT core cannot read register [45]

error:     bfin: [0] CORE FAULT core cannot read register [46]

error:     bfin: [0] CORE FAULT core cannot read register [47]

error:     bfin: [0] CORE FAULT core cannot read register [48]

error:     bfin: [0] CORE FAULT core cannot read register [49]

error:     bfin: [0] CORE FAULT core cannot read register [50]

error:     bfin: [0] CORE FAULT core cannot read register [51]

error:     bfin: [0] CORE FAULT core cannot read register [52]

error:     bfin: [0] CORE FAULT core cannot read register [54]

error:     bfin: [0] CORE FAULT core cannot read register [55]

error:     bfin: [0] CORE FAULT core cannot read register [56]

error:     bfin: [0] CORE FAULT core cannot read register [57]

error:     bfin: [0] CORE FAULT core cannot read register [58]

error:     bfin: [0] CORE FAULT core cannot read register [59]

error:     bfin: [0] CORE FAULT core cannot read register [60]

info:      bfin: [0] a double fault has occured EMUPC [0xEF000000]

error:     bfin: [0] CORE FAULT core cannot read register [14]

TranslateQuoteReplyEditDelete

 

 

2010-08-17 08:41:06     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92507   

 

you called memset incorrectly.  you need to use the address of the symbols just like the existing document shows.

QuoteReplyEditDelete

 

 

2010-08-17 08:42:02     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92508   

 

my custom board is ADSP-BF512 KSWZ-4 ... 0.1   and  u-boot   include/configs/zwbf512-v10.h Processor Settings is

 

/*

* Processor Settings

*/

#define CONFIG_BFIN_CPU             bf512-0.1

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER

TranslateQuoteReplyEditDelete

 

 

2010-08-17 08:53:29     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92510   

 

(gdb) load u-boot

Loading section .text.pre, size 0x1f8 lma 0x3f80000

Loading section .text.init, size 0x6c0 lma 0x3f801f8

Loading section .text, size 0x1039c lma 0x3f808b8

Loading section .rodata, size 0x7d8c lma 0x3f90c54

Loading section .data, size 0x9dc lma 0x3f989e0

Loading section .u_boot_cmd, size 0x524 lma 0x3f993bc

Loading section .text_l1, size 0x8 lma 0x3f998e0

Start address 0x3f80000, load size 104680

Transfer rate: 1053383 bits/sec, 8723 bytes/write.

(gdb) call memset(&_bss_vma, 0, &_bss_len)

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xef000000 in ?? ()

The program being debugged was signaled while in a function called from GDB.

GDB remains in the frame where the signal was received.

To change this behavior use "set unwindonsignal on"

Evaluation of the expression containing the function (memset) will be abandoned.

(gdb) c

Continuing.

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xef000000 in ?? ()

 

 

********************************************

 

info:      bfin: [0] a double fault has occured EMUPC [0xEF000000]

error:     bfin: [0] CORE FAULT core cannot read register [14]

error:     bfin: [0] CORE FAULT core cannot read register [0]

error:     bfin: [0] CORE FAULT core cannot read register [1]

error:     bfin: [0] CORE FAULT core cannot read register [2]

error:     bfin: [0] CORE FAULT core cannot read register [3]

error:     bfin: [0] CORE FAULT core cannot read register [4]

error:     bfin: [0] CORE FAULT core cannot read register [5]

error:     bfin: [0] CORE FAULT core cannot read register [6]

error:     bfin: [0] CORE FAULT core cannot read register [7]

error:     bfin: [0] CORE FAULT core cannot read register [8]

error:     bfin: [0] CORE FAULT core cannot read register [9]

error:     bfin: [0] CORE FAULT core cannot read register [10]

error:     bfin: [0] CORE FAULT core cannot read register [11]

error:     bfin: [0] CORE FAULT core cannot read register [12]

error:     bfin: [0] CORE FAULT core cannot read register [13]

error:     bfin: [0] CORE FAULT core cannot read register [15]

error:     bfin: [0] CORE FAULT core cannot read register [16]

error:     bfin: [0] CORE FAULT core cannot read register [17]

error:     bfin: [0] CORE FAULT core cannot read register [18]

error:     bfin: [0] CORE FAULT core cannot read register [19]

error:     bfin: [0] CORE FAULT core cannot read register [20]

error:     bfin: [0] CORE FAULT core cannot read register [21]

error:     bfin: [0] CORE FAULT core cannot read register [22]

error:     bfin: [0] CORE FAULT core cannot read register [23]

error:     bfin: [0] CORE FAULT core cannot read register [24]

error:     bfin: [0] CORE FAULT core cannot read register [25]

error:     bfin: [0] CORE FAULT core cannot read register [26]

error:     bfin: [0] CORE FAULT core cannot read register [27]

error:     bfin: [0] CORE FAULT core cannot read register [28]

error:     bfin: [0] CORE FAULT core cannot read register [29]

error:     bfin: [0] CORE FAULT core cannot read register [30]

error:     bfin: [0] CORE FAULT core cannot read register [31]

error:     bfin: [0] CORE FAULT core cannot read register [32]

error:     bfin: [0] CORE FAULT core cannot read register [33]

error:     bfin: [0] CORE FAULT core cannot read register [34]

error:     bfin: [0] CORE FAULT core cannot read register [35]

error:     bfin: [0] CORE FAULT core cannot read register [36]

error:     bfin: [0] CORE FAULT core cannot read register [37]

error:     bfin: [0] CORE FAULT core cannot read register [38]

error:     bfin: [0] CORE FAULT core cannot read register [39]

error:     bfin: [0] CORE FAULT core cannot read register [40]

error:     bfin: [0] CORE FAULT core cannot read register [41]

error:     bfin: [0] CORE FAULT core cannot read register [42]

error:     bfin: [0] CORE FAULT core cannot read register [43]

error:     bfin: [0] CORE FAULT core cannot read register [44]

error:     bfin: [0] CORE FAULT core cannot read register [45]

error:     bfin: [0] CORE FAULT core cannot read register [46]

error:     bfin: [0] CORE FAULT core cannot read register [47]

error:     bfin: [0] CORE FAULT core cannot read register [48]

error:     bfin: [0] CORE FAULT core cannot read register [49]

error:     bfin: [0] CORE FAULT core cannot read register [50]

error:     bfin: [0] CORE FAULT core cannot read register [51]

error:     bfin: [0] CORE FAULT core cannot read register [52]

error:     bfin: [0] CORE FAULT core cannot read register [54]

error:     bfin: [0] CORE FAULT core cannot read register [55]

error:     bfin: [0] CORE FAULT core cannot read register [56]

error:     bfin: [0] CORE FAULT core cannot read register [57]

error:     bfin: [0] CORE FAULT core cannot read register [58]

error:     bfin: [0] CORE FAULT core cannot read register [59]

error:     bfin: [0] CORE FAULT core cannot read register [60]

info:      bfin: [0] a double fault has occured EMUPC [0xEF000000]

error:     bfin: [0] CORE FAULT core cannot read register [14]

TranslateQuoteReplyEditDelete

 

 

2010-08-17 08:58:27     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92511   

 

and again, you need to verify your SDRAM (hardware and software) is sane.  having JTAG doesnt fix incorrect memory setup, it just makes verification easier.

QuoteReplyEditDelete

 

 

2010-08-18 01:48:26     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92529   

 

i change SDRAM, then

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gdb ./u-boot

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-elf"...

(gdb) target remote : 2000

Remote debugging using : 2000

0xef000000 in ?? ()

(gdb) load init.elf

Loading section .text, size 0x6d0 lma 0xffa00000

Start address 0xffa00000, load size 1744

Transfer rate: 172246 bits/sec, 1744 bytes/write.

(gdb) c

Continuing.

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xffa0000e in ?? ()

(gdb) load u-boot

Loading section .text.pre, size 0x1f8 lma 0x3f80000

Loading section .text.init, size 0x6c0 lma 0x3f801f8

Loading section .text, size 0x1039c lma 0x3f808b8

Loading section .rodata, size 0x7d8c lma 0x3f90c54

Loading section .data, size 0x9dc lma 0x3f989e0

Loading section .u_boot_cmd, size 0x524 lma 0x3f993bc

Loading section .text_l1, size 0x8 lma 0x3f998e0

Start address 0x3f80000, load size 104680

Transfer rate: 1290354 bits/sec, 8723 bytes/write.

(gdb) call memset(&_bss_vma, 0, &_bss_len)

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0x03f81ba6 in memset ()

The program being debugged was signaled while in a function called from GDB.

GDB remains in the frame where the signal was received.

To change this behavior use "set unwindonsignal on"

Evaluation of the expression containing the function (memset) will be abandoned.

(gdb) set unwindonsignal on

(gdb) c

Continuing.

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0x03f81ba8 in memset ()

(gdb)

 

 

*************************************************************

 

Found USB cable: ICE-100B

ICE-100B Firmware Version is 2.0.0

IR length: 5

Chain length: 1

Device Id: 00010010011111101000000011001011 (0x127E80CB)

  Manufacturer: Analog Devices, Inc. (0x0CB)

  Part(0):      BF518 (0x27E8)

  Stepping:     1

  Filename:     ./../share/urjtag/analog/bf518/bf518

/usr/local/src/blackfin/git/toolchain/urjtag/src/bfin/bfin-part-bfin.c:154 bfin_wait_ready() Warning: untested cable or frequency, set wait_clocks to 21

warning:   bfin: no board selected, BF518 is detected

notice:    bfin: jc: waiting on TCP port 2001

notice:    bfin-gdbproxy: waiting on TCP port 2000

notice:    bfin-gdbproxy: connected

info:      [0] core fault: DBGSTAT [0x400A]

info:      Resetting ...

info:      bfin: [0] EMUEXCPT instruction was executed: PC [0xFFA0000E] FP [0xFFB00FFC]

info:      bfin: [0] EMUEXCPT instruction was executed: PC [0x03F81BA6] FP [0xFFB00FFC]

info:      bfin: [0] EMUEXCPT instruction was executed: PC [0x03F81BA8] FP [0xFFB00FFC]

TranslateQuoteReplyEditDelete

 

 

2010-08-19 06:06:31     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92578   

 

After changed the SDRAM, which I tested OK in VDSP.

 

Then the output message changed as below....But still failed in some where. Please help to check.

 

-------------------------------------------

 

zwx@zwx-laptop:~/2010R1_ALPHA1/u-boot-2010.03$ bfin-elf-gdb ./u-boot

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-elf"...

(gdb) target remote : 2000

Remote debugging using : 2000

0x1faffd80 in ?? ()

(gdb) load init.elf

Loading section .text, size 0x6d0 lma 0xffa00000

Start address 0xffa00000, load size 1744

Transfer rate: 228721 bits/sec, 1744 bytes/write.

(gdb) c

Continuing.

 

Program received signal SIGTRAP, Trace/breakpoint trap.

0xffa0000e in ?? ()

(gdb) load u-boot

Loading section .text.pre, size 0x1f8 lma 0x3f80000

Loading section .text.init, size 0x6c0 lma 0x3f801f8

Loading section .text, size 0x1039c lma 0x3f808b8

Loading section .rodata, size 0x7d8c lma 0x3f90c54

Loading section .data, size 0x9dc lma 0x3f989e0

Loading section .u_boot_cmd, size 0x524 lma 0x3f993bc

Loading section .text_l1, size 0x8 lma 0x3f998e0

Start address 0x3f80000, load size 104680

Transfer rate: 1451369 bits/sec, 8723 bytes/write.

(gdb) c

Continuing.

^C

Program received signal SIGINT, Interrupt.

0x26ad1260 in ?? ()

(gdb) bt

#0  0x26ad1260 in ?? ()

#1  0xffa0000c in ?? ()

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

(gdb)

TranslateQuoteReplyEditDelete

 

 

2010-08-19 06:12:20     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92579   

 

One thing needs to be added:

 

I had tried with BF518 ezkit lite with the same files and the same way, it works fine.

 

The different between my board based on BF512 and the BF518 ezkit lite is that there is no NOR FLASH in my board. The others like SDRAM, SPI FLASH is the same.

 

Is there anything I need to note according to the difference?   Thanks!

TranslateQuoteReplyEditDelete

 

 

2010-08-19 06:45:25     Re: bf512 uboot on custom board not booting [fails in start.S]

Aaron Wu (CHINA)

Message: 92581   

 

From your description, the issue looks highly dependent on the hardware condition in your customer board, same config works well on the ezkit while does not work on yours, also it's in a kind of partially-working situation, guess you may need to check the DRAM signal quality.

QuoteReplyEditDelete

 

 

2010-08-19 12:37:55     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92591   

 

you need to start single stepping through things to find out where it went wrong

 

QuoteReplyEditDelete

 

 

2010-08-19 14:58:15     Re: bf512 uboot on custom board not booting [fails in start.S]

Wojtek Skulski (UNITED STATES)

Message: 92596   

 

Weixin:

 

since your situation looks serious, let me try to suggest one (almost) universal piece of advice which often helps. Slow down your clocks. There is no need to run things at full speed while there are problems. Your SCLK seems rather low (80 MHz) which is good, but try to drop it to something like 50 MHz. You may need to adjust the SDRAM refresh and other timing, though it seems to me that U-Boot is smart enough to do it for you when you change the clock in board.h. You need to make sure the SDRAM timing is correct in any case because SDRAM is where you seem to have problems. If your board works with VDSP, then SDRAM timing is a possible problem spot. You need to look at it.

 

Also slow down the CCLK to 100 MHz or so. This may help. I am not saying that it will. But if it helps then you will be able to ramp up the clock later.

 

Did you include serial resistors on your board in data/address? If you did not then there might be ringing. Blackfin chips do not have serial resistors built-in, as far as I know. The board designer needs to add these external to the chip.

 

It is a bit confusing to me that you talk of BF512 and BF518 at the same time, but maybe it is OK. I am not familiar with these new Blackfin chips.

QuoteReplyEditDelete

 

 

2010-08-19 23:43:51     Re: bf512 uboot on custom board not booting [fails in start.S]

Sonic Zhang (CHINA)

Message: 92598   

Where do you get the init.elf from? I can't find it under u-boot folder after building.

 

Please run bt immediately in SIGTRAP after your first c command.

 

 

Correct steps should be:

 

# bfin-elf-gdb u-boot

(gdb) tar re :2000

(gdb) load u-boot

(gdb) c

(gdb) bt

QuoteReplyEditDelete

 

 

2010-08-20 01:10:20     Re: bf512 uboot on custom board not booting [fails in start.S]

Mike Frysinger (UNITED STATES)

Message: 92599   

 

the init.elf is documented in the wiki.  it comes from init.S in u-boot + initcode.o.

 

i dont think backtrace will be useful.  the crash shows that it is off in invalid memory.

QuoteReplyEditDelete

 

 

2010-08-23 21:43:17     Re: bf512 uboot on custom board not booting [fails in start.S]

weixin zhan (CHINA)

Message: 92698   

 

thanks everyone! my problem have solved!

 

我通过VDSP的内存工具,对某个字节的值进行变更,发现在0x800000至0xFFFFFF之间发生异常,一方面写入的值不正确,另一方面会造成其它地址的值也发生变化,通过分析初步定位在SDRAM的A12引脚工作异常,然后对该脚的导通性进行检测,发现该脚存在虚焊现象,然后问题解决。

 

    另外值得注意的是,由于该板DSP的数据总线和地址总线与SDRAM之间直接连接,阻抗设计存在缺陷,上面的原因也有可能是由于这个原因引起。

 

    再次感谢各位的大力支持和协助

TranslateQuoteReplyEditDelete

 

 

2010-10-19 00:04:52     Re: bf512 uboot on custom board not booting [fails in start.S]

Taylor Braun-Jones (UNITED STATES)

Message: 94686   

 

weixin,

 

Do you mind explaining what your problem was? I'm having a similar problem bringing up a first-fabrication prototype of a new board (so, yes, there are all kinds of variables at this stage)

 

Thanks,

 

Taylor

Attachments

    Outcomes