P1022 Custom board bring-up

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

P1022 Custom board bring-up

1,356 Views
nishad_kamdar
Contributor IV

Dear sir,

I am using the P1022NSN2EFB processor on our board.

We are using Code Warrior 10.3 along with Code warrior USB TAP for debugging the processor.

We tried debugging the example code for UART testing which is targeted for the P1022DS board.

However, the Processor part number in the P1022DS is different than the one we are using.

P1022NSN2EFB can run on a core frequency of upto 600MHz while the one in P1022DS can run at a 1000MHz core frequency.

We have made the required changes on the configuration pins for the desired frequency.

However when we try to debug that code, it starts executing the .tcl script,  and waits indefinitely at a particular

point while executing the Initialization.

I have attached the snapshot of the point where the the process halts along with the entire project.

My query is

What are the changes to be made and what additional files need to be included into the code that we are using,

so that it may work for our Target Processor and Board.

Warm Regards,

Nishad Kamdar

Bit Mapper Integration Technologies Pvt. Ltd.

Design Engineer

Mob. 09503218809

Original Attachment has been moved to: Lab_27_11_13-core0.rar

Labels (1)
7 Replies

941 Views
marius_grigoras
NXP Employee
NXP Employee

Hi,

So, you need to make some debug regarding the UART project, right?

First of all, please note that the UART project output is a binary file (not an elf) - if you want to debug this .a file, you'll need to link it in a stationary P1022DS project (we already make this for our stationary project made with the NewProjectWizard).

So, please import the PA\PA_Support\Serial\P1022DS_serial in CW and update the sysclk value from Source/duart_config.c

In function GetSystemClock() we're using some PIXIS heuritics, you should remove this and return directly the needed systemclock (I don;t know what PIXIS you have on the board that's why the best way is to remove it).

After you made the changes, you need to re-build the project and replace the UART binary file into the stationary project, and also re-build the last one. You can make UART debug using next steps:

1. Make debug download with the stationary project.

2. Set a bp in debugger shell at GetSystemClock function using this command: bp GetSystemClock . You can use any other function from UART project.

3. Run the project (the bp will be hit inside a printf call).

Regards,

Marius

942 Views
nishad_kamdar
Contributor IV

I follows the steps which you had suggested, and replaced the P1022_DS .a files in my stationary project.

I then built the project and tried to debug it.

I am using the P1022DS_init_sram_flash.tcl file for initialization, as using the p1022_init stops the debugging at a particular point indefinately.

The debugging session was halted at a particular line of my stationary code.

It seems an exception has been generated.

Can you give me any insight on what kind of an error it is.

I am attaching a snapshot of the same.

0 Kudos

942 Views
marius_grigoras
NXP Employee
NXP Employee

The default stationary project is not made for be used together with the SRAM init file. The SRAM memory is very small comparing with the DDR (the main memory which the init_core.tcl relies on).

You'll need to update the stack address from GUI. Right click on the project -> Properties -> C\C++ Build -> Settings -> PowerPC Linker -> Output -> Stack Address (here you need to put a smaller value to fit in the SRAM L2 area that has 256KB). You can try with 0x30000 .

sram.png

Regards,

Marius

0 Kudos

942 Views
nishad_kamdar
Contributor IV

Still getting the same exception.

Do i need to create my own .tcl file as my hardware is not exactly the same as P1022DS  ?

0 Kudos

942 Views
marius_grigoras
NXP Employee
NXP Employee

After setting up the new stack value have you re-build your project? (clean and build)

Thank you,

Marius

0 Kudos

942 Views
nishad_kamdar
Contributor IV

Hello,

Yes i rebuilt the project,

Still getting the same interrupt.

Can you specify exactly which binary files need to be replaced.

In P1022_serial, there are 4

UART1_P1022DS.a

UART2_P1022DS.a

UART1_P1022DS.UC.a

UART2_P1022DS.UC.a

however,

my stationary project has only,

UART1_P1022DS.UC.a

UART2_P1022DS.UC.a

in the lib folder.

i have replaced these two...

am i doing it right?

0 Kudos

942 Views
alexander_yakov
NXP Employee
NXP Employee

Exception 1100 is data tlb miss. This means that you have MMU enabled, but the address you are trying to access is not configured in MMU.

Please check your MMU configuration.

0 Kudos