2008-08-26 12:43:12     load u-boot via UART1 in empty BF527-ezkit

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

2008-08-26 12:43:12     load u-boot via UART1 in empty BF527-ezkit

Alexander Deurloo (NETHERLANDS)

Message: 61115   

 

Hello dear experts,

 

I can't get a blank BF527 to boot via UART:

Here's my situation: Ubuntu 8.04, blackfin/uclinux/toolchain of 2008(latest of the site)

I have a BF527-ezkit without u-boot in memory. I want to load the default loader from the site via UART1, after which I can put an image in flash. (I did this successfully before on an other system (BF537, Ubuntu 7.10, toolchain of 2007))

 

The bfin-elf-ldr shows good behaviour, no errors, see the screen dump below:

 

laptop:~$ bfin-elf-ldr -v -l u-boot-bf527-ezkit-uart-2008R1.5.ldr /dev/ttyUSB0

Loading LDR u-boot-bf527-ezkit-uart-2008R1.5.ldr ... auto detected LDR as 'BF548' compatible format

OK!

Opening /dev/ttyUSB0 ... OK!

Configuring terminal I/O ... [getattr] [setattr] [speed:115200] OK!

Trying to send autobaud ... OK!

Trying to read autobaud ... OK!

Checking autobaud ... OK!

Autobaud result: 115200bps 29.491mhz (header:0xBF DLL:0x10 DLH:0x00 fin:0x00)

Sending blocks of DXE 1 ... [16:0 bytes] [16:232 bytes] [16:12 bytes] [16:32768 bytes] [16:32768 bytes] [16:32768 bytes] [16:30420 bytes] [16:40 bytes] [16:26364 bytes] [9/10] ([16:0 bytes] OK!          

You may want to run minicom or kermit now

Quick tip: run 'ldr <ldr> <tty> && minicom'

 

I think this tells me that the BF527 receives the loader via the BOOT-ROM. Thus, the hardware settings of the ezkit should be fine.

 

But when I start minicom, the screen remains empty, no input from the board. As where one expects a u-boot prompt. Hitting enter, ctrl-C, changing baudrate : no results.

 

I went through every possible document in the wiki of the site, forums, you name it. The only thing I found was that others discover the same problem. The help that was given was mostly trivial, but doesn't solve my problem. I went through the help over and over again. Nothing that helps me.

 

Or I forgot something, don't understand things or I am blind for something silly. But I've got the feeling that the newest distribution or the default loader can be blamed. (which I only dare to wisper ;-)  )

 

Can you give me a hint what to do or check?

 

Thank you very much in advance,

Alex.

 

QuoteReplyEditDelete

 

 

2008-08-26 13:22:03     Re: load u-boot via UART1 in empty BF527-ezkit

Mike Frysinger (UNITED STATES)

Message: 61116   

 

your analysis looks largely correct and from a high level, it looks like it should work.  you are using the 2008R1.5 toolchain right ?  annoyingly, it may be something lame like bad usb serial driver / hardware.

 

could you try building a snapshot of ldr-utils ?  for example, grab this tarball, type `make`, and then run the `./ldr` binary instead of `bfin-elf-ldr`:

http://blackfin.uclinux.org/git/?p=readonly-mirrors/toolchain.git;a=snapshot;h=298fa495b9ba84d668539fd9e1481902ea70e536;sf=tgz

QuoteReplyEditDelete

 

 

2008-08-26 14:55:12     Re: load u-boot via UART1 in empty BF527-ezkit

Alexander Deurloo (NETHERLANDS)

Message: 61121   

 

Hello Mike,

 

Whow, that's what they call turbo reply, thanks!

 

- Yes, I'm using the newest, 2008 r1.5.

- The USB/serial device looks fine as far as I can trace. Because when I connect a BF537-ezkit with a u-boot image in flash (made on my previous system), I can use minicom to play with it. Except the bootloader...I can't load and run another one. (Of course I stick to the ones on the site for now. By the way, my own built loaders have the same result). But there's one difference between the BF537-ezkit with u-boot in flash and the empty BF527-ezkit: After the ldr, the BF537 replies lots of characters and within minicom it remains empty until I hit enter : the u-boot in flash pops up. (feels like:YES!!, until you figure out it's the one running from flash...). Reduced screen dump after ldr:

 

[board said: f�~`� ]

[board said: �~ f� ]

[board said: �� �x����

OK!

 

- I downloaded your tarball, did make and used the ldr. Screen dump :

 

 

laptop:~/projects/toolchain$ ./ldr /tftpboot/u-boot-bf527-ezkit-uart-2008R1.5.ldr /dev/ttyUSB1

Loading LDR /tftpboot/u-boot-bf527-ezkit-uart-2008R1.5.ldr ... OK!

Opening /dev/ttyUSB1 ... OK!

Configuring terminal I/O ... OK!

Trying to send autobaud ... OK!

Trying to read autobaud ... OK!

Checking autobaud ... OK!

Autobaud result: 115200bps 29.491mhz (header:0xBF DLL:0x10 DLH:0x00 fin:0x00)

Sending blocks of DXE 1 ... OK!          

You may want to run minicom or kermit now

Quick tip: run 'ldr <ldr> <tty> && minicom'

 

Looks the same. But also the same effect :-(  minicom consule remains empty.....

 

Any other tips, please? Is there a way to figure out what the blackfin is doing anything after the ldr? They're not designed to do nothing...

 

Any help would be appriciated,

Alex.

 

(Tomorrow I'll try to nick the laptop from my collegue with Ubuntu 7.10 on it. Other hardware, other software...how knows...I have no plans to give up yet!)

 

QuoteReplyEditDelete

 

 

2008-08-26 15:33:54     Re: load u-boot via UART1 in empty BF527-ezkit

Mike Frysinger (UNITED STATES)

Message: 61123   

 

the BF527-EZKIT should do exactly the same as the BF537-STAMP/EZKIT when loading over the UART.  if you're able to boot a BF537-EZKIT with the same exact setup, then that indicates your host tools are all OK.

 

you might want to try checking all of your fun switch settings with the recommended defaults here:

http://docs.blackfin.uclinux.org/doku.php?id=hw:boards:bf527-ezkit

 

failing that, the next step may be to enable early debugging support in the source code and build a new ldr yourself so you can hopefully see where things crash ... or hook up jtag and see if that shows anything useful

QuoteReplyEditDelete

 

 

2008-08-27 05:29:42     Re: load u-boot via UART1 in empty BF527-ezkit

Alexander Deurloo (NETHERLANDS)

Message: 61169   

 

Hello,

 

I think my previous message wasn't clear. Ok, I am able to boot the BF537-ezkit, but only with the u-boot which is already in flash. I do NOT succeed to put the newest u-boot-bf537-uart-2008r.15.ldr in the bf537-ezkit. NOR the newest u-boot-bf527-uart-2008r.15.ldr in the bf527-ezkit.

 

I managed to use another laptop and recovered the old 2007 distribution (which doesn't support the BF527). I am able to load an old file u-boot_stamp537_uart_boot.ldr into the BF537-ezkit. Works fine in RAM and the u-boot in flash is not used. I tried the newest u-boot-bf537-uart-2008r.15.ldr, but it doesn't work, which make sense due to the new format. So, distro 2007 with old .ldr file : ok.

Then I copied the old u-boot_stamp537_uart_boot.ldr to the other laptop (with distro 2008) and did exactly the same thing as before, used the same bfin-elf-ldr, the same USB/serial device, the same BF537-ezkit, but with the old uart_boot.ldr. Result:

 

 

laptop:~$ bfin-elf-ldr -v -l /media/PHILIPS\ UFD/u-boot_stamp537_uart_boot.ldr /dev/ttyUSB0

Loading LDR /media/PHILIPS UFD/u-boot_stamp537_uart_boot.ldr ... auto detected LDR as 'BF537' compatible format

OK!

Opening /dev/ttyUSB0 ... OK!

Configuring terminal I/O ... [getattr] [setattr] [speed:115200] OK!

Trying to send autobaud ... OK!

Trying to read autobaud ... OK!

Checking autobaud ... OK!

Autobaud result: 115200bps 49.766mhz (header:0xBF DLL:0x1B DLH:0x00 fin:0x00)

Sending blocks of DXE 1 ... [10:4 bytes] [10:152 bytes] [10:4 bytes] [10:12 bytes] [10:32768 bytes] [10:32768 bytes] [10:32768 bytes] [10:29276 bytes] [8/8] (100%)[board said: �� ��ž°]

[␉⎺▒⎼␍ ⎽▒␋␍: Î憞 àž°]

[␉⎺▒⎼␍ ⎽▒␋␍: ΀˜€°°ž ]

(goes on for another 40 lines or so...)

[␉⎺▒⎼␍ ⎽▒␋␍: ◆æž æžþž◆†·]

[␉⎺▒⎼␍ ⎽▒␋␍: ]

OK!

 

You can see that the terminal goes noodle-doodle, but after starting minicom -o, I see the u-boot prompt that belongs to the old .ldr file. For sure! It is not the one from flash!

So, the only difference is: the old .ldr in stead of the new .ldr from the site.

I dare to stop wispering and say (no loud yet) : the newest .ldr's doesn't work properly. Or the newest bfin-xx-ldr don't function as supposed.

 

I don't have a JTAG to connect. Ok, I'll try to enable early debugging. But as I said before : I'm not the only one how suffers on this issue. We can't expect all users to go this far, can we?

 

If you or anyone else have more suggestions, please post them. My final goal is a custom BF527 board, so I HAVE to use the newest distribution/toolchain and solve this issue.

 

Best regards,

Alex.

 

QuoteReplyEditDelete

 

 

2008-08-27 16:25:24     Re: load u-boot via UART1 in empty BF527-ezkit

Mike Frysinger (UNITED STATES)

Message: 61195   

 

every file posted to the website is known to work -- ive tested each one on my own boards

 

the output from the ldr utility looks like "garbage" because the ldr utility is operating the serial console at 115200 baud but u-boot is operating at 57600 ...

QuoteReplyEditDelete

 

 

2008-08-28 11:09:41     Re: load u-boot via UART1 in empty BF527-ezkit

Phil Wilshire (UNITED STATES)

Message: 61266   

 

HI All,

 

Had a call from Alexander requesting help

 

I have just tested this on one of my systems.

 

This is an old Suse 10 system with usb serial ports

 

First, I did have to set the right boot mode  BFIN_UART_BOOT in the bf537-stamp.h file

 

I also had to download and build the toolchain extract Mike provided in this url

 

http://blackfin.uclinux.org/git/?p=readonly-mirrors/toolchain.git;a=snapshot;h=298fa495b9ba84d668539fd9e1481902ea70e536;sf=tgz

 

All other attempts and combinations failed,

 

The combination of the new toolchain ldr and the config file change did the trick.

 

To test the system I have put some flashing leds into the initdram code.

 

This allows be to see the new code start and allows me to isolate any serial port problems.

 

Prevoiusly, I have had some serial port problems with the way ldr sets and resets serial attributes.

 

The serial port seemed to get broken and then stay broken until a reboot.

 

Most of the problems seem to be on RHCE systems but my suse system did break at one time.

 

At times I have even disabled the code setting the new attributes in the ldr tool.

 

I am not able to test this latest combination on a RHCE system just yet.

 

Alexander..

 

Reboot your system and try the new toolchain code.

 

 

 

  regards

 

    Phil WIlshire

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2008-08-28 17:43:19     Re: load u-boot via UART1 in empty BF527-ezkit

Mike Frysinger (UNITED STATES)

Message: 61281   

 

i just tested a BF537-EZKIT with the 2008R1.5 and current trunk ldr-utils, and with 2008R1.5 and current trunk u-boot.  both loaded for me.  but i'm using my serial port on my motherboard.  in the past, ive seen crappy USB<->serial dongles cause problems, but those problems were in the serial driver/hardware.  i have one that drops like 50% of the chars when running at 115200 baud, but hardly drops any at all when running at 38400 baud ... and i'm referring to use as a serial console, no ldr/bootrom involved at all.

QuoteReplyEditDelete

 

 

2008-09-01 08:24:27     Tav: Re: load u-boot via UART1 in empty BF527-ezkit

Alexander Deurloo (NETHERLANDS)

Message: 61475   

 

Mike,

 

Phil helped me to start the BF537-ezkit by giving hints and code.

Now I can build a loader file with the toolchain, I'm in and can do anything with the 537-board.

 

The file from the site for the BF527-ezkit doesn't work for me. And when I build one myself (I modified and did the same things as for the BF537-ezkit) I can't manage to get the thing working. I have two 527-boards and both remain silence. Of course I checked the jumper/switch settings.

 

You pointed out to check the serial connection. But when my serial path works for the BF537-ezkit, it should be ok for the BF527-ezkit as well I think. Swapping dongles didn't give better results.

 

Since I have to modify u-boot for my project anyway, I have to study it in depth. Besides my question for tips to get the ezkit working, I have two other ones:

- Is there in depth documentation available for u-boot, such as flow charts or diagrams?

- How can I enable the early serial debugging? Is that a make command or do I have to add/edit some header file?

Both items can probably bring me closer to the solution.

 

Thanks in advance,

Alex.

 

 

QuoteReplyEditDelete

 

 

2008-10-16 05:43:10     Re: Tav: Re: load u-boot via UART1 in empty BF527-ezkit

Alexander Deurloo (NETHERLANDS)

Message: 63777   

 

Finally, it works!!   I have contact with the BF527-ezkit via the uart bootloader.

 

I bought a USB-to-serial dongle from FTDI chip, type FT-US232R-100, which has a FT232RL bridge inside.

This one has a transfer rate up to 1M baud.

 

So far I used several dongles with a PL2303 build-in, from several vendors. They work great for the BF537-ezkit, but not for the BF527-ezkit.

 

So Mike was right : it must be something with the serial connection.

The toolchain is fine, the files on the site are fine. Thanks for the help. (and my excuse I started this topic on the uclinux )

 

Maybe it is a good idea to add a simple test to the loader to verify if the serial connection is capable of transfering lots of data at high speed, so the user gets a clear message the connection is there and works, but uncapable of handling 115200 baud rate.

 

Thanks again.

Attachments

    Outcomes