Hi
Yiping
I am trying to bring up line card using p1020 processor. I am currently using p1020 rdb reference board. For line card no u-boot code is present in flash. How do we bring up board using DDR taking reference board as starting point. For reference board how do we compile u-boot for RAM boot there is no option except sd card. How do we compile the code for booting using DDR . I am able to run hardware tests on DDR upto 1GB after using p1020rdb_init_core.tcl. I can import u-boot code to any location on DDR using JTAG. How do we start u-boot from DDR. I see that code gets into exception after setting PC to reset vector say 0x1107fffc and it does not work. At reset vector I see ba instruction pointing to some ffffffa8, Any pointers will help.
Thanks
Amruth p.v
Hello Amruth,
I don't think this is an appropriate way to download u-boot to RAM with CodeWarrior through JTAG, then debug u-boot from RAM. Because firstly CodeWarrior needs to execute the p1020rdb_init_core.tcl to initialize the target board, the initialization file includes LAW, MMU, DDR, eLBC controller configurations, these will affect u-boot executing. So we often use attach launch configuration to debug u-boot rather than download method.
1. You could use CodeWarrior to program u-boot to NOR Flash, then debug u-boot from NOR Flash with CW.
2. You could use boot_format to write u-boot to SD card, then debug u-boot using SD card.
For detailed information about how to debug u-boot, please refer to sections "Debugging U-Boot using NOR flash" and "Debugging U-Boot using SPI and SD/MMC flash" in CW_PA_v10.4.0\PA\Help\PDF\Targeting_PA_Processors.pdf. You also could refer to this application note CodeWarrior U-Boot Debugging.
If further assistance is needed, please feel free to let me know.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Yiping
I have issues with programming through flash because the flash programmer unable to flash id. I don't have SD card just have DDR which works reliably.
I have used this doc as starting point
http://lists.denx.de/pipermail/u-boot/2013-March/149774.html
Here there is method of loading u-boot through JTAG and bring up u-boot on DDR.
I have tried and code loads as reset vec but has problem at arch/PowerPC/cpu/mpc85xx/start.S after loading exception vectors.
Please let me know if you know whether u-boot works using the link above. How does it fir into latest u-boot code from denx.
Thanks
Amruth p.v
Hello Amruth,
Because P1020 SRAM is 256K, you need to download u-boot image to DDR. Please customize CW initialization file only including DDR LAW and TLB configuration, then use CodeWarrior to connect to the target and load u-boot bin file to DDR at 0x11001000(following SD boot). Then in CodeWarrior register panel, disable DDR TLB, define 4k a boot page TLB mapping 0xfffff000 to 0x110c0000. Then run u-boot from CodeWarrior IDE, in the connect configuration, PC is set at 0xFFFFFFFC.
Do you use SDK 1.6? SDK 1.6 should use two stages boot from SRAM.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Yiping
Thanks for your response. I am using SDK 1.2. I have issues with DDR not working consistently. I am seeing error reading memory "CCS Last Errror: Cannot start SAP transactions protocol plugin error". The mem location is e00e0004. If you aware of this issues. Please let me know. Should we only init DDR LAW and TLB configs which one is simple to modify P1020RDB_init_core.tcl or P1020RDB_init_sram.tcl. If you sample files just for doping this please provide me.
Thanks
Amruth p.v
Hello Amruth,
In CodeWarrior initialization file, 0xE0000000 to 0xE01FFFFF is assigned to CCSR memory space, the CCSRBAR is moved at 0xE0000000 in CW initialization file. DDR controller and debug register configurations need to use CCSR memory map, so please also initialize CCSR LAW and TLB.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Yiping
Thanks for your response.
I am getting this issue "Cannot start SAP transactions protocol plugin error" when I use P1020RDB_init_core.tcl but when I run P1020RDB_init_sram.tcl there is no issue I can see 256K SRAM with initial values of 0xFF...
I see that when I tried to set PC address for reset mem[CCSR } = 0xfffffffc to stop the debugger. The codewarrior indicates Failed to write register PC.
I am unable to get DDR working but was woeking previously using same init_core file. Please let me know if we have any specific issues in hardware which might have created the problem with DDR.
Thanks
Amruth p.v
Hello Amruth,
The most probable problem is caused by DDR controller configuration, the initialization file is used for Freescale demo board, and probably not suitable for your customized board.
You could download QCVS(QorIQ Configuration and Validation Suite) from Freescale public Website to assist you to do DDR controller configuration.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Yiping
Thanks for your reply
Tried to program NOR flash after initializing using SRAM(init_sram.tcl).
I am getting the following errors after running diagnose command.
Itried both AMD and intel algorithms the sector count is 256, size is 0x2000 and mem org is 32M*8*1
fl::target -lc "test_30sept_Debug_P1020_connect"
fl::target -b 0x0 0x40000
fl::target -v off -l off
cmdwin::fl::device -d "JS28F256M29EWL" -o "32Mx8x1" -a 0xff000000 0x100ffffff
cmdwin::fl::diagnose
Beginning Operation ...
-------------------------
Performing target initialization ...
Downloading Flash Diagnostics Driver ...
Reading flash ID ...
Running Diagnostics ...
Error: The Diagnostics operation failed. Flash diagnostics reports the following error(s): Operation Unsupported
Error: Diagnose operation failed
Error: The Diagnostics operation failed. Flash diagnostics reports the following error(s): Operation Unsupported
Thanks
Amruth p.v
Hello Amruth,
The address range is not correct in the log.
You could only add erase and program actions and flash u-boot to NOR Flash. Have you done this?
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Yiping
I have tried erase and program flash but it shows command failed. Please see detailed logs below it shows it erased and programmed but it does not work.
fl::target -lc "test_30sept_Debug_P1020_Download"
fl::target -b 0x0 0x40000
fl::target -v off -l on
cmdwin::fl::device -d "JS28F256M29EWL" -o "16Mx16x1" -a 0xfe000000 0xffffffff
cmdwin::fl::protect all off
Beginning Operation ...
-------------------------
log: Using Algorithm: amd16x1.elf
log:
log:
log: ======================================================================
log: === Target Configuration Settings
log: === Launch Configuration: test_30sept_Debug_P1020_Download
log: ======================================================================
log: Connecting ...
Performing target initialization ...
log: Connected ...
log:
log: ======================================================================
log: === Execute: Unprotect
log: === Timestamp: Tue Oct 07 16:15:54 2014
log: === Flash Device: JS28F256M29EWL
log: === Flash Organization: 16Mx16x1
log: === Flash Mem Start Addr: 0xFE000000
log: === Flash Mem End Addr: 0xFFFFFFFF
log: ======================================================================
Downloading Flash Diagnostics Driver ...
log: Loading Flash Device Driver at: 0x00000000
log: Flash Driver Buffer is at: 0x00004010
log: Flash Driver Buffer Size is: 0x0003BFF0
log:
log: Writing the Address
log: Writing the address of the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Reading flash ID ...
log: Reading init return status
log: Done
log:
log: Initialization Command Succeeded
log: Writing the Address
log: Writing the Number of Sectors
log: Writing the address of the sector list
log: Writing the sector list
Unprotecting all sectors...
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Unprotecting ...
log: Reading unprotect return status
log: Done
Unprotect Command Succeeded
log: Timestamp: Tue Oct 07 16:15:59 2014
fl::target -lc "test_30sept_Debug_P1020_Download"
fl::target -b 0x0 0x40000
fl::target -v off -l on
cmdwin::fl::device -d "JS28F256M29EWL" -o "16Mx16x1" -a 0xfe000000 0xffffffff
cmdwin::fl::erase all
Beginning Operation ...
-------------------------
log: Using Algorithm: amd16x1.elf
log:
log:
log: ======================================================================
log: === Target Configuration Settings
log: === Launch Configuration: test_30sept_Debug_P1020_Download
log: ======================================================================
log: Connecting ...
Performing target initialization ...
log: Connected ...
log:
log: ======================================================================
log: === Execute: Erase
log: === Timestamp: Tue Oct 07 16:16:43 2014
log: === Flash Device: JS28F256M29EWL
log: === Flash Organization: 16Mx16x1
log: === Flash Mem Start Addr: 0xFE000000
log: === Flash Mem End Addr: 0xFFFFFFFF
log: ======================================================================
Downloading Flash Device Driver ...
log: Loading Flash Device Driver at: 0x00000000
log: Flash Driver Buffer is at: 0x00004010
log: Flash Driver Buffer Size is: 0x0003BFF0
log:
log: Writing the Address
log: Writing the address of the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Reading flash ID ...
log: Reading init return status
log: Done
log:
log: Initialization Command Succeeded
log: Writing Erase Function Code
Erasing entire flash ...
log: Writing the Address
log: Writing the Number of Sectors
log: Writing the address of the sector list
log: Writing the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Erasing ...
log: Reading erase return status
log: Done
Erase Command Succeeded
log: Timestamp: Tue Oct 07 16:16:48 2014
fl::target -lc "test_30sept_Debug_P1020_Download"
fl::target -b 0x0 0x40000
fl::target -v off -l on
cmdwin::fl::device -d "JS28F256M29EWL" -o "16Mx16x1" -a 0xfe000000 0xffffffff
cmdwin::fl::image -f "D:\\flash_test.bin" -t "Binary/Raw Format" -re off -oe off
cmdwin::fl::write
Beginning Operation ...
-------------------------
Programming file D:\flash_test.bin
log:
log: Using Algorithm: amd16x1.elf
log:
log:
log: ======================================================================
log: === Target Configuration Settings
log: === Launch Configuration: test_30sept_Debug_P1020_Download
log: ======================================================================
log: Connecting ...
Performing target initialization ...
log: Connected ...
log:
log: ======================================================================
log: === Execute: Program
log: === Timestamp: Tue Oct 07 16:18:51 2014
log: === Flash Device: JS28F256M29EWL
log: === Flash Organization: 16Mx16x1
log: === Flash Mem Start Addr: 0xFE000000
log: === Flash Mem End Addr: 0xFFFFFFFF
log: ======================================================================
Downloading Flash Device Driver ...
log: Loading Flash Device Driver at: 0x00000000
log: Flash Driver Buffer is at: 0x00004010
log: Flash Driver Buffer Size is: 0x0003BFF0
log:
log: Writing the Address
log: Writing the address of the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Reading flash ID ...
log: Reading init return status
Error: command failed
Hello Amruth,
According to your programmer log, in the first section flash ID could be read and erase command could be executed successfully, but in the flash programmer section, it seems that it is failed to read the flash ID. Please make sure use the SRAM initialization file in PA\PA_Support\Initialization_Files\QorIQ_P1 to avoid the DDR unstable problem. Please make sure you have modified the initialization file for your target, the NOR Flash start address is 0xFE000000 rather than 0xFF000000, please modify LAW, TLB, BR0, OR0, you could refer to P1020RM for detailed information about OR0 and BR0 definition.
In addition, for flash programing task, you missed an important configuration, in the panel "Add Program/Verify Action", please check "Apply Address Offset" and specify the exact effective address of u-boot, for P1020RDB-PC it should be "0xfff80000".
You could use the following command sequence to read flash ID manually.
After connect to the target from Run->Debug Configurations-><launch configuration>->Debug, open debug shell console from Window->show view->Debugger Shell.
# Set device to Read state
change p:fe000000 f0f0 16bit
# Get Mfg and Device ID values
change p:fe000aaa aaaa 16bit
change p:fe000554 5555 16bit
change p:fe000aaa 9090 16bit
# Display Mfg ID value at offset 0
# Display Dev ID value at offset 2
display p:fe000000..fe000004 16bit
# Reset device to Read state
change p:fe000000 f0f0 16bit
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Yiping
Thanks for your reply.
I am able to program the flash. I have successfully erased verified and programmed u-boot into flash at location 0xfff80000. The blank check works as expected from target task. It reads 0xfff80000 0x27 which is u-boot header.
The issue is codewarrior running debugger shell shows mem 0xfff80000 0xffffffff and it happens all the time.
The amd driver and flash utility works but the codewarrior does not read from flash.
We have checked using code warrior connection server also using JTAG read command and it also shows same as 0xffffffff.
Please let me know what could be the issue.
Thanks
Amruth p.v