S1ZVMC CW11.0 crash when loading EEPROM const

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S1ZVMC CW11.0 crash when loading EEPROM const

2,941 次查看
phil74
NXP Employee
NXP Employee

Hello,

My customer (Sonceboz) cannot debug anymore while initializing S12ZVMC EEPROM.

I have also reproduced it myself:  CW11.x crash when trying to flash a .elf file containing const value while debugging.

So debugging is not possible anymore if using "const".

This is not the case when Flashing the .sw file using "Flash file to target"  menu.

I use CW11.0 + P&E Multilink FX + S12ZVMC EVB.

Find attached the project to reproduce the behavior

Const is define as :

#pragma CONST_SEG MY_EEPROM
   volatile const long  EEP = 0xAA;
#pragma CONST_SEG DEFAULT

and     MY_EEPROM   INTO  EEPROM;  in the *.prm file

if    "MY_EEPROM INTO   EEPROM" is removed the crash does not occurs .

Did I miss something ?

Thanks in advance for your help

BR,

Philippe

0 项奖励
回复
5 回复数

2,805 次查看
kef2
Senior Contributor V
  • My customer (Sonceboz) cannot debug anymore while initializing S12ZVMC EEPROM.
  • I have also reproduced it myself:  CW11.x crash when trying to flash a .elf file containing const value while debugging.
  • So debugging is not possible anymore if using "const".
  • This is not the case when Flashing the .sw file using "Flash file to target"  menu.

Was your customer able to flash project with const in EEPROM with right target MCU setting until something happened?

If yes, then it could be caused by double bit ECC error in EEPROM, which may lead to machine exception and make CW unable to complete the task. Try temporary disabling const in code and change debugger settings to erase everything, not just used locations. Once you connect with full EEPROM+flash wipe, CW should be able to program EEPROM again.

I saw CW unable to flash S12ZVCA. Error was clearly caused by ECC double bit error + machine excetption in area which CW checksums to check if code really needs to be reflashed.

0 项奖励
回复

2,805 次查看
phil74
NXP Employee
NXP Employee

I have dug a bit more with this issue and it appears that it is linked with MCU configuration file

Using my S12ZVM128 init file I get

INF: CMD>PM

INF: Programming and Verifying.

INF: Processing Object File Data ...

INF: .

INF: Programmed.

INF: CMD>VC

INF: Verifying object file CRC-16 to device ranges ...

INF:    block 00FE0000-00FE006F ...

INF: Ok.

INF:    block 00FFFFFD-00FFFFFF ...

INF: Ok.

INF:    Checksum Verification Successful. (Cumulative CRC-16=$624B)

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

 

But with S12ZVMC256 init file I get

INF: CMD>PM

INF: Programming and Verifying.

INF: Processing Object File Data ...

INF: .

INF: Programmed.

INF: CMD>VC

INF: Verifying object file CRC-16 to device ranges ...

INF:    block 00100000-00100003 ...

INF: Ok.

INF:    block 00FF0000-00FF006F ...

INF: Ok.

INF:    block 00FFFFFD-00FFFFFF ...

INF: Ok.

INF:    Checksum Verification Successful. (Cumulative CRC-16=$23DF)

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

 

In that case EEPROM (block 00100000-00100003) is programmed correctly

So this mean that default debug configuration file for S12ZVMC128 is incorrect.

Using S12ZVMC256 is correct (even for S12ZVMC128 and may be ZMVL128, TBC...)

pastedImage_1.png

BR,

Philippe

0 项奖励
回复

2,805 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Phillippe,

From my understanding,changing target type from S12ZVMC128 to S12ZVMC256 fixed the problem.

I just checked, if I create a new S12ZVMC256 project, the default target type is S12ZVMC256. so it's not the problem of IDE.

If anywhere I misunderstood, please contact me again.


Have a great day,
Jun Zhang

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

2,805 次查看
phil74
NXP Employee
NXP Employee

Hi,

The issue is by creating a project for S12ZVMC128 there is no possibility to setup the EEPROM.

BR,

Philippe

0 项奖励
回复

2,806 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Philippe,

I don't have exact board to test your project, so I used S12ZVH128 testing your project. see attached video.

On my side, I couldn't see any issue. Can you please check also?

How can I reproduce your problem?

Have a nice day,

Jun Zhang

0 项奖励
回复