Hi,
We are using p2020rdb-pc booting from NOR. To understand the board deeply I have made some attempts. But I encountered some problems
I want to modify the NOR's base address to 5f000000. So I modify relevant files in codewarrior.
1) In p2020rdb-pc_int_core_tcl
# LAWBAR0 - Local Bus
# bit 8 - 31 = 0xFF000000 - base addr
mem [CCSR 0xc08] = 0x000ff000--------->mem [CCSR 0xc08] = 0x0005f000
# boot from nor gpcm 16 bit boot location (default)
# CS0 - NOR Flash
# BR0 base address at 0xFF000000, port size 16 bit, GPCM, DECC disabled
mem [CCSR 0x5000] = 0xFF001001 ---------> mem [CCSR 0x5000] = 0x5F001001
2) In p2020rdb-pc_int.c
// 16MB TLB1 entry 2 - Local Bus : 0xFF000000 - 0xFFFFFFFF
lis r5, 0xff00 ---------> lis r5, 0x5f00
ori r5, r5, 0x000a
mtspr 626, r5
lis r5, 0xff00 ---------> lis r5, 0x5f00
ori r5, r5, 0x003f
mtspr 627, r5
Then I build the project.
In the target mask,I set the base address in 5f000000. And the u-boot is download to 5ff80000.
But I encountered the problem.
Where is the error?
Best regard,
Min Zhao
I think you also need to do the MMU initialization, see below in the orignal .tcl file:
# define 16MB TLB1 entry 2: 0xFF000000 - 0xFFFFFFFF; for Local Bus, cache inhibited, guarded
reg ${CAM_GROUP}L2MMU_CAM2 = 0x70000FCAFC080000FF000000FF000001
I am a little confused by your description, are you using the CodeWarrior flash programmer tool? then why do you change the file p2020rdb-pc_int.c?
As the CW flash programmer tool will take use of the built-in flash programming algorithm, those are .elf file.
Before I building the project, I can't find the .elf file. The reason that I change the file p2020rdb-pc_int.c is I modify the NOR's base address. I have modifyed the relevant configuration in .tcl file.
Best regard,
Min Zhao
Hi,
I have the same problem as Min Zhao.
We changed the NOR Flash on P2020RDB-PC from 16MB(S29GL128P) to 64MB(S29GL512P).
Now we want to flash the uboot into it, what should we changed on Codewarrior to make this happen?
Best Regards,
Hu