CodeWarrior - Processor expert - IntFlash Bean-  Compiler Error

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

CodeWarrior - Processor expert - IntFlash Bean-  Compiler Error

Jump to solution
3,083 Views
ARBM66
Contributor I

Hello Everybody

 

I’m working with a licensed CodeWarrior ver. 5.9 and Processor expert and my MCU is MC9S12E128QFP80

 

I have a problem with the IntFlash bean in processor expert

I added the bean to my program and when I try to compile it I'm getting each time this error from compiler.

 

{{{

+IFsh1

  +ERROR: Compiler option -CpPPAGE=0x30 (address of PPAGE register) or -CpPPAGE=RUNTIME must be set to compile the generated code correctly

(current target settings, Compiler for HC12, Options, Code Generation tab, PPAGE register is used for paging). After compiler option change,

run Code design to apply the change in Processor Expert. For details, see Help of the bean.

}}}

I m trying just use this bean in a simple programming such as

 

IFsh1_SetByteFlash(0x7000,28);

   

IFsh1_GetByteFlash(0x7000,&data) ;

 

 I was wondering if anybody can help me

Thank you

Labels (1)
0 Kudos
1 Solution
751 Views
ProcessorExpert
Senior Contributor III
Hello,
 
regarding to the problem of write and read a data to/from Flash. The problem is caused by incorrect address format in SetByteFlash and GetByteFlash methods.You can find more detailed information in the help of IntFlash Bean from bean´s pop up menu.
 
Please find an example project that shows how to write a data into Flash correctly.
 
best regards
Vojtech Filip
Processor Expert Support Team
E_128_write_flash.zip
Message Edited by t.dowe on 2009-09-11 11:30 AM

View solution in original post

0 Kudos
5 Replies
751 Views
CrasyCat
Specialist III

Hello

 

Did you try to add the option -CpPPAGE=RUNTIME to your compiler command line as instructed by the message?

 

What happens then?

 

CrasyCat

0 Kudos
751 Views
ARBM66
Contributor I

Thank you CrasyCat for your kind reply,

Could you please explain me how and where I should do this job?

Actually I'm a begineer with CodeWarrior and Processor Expert.

Thanks

0 Kudos
751 Views
CrasyCat
Specialist III

Hello

 

In order to add option -CpPPAGE=RUNTIME to your project:

  - Open Target Settings dialog

  - Switch to Panel "Compiler for HC12"

  - in the command line field add -CpPPAGE=RUNTIME.

  - Close OK to close the dialog and re-build your application.

 

"

CrasyCat

0 Kudos
752 Views
ProcessorExpert
Senior Contributor III
Hello,
 
regarding to the problem of write and read a data to/from Flash. The problem is caused by incorrect address format in SetByteFlash and GetByteFlash methods.You can find more detailed information in the help of IntFlash Bean from bean´s pop up menu.
 
Please find an example project that shows how to write a data into Flash correctly.
 
best regards
Vojtech Filip
Processor Expert Support Team
E_128_write_flash.zip
Message Edited by t.dowe on 2009-09-11 11:30 AM
0 Kudos
751 Views
ARBM66
Contributor I

Finally I have succeeded to solve the problem but I have still had another problem:

I use the following routine for writing data in my program with IntFlash bean:

 

Fsh1_SetByteFlash(0x7000,28);

IFsh1_GetByteFlash(0x7000,&data) ;

 

Problem is when I check the "data" there is nothing inside it.

So I believe there is a protection for flash memory.

Please let me know how I can solve this?

Thanks

0 Kudos