CW10, Processor Expert generates duplicate code

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

CW10, Processor Expert generates duplicate code

726 次查看
Nik
Contributor III

With licensed CW, MC9S08AC60

For example, PE generates:

void TPM10_1_MS_TIMER_OnInterrupt(void) {
 /* Write your code here ... */
}

I then add code.  I add another bean, and PE adds another copy of the above.

Anyone else have this problem or know the solution?

Thanks,

-Robern

0 项奖励
4 回复数

551 次查看
ProcessorExpert
Senior Contributor III

Hello,

 

Could you please create a project that demonstrates your problem exactly and post it here? I am not aware of such problems in CW V10.

 

best regards
Vojtech Filip
Processor Expert Support Team

0 项奖励

551 次查看
paulsawyer
Contributor I

I have the same issue with duplicate code.  If I leave the "/* Write your code here */" in the code, then the function is not duplicated.  Sketchy but true.

0 项奖励

551 次查看
vfilip
NXP Employee
NXP Employee

Hello,

could you please provide step by step process how to reproduce it? Are you able to reproduce it also in CW V10.4?

I am not able reproduce it...

Best regards

Vojtech Filip

Processor Expert Support Team

0 项奖励

551 次查看
paulsawyer
Contributor I

It is with CodeWarrior v10.4. In my project’s Sources\Events.c file, function SM1_OnBlockSent(), I deleted the comment ‘/*Write your code here … */’ and added my own code. In CW, when I selected to Generate Processor Expert Code, the Events.c file was recreated. It had my SM1_OnBlockSent() file as it was with my code, but there was a new SM1_OnBlockSent() file at the end.

However, when I tried to recreate it with the same original Events.c file, it works properly. I also tried changing other functions in this file, but it still works properly.

Paul Sawyer | Senior Design Engineer | Nuvation Research Corp, Canada | 519-746-2304 ext 2259

0 项奖励