Skip to contentSkip to conversation

sam9263ek not booting uboot dataflash

U-Boot-Users E Robertson 4 participants 26 messages Feb 12, 2008 – Feb 13, 2008 5 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi All,
I made some changes to u-boot-1.1.5 atmel patch 1.5 and rebuild uboot. However, after rebuilding it would not run uboot.
Has anyone had this problem before?
If I rewrite the dataflash with the pre-built uboot image, then it boots so I guess I might be missing something. DataFlash is enabled and all the options looks good so I'm not sure why it's stuct at the RomBoot. I've rebuild both the dataflash bootstrap and uboot several time with no luck so far. Does anyone have any ideas? Thanks.

#1 lore raw

Hi,

Quoted 5 lines

Hi All,
I made some changes to u-boot-1.1.5 atmel patch 1.5 and rebuild uboot. However, after rebuilding it would not run uboot.
Has anyone had this problem before?

What type of changes?

Quoted 7 lines

If I rewrite the dataflash with the pre-built uboot image, then it boots so I guess I might be missing something. DataFlash is enabled and all the options looks good so I'm not sure why it's stuct at the RomBoot. I've rebuild both the dataflash bootstrap and uboot several time with no luck so far. Does anyone have any ideas? Thanks.

Michael

#2 lore raw
Quoted 7 lines · michael

Hi,

Quoted 5 lines

Hi All,
I made some changes to u-boot-1.1.5 atmel patch 1.5 and rebuild uboot. However, after rebuilding it would not run uboot.
Has anyone had this problem before?

What type of changes?

Makefile and config.mk files for my compiler. That's about it. Oh, I also edited the display properties for my display.

Quoted 9 lines
Quoted 7 lines

If I rewrite the dataflash with the pre-built uboot image, then it boots so I guess I might be missing something. DataFlash is enabled and all the options looks good so I'm not sure why it's stuct at the RomBoot. I've rebuild both the dataflash bootstrap and uboot several time with no luck so far. Does anyone have any ideas? Thanks.

Michael

#3 lore raw
Quoted 10 lines · E Robertson
Quoted 8 lines · michael

Hi,

Quoted 6 lines

Hi All,
I made some changes to u-boot-1.1.5 atmel patch 1.5 and rebuild uboot. However, after rebuilding it would not run uboot.
Has anyone had this problem before?

Quoted 9 lines
Quoted 2 lines

What type of changes?

Makefile and config.mk files for my compiler. That's about it. Oh, I also edited the display properties for my display.

So, do you change the text base?
Michael

#4 lore raw
Quoted 14 lines · michael
Quoted 13 lines · E Robertson
Quoted 10 lines · michael

Hi,

Quoted 6 lines

Hi All,
I made some changes to u-boot-1.1.5 atmel patch 1.5 and rebuild uboot. However, after rebuilding it would not run uboot.
Has anyone had this problem before?

What type of changes?

Quoted 7 lines
Quoted 6 lines

Makefile and config.mk files for my compiler. That's about it. Oh, I also edited the display properties for my display.

So, do you change the text base?

No I did not. I don't have a reason to. Why?

#5 lore raw

Hi,

Quoted 6 lines
Quoted 2 lines

So, do you change the text base?

No I did not. I don't have a reason to. Why?

Sorry I think that you talk about config.mk
board/<your board>/config.mk

TEXT_BASE = 0x21f00000

#6 lore raw
Quoted 4 lines · michael

Hi,

Quoted 3 lines
Quoted 2 lines

So, do you change the text base?

Quoted 8 lines
Quoted 3 lines

No I did not. I don't have a reason to. Why?

Sorry I think that you talk about config.mk
board/<your board>/config.mk

TEXT_BASE = 0x21f00000

On the 9263 it is 0x23F00000 and I believe I checked the bootstrap to correspond to the same address. So, no not that config.mk file. Thanks anyway.

#7 lore raw

Hi,

Quoted 9 lines · E Robertson
Quoted 7 lines · michael

Hi,

Quoted 5 lines
Quoted 3 lines

So, do you change the text base?

No I did not. I don't have a reason to. Why?

Is the new size compatible with the armboot? Do you skip LOW_LEVEL_INIT?

Regards Michael

#8 lore raw
Quoted 4 lines · michael

Hi,

Quoted 2 lines · E Robertson

On 2/12/08, michael <[email protected]> wrote:

Quoted 8 lines
Quoted 7 lines
Quoted 7 lines

Hi,

Quoted 5 lines
Quoted 3 lines

So, do you change the text base?

No I did not. I don't have a reason to. Why?

Is the new size compatible with the armboot? Do you skip LOW_LEVEL_INIT?

Yes, it is skipped. From what I understood Bootstrap does the necessary boot init tasks (althought I would rather put it in uboot). Do I need to changs this?

#9 lore raw

Hi,

Quoted 5 lines

Yes, it is skipped. From what I understood Bootstrap does the necessary boot init tasks (althought I would rather put it in uboot). Do I need to changs this?

No,

I will try to help you. Do you check the new size, format, etc... The new size fit in
you flash, do you write somenthing after the u-boot that overwrite it. Do you try to
load with a jtag in memory and execute it?

Regards Michael

#10 lore raw
Quoted 11 lines · michael

Hi,

Quoted 5 lines

Yes, it is skipped. From what I understood Bootstrap does the necessary boot init tasks (althought I would rather put it in uboot). Do I need to changs this?

No,

I will try to help you. Do you check the new size, format, etc... The new size fit in
you flash, do you write somenthing after the u-boot that overwrite it.

When you said new size, I take to mean the size of the binary images. In that case boot the Bootstrap and uboot image size are smaller that the prebuilt onces.
Bootstrap is written @ 0 and uboot @ 0x8000 (a 32K size). Bootstrap is under 4K and uboot is under 185K. so I have lots of space. The fact that I can rewrite my build uboot with the prebuilt uboot image and this works ok leads me to believe their might be something with the build that may be compiler related, but I'm not sure. Or, it's something simple I'm missing.

I write my Bootstrap build @ 0 so that the only variable change is u-boot image.

Quoted 2 lines

Do you try to
load with a jtag in memory and execute it?

I don't have a jtag fitted for this as yet. I'm using the sam7 util.

#11 lore raw

Hi,

Quoted 8 lines
Quoted 4 lines

Do you try to
load with a jtag in memory and execute it?

I don't have a jtag fitted for this as yet. I'm using the sam7 util.

Simple step:
- flash the work system
- loady <address>
put you version of u-boot and run go <address>

Regards Michael

#12 lore raw
Quoted 6 lines · michael

Hi,

Quoted 5 lines
Quoted 4 lines

Do you try to
load with a jtag in memory and execute it?

Quoted 7 lines
Quoted 3 lines

I don't have a jtag fitted for this as yet. I'm using the sam7 util.

Simple step:
- flash the work system
- loady <address>
put you version of u-boot and run go <address>

Once I start using sam7 util, the bootstrap code has not been executed which means the SDRAM has not been initialized. I'll have to added the lowlevel init to do that, which I might try if nothing else works.

#13 lore raw
Quoted 18 lines · E Robertson
Quoted 6 lines · michael

Hi,

Quoted 4 lines
Quoted 4 lines

Do you try to
load with a jtag in memory and execute it?

Quoted 9 lines
Quoted 4 lines

I don't have a jtag fitted for this as yet. I'm using the sam7 util.

Simple step:
- flash the work system
- loady <address>
put you version of u-boot and run go <address>

Quoted 5 lines

Once I start using sam7 util, the bootstrap code has not been executed which means the SDRAM has not been initialized. I'll have to added the lowlevel init to do that, which I might try if nothing else works.

You don't understand:

- flash all arm9load & u-boot
- loady <address> u-boot-mod
- go <address>

Regards Michael

#14 lore raw
Quoted 24 lines · michael
Quoted 18 lines · E Robertson
Quoted 6 lines · michael

Hi,

Quoted 4 lines
Quoted 4 lines

Do you try to
load with a jtag in memory and execute it?

Quoted 9 lines
Quoted 4 lines

I don't have a jtag fitted for this as yet. I'm using the sam7 util.

Simple step:
- flash the work system
- loady <address>
put you version of u-boot and run go <address>

Quoted 5 lines

Once I start using sam7 util, the bootstrap code has not been executed which means the SDRAM has not been initialized. I'll have to added the lowlevel init to do that, which I might try if nothing else works.

Quoted 5 lines

You don't understand:

- flash all arm9load & u-boot
- loady <address> u-boot-mod
- go <address>

I'm tying this method. I had to go to kermit because I never had suscess loading serially with minicom. I had problems with kermit in the past but couldn't remember what it was... until now. I've always had fatal errors after a few bytes are transmitted. I get some error, then it tries to resend but had too many errors. I'm not really sure how to get past this as I'm configured the serial line accordingly. Is this a common "user error" problem with ckermit? I've double checked my config option with uboot docs.

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#19 lore raw
Quoted 32 lines · E Robertson
Quoted 26 lines · michael

Hi,

Quoted 10 lines

That's exactly what I have but I always get this after about 24% :

*************************
SEND-class command failed.
Packets sent: 69
Retransmissions: 11
Timeouts: 12
Damaged packets: 0
Fatal Kermit Protocol Error: Too many retries

Quoted 14 lines

HINTS... If the preceding error message does not explain the failure:
. Try changing the remote Kermit's FLOW-CONTROL setting. . Try it again with SET STREAMING OFF.
. Try it again with SET PARITY SPACE.
. As a last resort, give a ROBUST command and try again.
Also:
. Be sure the source file has read permission.
. Be sure the target directory has write permission.
(Use SET HINTS OFF to suppress hints.)
*************************
~

Quoted 3 lines

The system is up? Do you have the u-boot console again? Do you choose a good memory address for starting download?

Quoted 9 lines

That was the problem. I choose a new address and it downloaded ok. However, it seems that my initial conclusion was correct in that it's the u-boot build. It hangs when I ran the new image. The old "working image" at least ran. It looks like I need to do some work on the boot process in uboot.

Thanks much for your help.

Can you send me your diff?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#21 lore raw

Ok

Quoted 6 lines · E Robertson
Quoted 2 lines

Can you send me your diff?

The diff I'm using is attached.
Thanks.

I'm talking about your adding code. Don't use the mailing list for send code.

Regards Michael

#22 lore raw

Oops. It bounce back anyway.

Quoted 14 lines · michael

Ok

Quoted 6 lines · E Robertson
Quoted 2 lines

Can you send me your diff?

The diff I'm using is attached.
Thanks.

I'm talking about your adding code. Don't use the mailing list for send code.

Regards Michael

#23 lore raw
In reply to michael
Quoted 10 lines · michael

Ok

Quoted 6 lines · E Robertson
Quoted 2 lines

Can you send me your diff?

The diff I'm using is attached.
Thanks.

I'm talking about your adding code. Don't use the mailing list for send code.

I've narrowed down the problem to the compiler. I have several gcc3.4 and gcc4.1 based compilers and the gcc3.4 compiled u-boot binary worked. I've been using the arm-gcc4.1-uclibc20061004 compiler with always breaks because "uses hardware FP" whereas u-boot "uses software FP". I've used arm-gcc3.4-uclibc0.9.28 compiler to build u-boot 1.2.0 which worked.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080213/8795d05b/attachment.pgp

#24 lore raw
In reply to E Robertson
Quoted 12 lines
Quoted 11 lines
Quoted 6 lines

Once I start using sam7 util, the bootstrap code has not been executed which means the SDRAM has not been initialized. I'll have to added the lowlevel init to do that, which I might try if nothing else works.

You don't understand:

- flash all arm9load & u-boot
- loady <address> u-boot-mod
- go <address>

Quoted 9 lines

I'm tying this method. I had to go to kermit because I never had suscess loading serially with minicom. I had problems with kermit in the past but couldn't remember what it was... until now. I've always had fatal errors after a few bytes are transmitted. I get some error, then it tries to resend but had too many errors. I'm not really sure how to get past this as I'm configured the serial line accordingly. Is this a common "user error" problem with ckermit? I've double checked my config option with uboot docs.

I have used "minicom" a lot when downloading to the AT91RM9200, but I use the special downloading program which I found somewhere and included in the U-Boot-1.1.2 found on buildroot.uclibc.org.

Did you try programming from Windows using SAM-BA?

Best Regards
Ulf Samuelsson

#25 lore raw
Quoted 22 lines · Ulf Samuelsson
Quoted 12 lines
Quoted 11 lines
Quoted 6 lines

Once I start using sam7 util, the bootstrap code has not been executed which means the SDRAM has not been initialized. I'll have to added the lowlevel init to do that, which I might try if nothing else works.

You don't understand:

- flash all arm9load & u-boot
- loady <address> u-boot-mod
- go <address>

Quoted 9 lines

I'm tying this method. I had to go to kermit because I never had suscess loading serially with minicom. I had problems with kermit in the past but couldn't remember what it was... until now. I've always had fatal errors after a few bytes are transmitted. I get some error, then it tries to resend but had too many errors. I'm not really sure how to get past this as I'm configured the serial line accordingly. Is this a common "user error" problem with ckermit? I've double checked my config option with uboot docs.

Quoted 5 lines

I have used "minicom" a lot when downloading to the AT91RM9200, but I use the special downloading program which I found somewhere and included in the U-Boot-1.1.2 found on buildroot.uclibc.org.

Did you try programming from Windows using SAM-BA?

ckermit will work just fine and I rather stick to my linux system. Linux can do everything windows does... and more.

Thanks.

#26 lore raw
In reply to E Robertson

E Robertson ha scritto:

Quoted 30 lines · michael
Quoted 23 lines
Quoted 12 lines · E Robertson
Quoted 10 lines · michael

Hi,

Quoted 8 lines
Quoted 4 lines

Do you try to
load with a jtag in memory and execute it?

I don't have a jtag fitted for this as yet. I'm using the sam7 util.

Quoted 10 lines
Quoted 5 lines

Simple step:
- flash the work system
- loady <address>
put you version of u-boot and run go <address>

Once I start using sam7 util, the bootstrap code has not been executed which means the SDRAM has not been initialized. I'll have to added the lowlevel init to do that, which I might try if nothing else works.

Quoted 5 lines

You don't understand:

- flash all arm9load & u-boot
- loady <address> u-boot-mod
- go <address>

Quoted 8 lines

I'm tying this method. I had to go to kermit because I never had suscess loading serially with minicom. I had problems with kermit in the past but couldn't remember what it was... until now. I've always had fatal errors after a few bytes are transmitted. I get some error, then it tries to resend but had too many errors. I'm not really sure how to get past this as I'm configured the serial line accordingly. Is this a common "user error" problem with ckermit? I've double checked my config option with uboot docs.

It's a long time since I used minicom to load code on an AT91, nowadays I'm using an ICE debugger (called PEEDI)
BTW the most common error was caused by 55 NAK errors and the upload failed. Maybe this hint can help, amybe not.
http://www.koansoftware.com/en/art.php?art=68

--
Marco Cavallini | KOAN sas | Bergamo - Italia
embedded and real-time software engineering
Atmel third party consultant
Phone:+39-035-255.235 - Fax:+39-178-22.39.748
http://www.KoanSoftware.com

Meet us @ Embedded World 2008 - Nurenberg
February 26-28, 2008 Hall 11 - 224

#27 lore raw
In reply to E Robertson
Quoted 5 lines

When you said new size, I take to mean the size of the binary images. In that case boot the Bootstrap and uboot image size are smaller that the prebuilt onces.
Bootstrap is written @ 0 and uboot @ 0x8000 (a 32K size). Bootstrap is under 4K and uboot is under 185K. so I have lots of space.

How large is the previous binary?

How much code does at91bootstrap copy to the SDRAM?

Look at board/at91sam9263ek/dataflash/at91sam9263ek.h for the definition of IMG_SIZE I have 200 kB allocated.
#define IMG_SIZE 0x32000 /* Image Size in DataFlash */

You need at least
#define IMG_SIZE 0x2E400
for 185 kB.

Best Regards
Ulf Samuelsson

#28 lore raw
In reply to E Robertson
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Hi,

Quoted 3 lines
Quoted 3 lines

So, do you change the text base?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

No I did not. I don't have a reason to. Why?

Is the new size compatible with the armboot? Do you skip LOW_LEVEL_INIT?

Yes, it is skipped. From what I understood Bootstrap does the necessary boot init tasks (althought I would rather put it in uboot). Do I need to changs this?

You will not be able to store U-Boot in the SDRAM until the SDRAM has been initialized, so that is not an option.

Do you use a dataflashcard?
It is easy to mix the chip selects.

Recompile the original source and see if you can run that.

Otherwise play with LEDs.
You can also try the SAM9263EK U-Boot-1.2.0 built by buildroot at "buildroot.uclibc.org".

Best Regards
Ulf Samuelsson

#29 lore raw
Quoted 9 lines · Ulf Samuelsson
Quoted 9 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines

Hi,

Quoted 5 lines
Quoted 3 lines

So, do you change the text base?

No I did not. I don't have a reason to. Why?

Is the new size compatible with the armboot? Do you skip LOW_LEVEL_INIT?

Quoted 8 lines
Quoted 4 lines

Yes, it is skipped. From what I understood Bootstrap does the necessary boot init tasks (althought I would rather put it in uboot). Do I need to changs this?

You will not be able to store U-Boot in the SDRAM until the SDRAM has been initialized, so that is not an option.

That's correct.

Quoted 4 lines

Do you use a dataflashcard?
It is easy to mix the chip selects.

Recompile the original source and see if you can run that.

That's the first thing I did. I originaly started with 1.2.0 then I started with the original atmel_1.2 patch and later looked at 1.5 patch.

Quoted 8 lines

Otherwise play with LEDs.
You can also try the SAM9263EK U-Boot-1.2.0 built by buildroot at "buildroot.uclibc.org".

Best Regards
Ulf Samuelsson

#30 lore raw
In reply to Ulf Samuelsson

Hi

Quoted 10 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Is the new size compatible with the armboot? Do you skip LOW_LEVEL_INIT?

Yes, it is skipped. From what I understood Bootstrap does the necessary boot init tasks (althought I would rather put it in uboot). Do I need to changs this?

Quoted 4 lines

You will not be able to store U-Boot in the SDRAM until the SDRAM has been initialized, so that is not an option.

If you start u-boot that works the sdram it initialized so you can using serial line of u-boot to load a code in memory and then execute it.

Regards Michael