debugging u-boot on p3041 with codewarrior

cancel
Showing results for 
Search instead for 
Did you mean: 

debugging u-boot on p3041 with codewarrior

786 Views
david-snc
Contributor I

I am going to bring up u-boot on a new P3041 cpu board of our design. In preparation I am working with u-boot on P3041DS to learn how to debug u-boot. I have read AN4876 which describes debugging uboot on a 1020 cpu.

 

Now I am running into a problem. My u-boot build works on the P3041DS and boots properly. When I debug with codewarrior tap, I am able to step through start.S from the reset vector up to the point it executes the RFI instruction to switch from AS0 to AS1 and execute 'switch_as'.. AN4876 implies I should be able to step into the RFI and continue from there. However on the P3041DS, when I step into the RFI, the program counter goes to the correct address however the memory there contains garbage. Since this u-boot works if booted without the tap, there must be some trick I am missing to be able to continue stepping. or is it not possible with a p3041 cpu?

 

Has anyone run into this?

Labels (1)
0 Kudos
4 Replies

421 Views
lunminliang
NXP Employee
NXP Employee

Hi,

As Stoica has stated, u-boot debug on e500v2 and e500mc platform are different, and varies for different booting type. Please make sure you have followed the corresponding chapters in AN4876.

Using improper steps may result in strange errors. P3041 is possible, it's e500mc implementation, so followed chapter 8 for NOR, chapter 9 for NAND and chapter 10 for SPI/SD/MMC.


Have a great day,
Lunmin

0 Kudos

421 Views
david-snc
Contributor I

thanks. I was following the wrong chapter (doh!).  I have made progress now.

0 Kudos

421 Views
addiyi
NXP Employee
NXP Employee

AN4876 describes uboot debugging for low-end CPU (e500v2 is the example) and high-end CPU (e500mc in the example. In fact is even P3041DS). Please take a look on Chapter 8, 9 and 10, depending on what flash device you are using.

0 Kudos

421 Views
david-snc
Contributor I

thanks. I was following the wrong chapter (doh!).  I have made progress now.

0 Kudos