Problem while debugging RAM based u-boot image on P1022 based custome board

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

Problem while debugging RAM based u-boot image on P1022 based custome board

2,142 Views
senthil_k
Contributor I

Hi,

 

We are using SDK version 1.6, codewarrior 10.4 and uSB tap to bringup our P1022 processor based custom board.

 

Through codewarrior, uboot elf file is successfully copied to DDR location 0x11000000 and while trying to execute from _start address 0x11001000 we are getting exception in fdt_fixup_phy_connection() function of fdt.c file.

 

I had attached the init script file used to initialize the core before downloading the u-boot image.

 

Please let us any correction needs to be done either in this init script file or in the u-boot source to successfully boot the u-boot image from RAM through codewarrior.

Original Attachment has been moved to: P1022DS_init_core.tcl.zip

Labels (1)
0 Kudos
Reply
12 Replies

1,608 Views
ufedor
NXP Employee
NXP Employee

Please provide binary image - not ELF.

0 Kudos
Reply

1,608 Views
senthil_k
Contributor I

Please find the attached binary image file.

0 Kudos
Reply

1,608 Views
ufedor
NXP Employee
NXP Employee

Please refer to the "config_sram_p1022ds.dat" provided in the SDK 1.6:

sdk/boot-format.git - Freescale PowerPC SD/SPI boot tool

From the DAT file it is clear that the code is intended to be loaded to 0xF8F80000 (L2SRAM) and executed from there.

0 Kudos
Reply

1,608 Views
ufedor
NXP Employee
NXP Employee

> trying to execute from _start address 0x11001000

Please use address 0x1107F000

0 Kudos
Reply

1,608 Views
senthil_k
Contributor I

Hi,

Thanks for your response. I tried as you mentioned, i had rebuild the uboot image with _start @0x1107f000 but no improvement while debugging with codewarrior. Still i am getting exception in fdt_fixup_phy_connection() function of fdt.c file.

0 Kudos
Reply

1,608 Views
ufedor
NXP Employee
NXP Employee

Which SDK you're using?

Are you working with NOR image?

Please provide the U-Boot binary image for inspection.

0 Kudos
Reply

1,608 Views
senthil_k
Contributor I

Hi,

Which SDK you're using?

I am using SDK 1.6 (QorIQ-SDK-V1.6-20140619-yocto).

Are you working with NOR image?

I am trying the run the RAM based uboot image (u-boot.elf) created under "QorIQ-SDK-V1.6-20140619-yocto/build_p1022ds_release/tmp/work/p1022ds-fsl-linux-gnuspe/u-boot/2014.01+fslgit-r0/git/P1022DS_SDCARD"

Please find the attached u-boot elf image and its system.map file.

0 Kudos
Reply

1,608 Views
addiyi
NXP Employee
NXP Employee

For sdcard  uboot debugging on low-end SoCes, please refer to CodeWarrior U-Boot Debugging​, Chapter 7.

Adrian

0 Kudos
Reply

1,608 Views
senthil_k
Contributor I

Hi Adrian,

I had seen that chapter 7 of that document and as per that it is possible to debug the uboot image through CodeWarrior only after flashing the image to SPI Flash / SDCard.

Is there any way to download the uboot elf image to DDR and run/debug it?

0 Kudos
Reply

1,608 Views
addiyi
NXP Employee
NXP Employee

Use the sdram initialization file and make the following changes:

#SDRAM bases address

mem [CCSR 0x20100] = 0x11000000

#MMU for SDRAM

reg ${CAM_GROUP}L2MMU_CAM5 = 0x400001C0FC0800001100000011000001

Also, in your uboot you need to have:

#define CONFIG_SYS_TEXT_BASE 0x11000000

#define CONFIG_RESET_VECTOR_ADDRESS 0x1107fffc

#define CONFIG_SYS_RAMBOOT

The CodeWarrior will copy the uboot elf  to the SRAM area first, then u-boot initialize DDR controller for example, then relocates itself to DDR RAM.

Adrian

0 Kudos
Reply

1,608 Views
senthil_k
Contributor I

Hi Adrian,

Thanks for your response.

I tried as you suggested but still i am getting the exception when the uboot start executing.

1. SRAM size in P1022 is only 256K, and the elf image size is 2.4MB; how the CodeWarrior will be able to copy the uboot elf to the SRAM.

2. SRAM base address is mapped to 0x11000000 and the end address is 0x1103FFFF; will setting "CONFIG_RESET_VECTOR_ADDRESS" to 0x1107fffc creates any exception as this location is in unmapped region as per sdram initialization file.

0 Kudos
Reply

1,608 Views
marius_grigoras
NXP Employee
NXP Employee

Hi,

Indeed, based on the small size of the SDRAM plus [1] and [2] this is not officially supported. Is not only a problem for the initial memory initialization, but also that u-boot is not just a simple bare-metal application (it relocates itself before second stage to DDR - and you'll need to make some important hacks into u-boot code to avoid the relocation + the DDR initialization made by u-boot).

Regards,

Marius

[1]CanUBootBeConfiguredSuchThatItCanBeStartedInRAM < DULG < DENX

[2] http://stackoverflow.com/questions/5218449/loading-u-boot-in-memory-instead-of-flashing-it

0 Kudos
Reply