2009-10-27 02:29:06     Can't write the files to the flash!

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

2009-10-27 02:29:06     Can't write the files to the flash!

zhang zhihua (CHINA)

Message: 81733   

 

I write files to the flash like this,but I find I can't write anything into the flash,I don't know how to correct it  :

 

"bfin> protect off all

Un-Protect Flash Bank # 1

bfin> tftp 00000000 uImage

Using Blackfin EMAC device

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'uImage'.

Load address: 0x0

Loading: #################################################################

         #################################################################

         ##########################

done

Bytes transferred = 2281219 (22cf03 hex)

 

bfin> erase 0x20100000 0x203fffff

 

................................................ done

Erased 48 sectors

 

bfin> cp.b 20100000 00000000

Usage:

cp      - memory copy

 

bfin> cp.b 20100000 00000000 22cf03

bfin> md 20100000

20100000: ffffffff ffffffff ffffffff ffffffff    ................

20100010: ffffffff ffffffff ffffffff ffffffff    ................

20100020: ffffffff ffffffff ffffffff ffffffff    ................

20100030: ffffffff ffffffff ffffffff ffffffff    ................

20100040: ffffffff ffffffff ffffffff ffffffff    ................

20100050: ffffffff ffffffff ffffffff ffffffff    ................

20100060: ffffffff ffffffff ffffffff ffffffff    ................"

 

Thank you!

TranslateQuoteReplyEditDelete

 

 

2009-10-27 02:51:27     Re: Can't write the files to the flash!

Yi Li (CHINA)

Message: 81734   

 

> cp.b 20100000 00000000 22cf03

 

The source and target is not correct.

 

bfin> help cp.b

cp [.b, .w, .l] source target count

    - copy memory

 

BTW, I think "tftp 00000000 uImage" may overwrite data in 0x0 (u-boot ?).

 

-Yi

QuoteReplyEditDelete

 

 

2009-10-27 02:57:34     Re: Can't write the files to the flash!

Mike Frysinger (UNITED STATES)

Message: 81735   

 

u-boot is at the top of memory, not bottom

QuoteReplyEditDelete

 

 

2009-10-27 03:41:54     Re: Can't write the files to the flash!

zhang zhihua (CHINA)

Message: 81770   

 

thank you!

 

the right one is:cp.b  00000000 20100000  22cf03

 

but I have a new  problem:where is the start address of the uImage in the flash?the '20100000'is wrong!

TranslateQuoteReplyEditDelete

 

 

2009-10-27 03:49:42     Re: Can't write the files to the flash!

Mike Frysinger (UNITED STATES)

Message: 81771   

 

it's wherever you wrote it

QuoteReplyEditDelete

 

 

2009-10-27 04:25:43     Re: Can't write the files to the flash!

zhang zhihua (CHINA)

Message: 81772   

 

but it seems that the start address was defined in the U-boot?

 

otherwise the U-boot can't find it...

TranslateQuoteReplyEditDelete

 

 

2009-10-27 04:45:22     Re: Can't write the files to the flash!

Mike Frysinger (UNITED STATES)

Message: 81773   

 

i really have no idea what you're talking about.  there is no hardcoded addresses in u-boot.  everything is in the environment.  so change the environment to suite your needs.

 

if you're still having a problem, show actual u-boot output and indicate what the problem is with it.

QuoteReplyEditDelete

 

 

2009-10-27 06:48:39     Re: Can't write the files to the flash!

zhang zhihua (CHINA)

Message: 81778   

 

sorry!

 

for example:if I want to load the file 'uImage' to the flash,I will use the instruction :

 

>/cp [.b, .w, .l] source target count

 

the source is :0000 0000

 

but what is  the 'target'?how to make sure which is the accurate (from 0x2000 0000 to 0x203fffff)?

TranslateQuoteReplyEditDelete

 

 

2009-10-27 07:14:50     Re: Can't write the files to the flash!

Mike Frysinger (UNITED STATES)

Message: 81781   

 

you pick the target address as whatever you want.  there are no requirements with the flash address ranges other than u-boot is in the first few sectors.

QuoteReplyEditDelete

 

 

2009-10-27 07:19:41     Re: Can't write the files to the flash!

zhang zhihua (CHINA)

Message: 81782   

 

Thank you!

 

Let me try it on again!

Attachments

    Outcomes