Problem in function procflash of component IntFLASH

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

Problem in function procflash of component IntFLASH

580 Views
marco76
Contributor I

The project is based on MC56F84789 and the problem is in the generated code of IntFLASH (Data_Flash) bean that i used.

The funcion procflash fails when i use the function SetBlockFlash!!!


It fails at every call if the optimization level is set to 2.

If the optimization level is set to 0, there were no problem!

Does anyone have the same problem?

0 Kudos
Reply
1 Reply

400 Views
marco76
Contributor I

I found a temporary solution to the problem

The bean has been set in destructive write mode. The problem is in the writing and subsequent reading of the data. So for verify it, it is necessary to change the data to be written otherwise there are no error messages!

I disabled the code generation for the bean and i added the following pragma:

#pragma push /* Save file settings. */

#pragma optimization_level 0

static byte procflash(FlashData_TAddress Address, dword Data, byte Command)

{

....

}

#pragma pop /* Restore file settings. */

Now I can set the global optimization to 2 without problems!

I'm hoping for a patch that does not force me to disable the code generation for this bean

0 Kudos
Reply