S912ZVCA ; not able to debug

cancel
Showing results for 
Search instead for 
Did you mean: 

S912ZVCA ; not able to debug

407 Views
sathishkannan
Contributor III

Hi,

 

    We use Code-warrior 10.6.4 to build and debug the S912ZVCA family in evaluation board. We are able to build the code successfully, but can't debug using USB debugging. The program counter seems to be in 0xFFFFFF. PC starting address is 0xfd002e after reset and the PC goes to 0xFFFFFF after the function DoZeroOut(); in startup.c

 

    Also when we use the build size around 56K, it is possible to debug and run. 

Labels (1)
0 Kudos
3 Replies

127 Views
RadekS
NXP Employee
NXP Employee

Hi Sathish,

According your description, it looks like some problem in memory mapping and linker configuration.

Could you please share here exact MCU part number and linker prm file?

If you use any other specific placement in you code, please share it also.

I think mainly user placement by @ parameter. For example:

volatile unsigned short ADC0ResultList[4] @ 0x001020

I guess that some variable is defined out of MCU’s memory map.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

127 Views
sathishkannan
Contributor III

Hi RadekS,

    Thanks for the reply.

1) Exact CPU part number: P912EZVCA19MKH in evaluation board VLG-MC9S12ZVC

2) We didn't place any variable out of memory, only declared as below

    static u16 results[RESULTLISTSIZE]     @ 0x002100;

    static u32 cmdlist[COMMANDLISTSIZE]   @ 0x002000;

3) Also it is observed that when the RAM location 0x3000 is accessed, we get exception.

    This exception is from start-up code DoZeroOut(), which tries to clear the bss, .common and .data segment.

    We could understand that the RAM size is 12K (0x001000 - 0x003FFF). Is it 8K or 12K ?

4) Linker RPM is attached.

Thank you.

0 Kudos

127 Views
RadekS
NXP Employee
NXP Employee

Hi Sathish,

1. Unfortunately I cannot find such part number in our system. Could you please check it once again? My VLG-MC9S12ZVC board contains MCU with part number P912ZVCA19AMKH, maskset is 0N23N.

2. Please be careful with placement by @. This is user placement and linker does not care about that data. So, you have to manage that data placed by @ will not overlap data placed by linker. Unfortunately warning against memory overlap is disabled by default in CW S12Z project.

I would like to recommend use “__attribute__ ((aligned (4)))” instead of “@ 0x002100”. This will manage that ADC command and result lists will be aligned to 4 bytes boundary, but they will be still placed by linker.

3. I tested it on my side. It seems that everything work correctly on my side. I am able create variable anywhere in range 0x1100..0x3FFF. Some other issue must be reason for that behavior. Could you please share here also your map file?


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos