AnsweredAssumed Answered

p1020rdb-pc and u boot debugging

Question asked by tom vogel on Nov 3, 2013
Latest reply on Jul 28, 2015 by Sourabh Das

I have a Freescale P1020rdb-pc development kit, Codewarrior Tap  and am using CodeWarrior 10.3 in Linux for development. (LinuxMint OS).

U boot source and toolchain is the from the Freescale SDK1.4 Yocto package.

I am sucessfully able to build u boot with the GNU cross compiler and download uboot.bin into NOR flash using CodeWarrior and the Tap.

The P1020rdb-pc starts up and runs fine. Now at a point where we need to be able to debug u boot as we will be customizing the hardware.

I set up debug configuration to Download.

When debugging using Connect, seems to run fine, here is the console output:

 

Executing Initialization File: /home/vogel/QorIQ-SDK-V1.4-20130625-yocto/u-boot/CFG/P1020RDB_init_core.tcl

radix x

cmdwin::eclipse::config hexprefix 0x

cmdwin::eclipse::config MemIdentifier v

cmdwin::eclipse::config MemWidth 32

cmdwin::eclipse::config MemAccess 32

cmdwin::eclipse::config MemSwap off

cmdwin::reg PIR %d -np

thread break: Stopped, 0x0, 0x0, cpuPowerPCBig, u-boot (state, tid, pid, cpu, target)

cmdwin::mem p:0xff700000 = 0x000e0000

cmdwin::mem p:0xe0005000 = 0x00001000

cmdwin::mem p:0xe0020e44 = 0x0000001D

cmdwin::reg Standard Special Purpose Registers/MSR = 0x02000200

cmdwin::reg regPPCTLB1/L2MMU_CAM0 = 0x70000FCAFC080000FF000000FF000001

cmdwin::reg regPPCTLB1/L2MMU_CAM1 = 0xA0007FC41C0800000000000000000001

cmdwin::reg regPPCTLB1/L2MMU_CAM3 = 0xA0007FCA1C0800008000000080000001

cmdwin::reg regPPCTLB1/L2MMU_CAM6 = 0x500003CAFC080000E0000000E0000001

cmdwin::reg regPPCTLB1/L2MMU_CAM7 = 0x500003CAFC080000E0100000E0100001

cmdwin::reg regPPCTLB1/L2MMU_CAM8 = 0x500003CAFC080000EFC00000EFC00001

cmdwin::reg regPPCTLB1/L2MMU_CAM10 = 0x300000CA1C080000EFF00000EFF00001

cmdwin::reg regPPCTLB1/L2MMU_CAM11 = 0x400001CA1C080000EFA00000EFA00001

cmdwin::reg e500 Special Purpose Registers/L1CSR0 = 0x2

cmdwin::reg e500 Special Purpose Registers/L1CSR1 = 0x0

cmdwin::reg e500 Special Purpose Registers/L1CSR1 = 0x2

cmdwin::mem p:0xe00e0004 -np

cmdwin::mem p:0xe0000c08 = 0x000FF000

cmdwin::mem p:0xe0000c10 = 0x80400017

cmdwin::mem p:0xe0000c28 = 0x00080000

cmdwin::mem p:0xe0000c30 = 0x8020001c

cmdwin::mem p:0xe0000c48 = 0x000efc00

cmdwin::mem p:0xe0000c50 = 0x8020000f

cmdwin::mem p:0xe0000c68 = 0x000a0000

cmdwin::mem p:0xe0000c70 = 0x8010001c

cmdwin::mem p:0xe0000c88 = 0x000efc10

cmdwin::mem p:0xe0000c90 = 0x8010000f

cmdwin::mem p:0xe0000ca8 = 0x000efa00

cmdwin::mem p:0xe0000cb0 = 0x80400010

cmdwin::mem p:0xe0000cc8 = 0x000eff00

cmdwin::mem p:0xe0000cd0 = 0x8040000d

cmdwin::mem p:0xe0000d68 = 0x00000000

cmdwin::mem p:0xe0000d70 = 0x80f0001d

cmdwin::mem p:0xe00e0000 -np

cmdwin::mem p:0xe0002110 = 0x470c0008

cmdwin::mem p:0xe0002000 = 0x0000003f

cmdwin::mem p:0xe0002008 = 0x00000000

cmdwin::mem p:0xe0002080 = 0x80014302

cmdwin::mem p:0xe0002084 = 0x00000000

cmdwin::mem p:0xe0002104 = 0x00110104

cmdwin::mem p:0xe0002108 = 0x5d59e544

cmdwin::mem p:0xe000210c = 0x0fa888cd

cmdwin::mem p:0xe0002100 = 0x00020000

cmdwin::mem p:0xe0002114 = 0x24401010

cmdwin::mem p:0xe0002118 = 0x00441210

cmdwin::mem p:0xe000211c = 0x00000000

cmdwin::mem p:0xe0002120 = 0x00000000

cmdwin::mem p:0xe0002124 = 0x0a280100

cmdwin::mem p:0xe0002128 = 0xdeadbeef

cmdwin::mem p:0xe0002130 = 0x03000000

cmdwin::mem p:0xe0002160 = 0x00000001

cmdwin::mem p:0xe0002164 = 0x01401400

cmdwin::mem p:0xe0002170 = 0x89080600

cmdwin::mem p:0xe0002174 = 0x8675f608

cmdwin::mem p:0xe0002b28 = 0x00000000

cmdwin::mem p:0xe0002b2c = 0x00000000

cmdwin::wait 500

cmdwin::mem p:0xe0002110 = 0xc70c0008

cmdwin::wait 2000

cmdwin::mem p:0xe0007000 = 0x80000404

cmdwin::mem p:0xe0007008 = 0x0000FB00

cmdwin::mem p:0xe0007020 = 0x25170008

cmdwin::mem p:0xe0005000 = 0xFF001001

cmdwin::mem p:0xe0005004 = 0xFF000FF7

cmdwin::mem p:0xe0005008 = 0xEFF00C21

cmdwin::mem p:0xe000500c = 0xFFF003AE

cmdwin::mem p:0xe00050e0 = 0x0000F020

cmdwin::mem p:0xe0005018 = 0xEFA00801

cmdwin::mem p:0xe000501c = 0xFFFE09F7

cmdwin::mem p:0xe00050d0 = 0x4000000f

cmdwin::mem p:0xe00050d4 = 0x80000008

cmdwin::mem p:0xe0020000 -np

cmdwin::mem p:0xe0020000 = 0x50000000

cmdwin::reg e500 Special Purpose Registers/IVPR = 0x00000000

cmdwin::reg e500 Special Purpose Registers/IVOR0 = 0x00000100

cmdwin::reg e500 Special Purpose Registers/IVOR1 = 0x00000200

cmdwin::reg e500 Special Purpose Registers/IVOR2 = 0x00000300

cmdwin::reg e500 Special Purpose Registers/IVOR3 = 0x00000400

cmdwin::reg e500 Special Purpose Registers/IVOR4 = 0x00000500

cmdwin::reg e500 Special Purpose Registers/IVOR5 = 0x00000600

cmdwin::reg e500 Special Purpose Registers/IVOR6 = 0x00000700

cmdwin::reg e500 Special Purpose Registers/IVOR8 = 0x00000c00

cmdwin::reg e500 Special Purpose Registers/IVOR10 = 0x00000900

cmdwin::reg e500 Special Purpose Registers/IVOR11 = 0x00000f00

cmdwin::reg e500 Special Purpose Registers/IVOR12 = 0x00000b00

cmdwin::reg e500 Special Purpose Registers/IVOR13 = 0x00001100

cmdwin::reg e500 Special Purpose Registers/IVOR14 = 0x00001000

cmdwin::reg e500 Special Purpose Registers/IVOR15 = 0x00001500

cmdwin::reg e500 Special Purpose Registers/IVOR32 = 0x00001600

cmdwin::reg e500 Special Purpose Registers/IVOR33 = 0x00001700

cmdwin::reg e500 Special Purpose Registers/IVOR34 = 0x00001800

cmdwin::reg e500 Special Purpose Registers/IVOR35 = 0x00001900

cmdwin::mem v:0x00000700 = 0x48000000

cmdwin::mem v:0x00001500 = 0x48000000

cmdwin::reg e500 Special Purpose Registers/IAC1 = 0xfffffffc

cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x40800000

cmdwin::reg e500 Special Purpose Registers/DBCR1 = 0x00000000

cmdwin::eclipse::config runcontrolsync off

cmdwin::go

cmdwin::wait 50

cmdwin::eclipse::config runcontrolsync on

cmdwin::stop

thread break: Stopped, 0x0, 0x0, cpuPowerPCBig, u-boot (state, tid, pid, cpu, target)

cmdwin::reg e500 Special Purpose Registers/DBSR = 0x01CF0000

cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x41000000

cmdwin::reg e500 Special Purpose Registers/IAC1 = 0x00000000

cmdwin::reg e500 Special Purpose Registers/CSRR0 = 0x00000000

cmdwin::reg e500 Special Purpose Registers/CSRR1 = 0x00000000

cmdwin::reg Standard Special Purpose Registers/MSR = 0x02001200

cmdwin::reg e500 Special Purpose Registers/HID0 = 0x00004000

cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x41000000

cmdwin::reg General Purpose Registers/PC = 0xFFFFFFFC

cmdwin::reg General Purpose Registers/SP = 0x0000000F

cmdwin::mem p:0xe0001010 = 0x03000000

 

Executing download task: /home/vogel/QorIQ-SDK-V1.4-20130625-yocto/u-boot/Flash uboot.tcl

cmdwin::fl::target -lc debug download

cmdwin::fl::target -b 0x2000 0x30000

cmdwin::fl::target -v off -l off

cmdwin::fl::device -d S29GL128P -o 8Mx16x1 -a 0xff000000 0xffffffff

cmdwin::fl::image -f /home/vogel/QorIQ-SDK-V1.4-20130625-yocto/u-boot/u-boot.bin -t Auto Detect -re on -r 0xff000000 0xffffffff -o

e on -o 0xfff80000

cmdwin::fl::erase image

Beginning Operation ...   

-------------------------

Auto-detection is successful.  

  File is of type Binary/Raw Format.  

 

Performing target initialization ...   

Downloading Flash Device Driver ...  

Reading flash ID ...  

Erasing Sector 0xFFF80000 to 0xFFF9FFFF  

Erasing Sector 0xFFFA0000 to 0xFFFBFFFF  

Erasing Sector 0xFFFC0000 to 0xFFFDFFFF  

Erasing Sector 0xFFFE0000 to 0xFFFFFFFF  

Erasing ...  

Erasing ....  

Erasing .....  

Erase Command Succeeded   

cmdwin::fl::write

Beginning Operation ...   

-------------------------

Using restricted address range 0xFF000000 to 0xFFFFFFFF  

Programming file /home/vogel/QorIQ-SDK-V1.4-20130625-yocto/u-boot/u-boot.bin  

Auto-detection is successful.  

  File is of type Binary/Raw Format.  

 

Downloading Flash Device Driver ...  

Reading flash ID ...  

Auto-detection is successful.  

  File is of type Binary/Raw Format.  

 

Downloading 0x00010000 bytes to be programmed at 0xFFF80000  

Downloading 0x00010000 bytes to be programmed at 0xFFF90000  

Executing program ....  

Program Command Succeeded   

Downloading 0x00010000 bytes to be programmed at 0xFFFA0000  

Downloading 0x00010000 bytes to be programmed at 0xFFFB0000  

Executing program ....  

Program Command Succeeded   

Downloading 0x00010000 bytes to be programmed at 0xFFFC0000  

Downloading 0x00010000 bytes to be programmed at 0xFFFD0000  

Executing program ....  

Program Command Succeeded   

Downloading 0x00010000 bytes to be programmed at 0xFFFE0000  

Downloading 0x00010000 bytes to be programmed at 0xFFFF0000  

Executing program ....  

Program Command Succeeded   

cmdwin::fl::disconnect

 

 

Then CodeWarrior switches to Debug view, but there is an exception:

 

 

 

I have some moderate success with Debug configuration Attach. However am not able to step through code as I would like.

Any suggestions would be appreciated.

Outcomes