LS1021A - Download u-boot to RAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1021A - Download u-boot to RAM

2,755 Views
z_v
Contributor I

Hello,

The document AN4956.pdf, U-Boot/Barebox Debug using CodeWarrior for QorIQ LS series - ARM V7 ISA, explains how to use code warrior in order to download u-boot image into RAM and run it. 

What command (if any) should I run in the ccs console prior to the download ?

How does the DDR controller (or any other critical peripheral that should work prior to u-boot) is initialized ?

Please assume that nothing is burned on the NOR flash. 

Thank you,

Z.V

Labels (1)
Tags (1)
0 Kudos
8 Replies

1,664 Views
addiyi
NXP Employee
NXP Employee

The initialization file is included in stationary project, under CFG folder. So, using a stationary project to connect to the board by default will execute the init file. 

The file you specify, is used for Rev1 LS1021 and will add additional device on chain. 

Downloading uboot directly into RAM is used especially in board bring-up and consists in building uboot for RAM (all symbols should  use RAM addresses).

Adrian

0 Kudos

1,664 Views
addiyi
NXP Employee
NXP Employee

You may have to check if DDR is not getting init via u-boot. Otherwise it will reset all the code.

Adrian

0 Kudos

1,664 Views
z_v
Contributor I

Hi Adrian,

I need u-boot to run in RAM for board bring-up. 

I tried to build u-boot with:

make CONFIG_SYS_TEXT_BASE=0x80000000 all

According to System.map, all the symbols are located starting at 0x80000000

Then I downloaded u-boot.elf into the target.

Download is Ok. Then u-boot start running and hangs in hang.c

I suspect the cause for this is the relocation process.

Can you help ?

Thank you,

Z.V

0 Kudos

1,664 Views
cpyocum
Contributor III

I had a similar issue attempting to run the `u-boot` ELF file using CodeWarrior Import. I stepped through the initialization manually, and found that the fdt_header check was failing. The debug message suggested enabling `CONFIG_OF_EMBED=y` in the relevant `u-boot/configs/..._defconfig` file, and that fixed the issue for me.

U-Boot normally expects to find the device tree at some preconfigured address, but the above option will cause it to be packaged with the `u-boot` ELF file, which appears to be necessary in this case.

jerrymorrow‌: this may help you as well

1,664 Views
jerrymorrow
Contributor III

I'm having similar issue with LS1043A.  Our DDR is located as 0x80000000, so I changed the CONFIG_SYS_TEXT_BASE to 0xA0100000 (instead of 0x60100000 - NOR Flash).  I was hoping it would just run from from RAM, then relocate itself to the upper half of RAM, but it either gets a Sync exception during relocation (./arch/arm/lib/crt0_64.S), or ends up in hang.  

ldr x9, [x18, #GD_RELOC_OFF] /* x9 <- gd->reloc_off */ <<--- Sync exception here

0 Kudos

1,664 Views
addiyi
NXP Employee
NXP Employee

No ccs commands are necessary prior programming Uboot using CW. AN4956 explains how to use CW to donwload Uboot in NOR not in RAM. Indeed there is possibility to download Uboot in RAM using CW, then run it from there, but is not the scope of AN4956.

CodeWarrior via initialization file will take care of DDR, flash devices or other peripherals initialization.

Adrian

0 Kudos

1,664 Views
z_v
Contributor I

Hi Adrian,

Thank you very much  for your reply.

What initialization file should I use for LS1021A-TWR ?

Is it LS102xA_Rev1_ConfigChain.cfg‎ ?

Do you know if someone tried downloading u-boot  to RAM (and run it from there) ?

My first step is to download an ELF file created with Code Warriror, not necessarily u-boot. 

Best regards,

Zvika 

0 Kudos

1,664 Views
Pavel
NXP Employee
NXP Employee

The Section 4.4.4.7 of the QorIQ SDK 2.0-1611 Documentation – PDF (REV 0) contains command sequence for burning new version of the u-boot using u-boot:

http://www.nxp.com/assets/documents/data/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf

 

The Chapter 11 of the CW_ARMv7_Targeting_Manual.pdf contains command sequence for using Flash programmer for u-boot burning if there is no u-boot on the board.

CodeWarrior Flash programmer uses CodeWarrior TAP and COP/JTAG connection for DDR initialization, Flash programmer driver loading and code burning.

The CW_ARMv7_Targeting_Manual.pdf file is available in CodeWarrior folder.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos