Debugging T1024RDB using code warrior from reset vector

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

Debugging T1024RDB using code warrior from reset vector

1,345 Views
veerendranathj
Contributor III

In trace32 when we reset the board the debugger will give control at 0xFFFFFFFC (Reset vector)... from there we can execute instruction by instruction and we can see the surrounding opcodes....

how can we do the same in Code Warrior Debugger...

My requirement is

1) I will connect debugger to Board

2) Open Debugger window

3) Reset the board

4) After board reset,  execution stops at reset vector.

5) From there I should be able to execute instruction one by one...

6) I should be able to see opcode of current and surrounding instructions.

Thanks and Regards,

Veerendranath

Labels (1)
0 Kudos
9 Replies

925 Views
addiyi
NXP Employee
NXP Employee

Uboot elf and uboot binary are from the same build?

Adrian

0 Kudos

926 Views
veerendranathj
Contributor III

Uboot elf and uboot binary are from the same build?

Yes...They are from same build

Below are the screen shots from Trace32.. I didn't use any ELF file mappings still when I reset the board It's showing opcodes and assembly code..(I just connected the debugger and did target reset) I need similar functionality in codewarrior...How to do that?

trace32_pic1.PNG

trace32_pic2.PNG

Regards,

Veerendranath

0 Kudos

926 Views
addiyi
NXP Employee
NXP Employee

Did you use any Memory file in CodeWarrior? If yes, try using T1024RDB_uboot_36_NOR_stage1.mem or also try with no Memory file.

Adrian

0 Kudos

926 Views
addiyi
NXP Employee
NXP Employee

If the PIC load address is set correctly, CW will ask for file location. Please refer to Chapter 11, for a method to calculate PIC load address.

Adrian

0 Kudos

926 Views
veerendranathj
Contributor III

After setting PIC.... source file is mapped correctly but in disassembly section I couldn't see any opcode/corresponding assebly code...

cw_uboot_debug.PNG

Regards,

Veerendranath

0 Kudos

926 Views
addiyi
NXP Employee
NXP Employee

Veerendranath,

You can do all steps using CodeWarrior. After you connect to the board you can use reset botton, to reset the board with or without initialization file (depending on your scenario), After reset debugger will stop at reset vector.

Connection to the board and click on Reset:

pastedImage_1.png

Reset options:

pastedImage_2.png

Aftre Reset, Debugger will stop the core at reset vector:

pastedImage_3.png

Adrian

0 Kudos

926 Views
veerendranathj
Contributor III

Yes.. we can do this when we create a ELF file in code warrior and download through tool...

but I created my bare board binary outside the tool(using GCC powerpc eabi toolchain) and I flashed my binary into NOR flash...

Now I want to debug binary using code warrior tool...

Regards,

Veerendranath

0 Kudos

926 Views
addiyi
NXP Employee
NXP Employee

In this case you should use Import option, for importing elf version of your project . File > Import > CodeWarrior Executable Importer. Assuming that your application do all initialization, no init file is necessary to be used when Reset.

Also, please take a look on this AppNote​. It explain uboot case, elf imported to CodeWarrior and binary flashed into flash device.

Adrian

0 Kudos

926 Views
veerendranathj
Contributor III

I have created a project as shown in AppNote you shared using U-BOOT.ELF which is built using frescale Linux SDK1.8(I used virtualbox for linux)...

but I my CodeWarrior tool is installed in windows system... the source code paths in elf are different from u-boot source code(downloaded from u-boot website) in windows file system... now how to map the ELF with source code?

Regards,

Veerendranath

0 Kudos