PE Code Generator FAILURE

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

PE Code Generator FAILURE

2,730 Views
Vagni
Contributor IV

I developed my K60DN512VLL10-based custom board with CodeWarrior 10.4 and MQX 4.0.2. This board has been properly working for two months.

Now I need more flash memory to make a firmware upgrade on my application, so I decided to mount a K64FN1M0VLL12 cpu on my board.

 

Porting my application firmware on the new cpu involves to use CodeWarrior 10.5 and to clone MQX libraries (PSP, BSP, ...) from the TWR-K64F120M demo system.

 

So I installed Code Warrior 10.5 along with the needed updates for 120MHz cpu (com.freescale.mcu10_5.PEX_update.v1_0_0.zip and com.freescale.mcu10_5.Kinetis_K24_K63_K64_120MHz.win.sp.v1.0.2.zip) and the MQX 4.0.2 libraries for K64F120M.

 

My original BSP library for the K60 cpu was built using Processor Expert LDD components, but the the BSP for TWR-K64F120M does not include a PE project file. So I cloned the TWR-K64F120M BSP library for my custom board, then I added my original PE project file. I modified the PE project file disabling the original K60DN512VLL10 processor component and adding a new K64FN1M0VLL12 processor component. I adjusted all my LDD component in the PE project file to the new cpu and finally I launched the PE Code Generator.

 

The generation process always ends reporting two errors:

  1. Generator: FAILURE: Unexpected status of script: Drivers\Common\Static_SetConst.prg, please contact Freescale support. 
  2. Generator: FAILURE: Unexpected status of script: Drivers\Kinetis\Static_KinetisK_Cpu_Config_h.prg, please contact Freescale support. 

 

Could you please help me to fix that issue?

 

I attached my PE project file.

Original Attachment has been moved to: ProcessorExpert.pe.zip

Labels (1)
Tags (1)
14 Replies

1,586 Views
vfilip
NXP Employee
NXP Employee

Hello,

I have reproduce it. We will fix it for next release.

In mean time you can use the following workaround:

Set Initialize fast trim value to no in CPU component. and the following rows into Events.h

#define STARTUP_CLOCK_INTERNAL_FAST_TRIM_ADDRESS       0x03FEU   /* Address of non-volatile memory containing fast oscillator trim value */
#define STARTUP_CLOCK_INTERNAL_FAST_FINE_TRIM_ADDRESS  0x03FEU   /* Address of non-volatile memory containing fast oscillator fine trim value */

We are sorry for inconvenience.

Best regards

Vojtech Filip

Processor Expert Support Team

1,585 Views
Vagni
Contributor IV

Dear Vojtech Filip,

I used your workaround and got PE code generated.

But now I have some errors compiling my BSP source files:

  1. The Vectors_Config.h include file is not found. This issue causes other compiler errors in the Vectors.c source file.
  2. MCG_C5_PLLCLKEN0_MASK macro results undefined in the CPU_Init.c source file. But that macro is defined in MK64F12.h, which is included in CPU_Init.c.

Also, I see the PE code generation process creates four empty folders in the Generated_Code folder (IO_Map, PDD, Peripherals and System).

I attach my BSP - PSP project and source file.

Could you please help me to get a successful compilation?

Thank you.

0 Kudos

1,585 Views
vfilip
NXP Employee
NXP Employee

Hello,

as workaround is necessary to mark the Vectors.c file as Excluded from build.


Fix of this issue will be published within CW V10.6


Best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos

1,585 Views
ironsean
Contributor V

Hello Vojtech,

I have experienced the same issue with Processor Expert on a FRDM K64F Board and CW 10.5. After attempting to generate code with PE I got the issue that Vectors_config.h was not found. I tried your workaround of marking Vectors.c to not be built, but now my Processor Expert CPU_Init.c code can not compile when I try to compile my project because it uses one of the vector data types from Vectors.c. Now I can no longer compile my application with "undefined reference to '__vect_table' errors.

0 Kudos

1,585 Views
Vagni
Contributor IV

Dear Vojtech Filip,

Excluding Vector.c from build fixes some compiler's errors, but not all.

I think compiler's errors are due to the file MK64F12.h. There are two different versions of this file: one is in the <MQX_4_0>\mqx\source\psp\cortex_m\cpu folder and the other is in <CW_MCU_10_5>\MCU\ProcessorExpert\lib\Kinetis\iofiles folder.

All the MQX BSP code refers to the first one, while all the PEx generated code refers to the second one. So I cannot get my BSP code all successfully compiled.

How can I fix this issue?

0 Kudos

1,585 Views
MichalP
NXP Employee
NXP Employee

Dear Alessandro,

please use the same IOmap file, i.e. update the MK64F12.h in <MQX_4_0>\mqx\source\psp\cortex_m\cpu folder by the newer one that comes with the PEX update and then rebuild all MQX libs. As there could be some inconsistencies between old and new IOmap macros/strucs, please solve MQX build issues case by case when rebuilding MQX libs (renaming of some macros that addresses correct names of K64F peripheral registers like MCG_C5_PLLCLKEN_MASK -> MCG_C5_PLLCLKEN0_MASK).

FYI, there will be a new MQX 4.1.0 installer released soon (in a couple of days) as well as the new version of the MQX 4.1.0 standalone installer for the TWR-K64F120M which will come with the PEX support.

Best Regards

Michal Princ

0 Kudos

1,585 Views
williamely
Contributor IV

I just got my K64 tower kit this morning so should I wait for MQX 4.1?

If it will be out next week then I think that would be best.

Any idea when CW 10.6 will be out?

0 Kudos

1,585 Views
MichalP
NXP Employee
NXP Employee

MQX 4.1.0 is already available on the FSL web. This release however does not contain support for the K64F devices. There will be the another standalone release for TWR-K64F120M based on MQX 4.1.0 code available next week (PEX support included).
As for the CW10.6 I do not know the release date.

Best Regards

MichalP

1,585 Views
williamely
Contributor IV

Hey Michal, any update on the K64 release date?

0 Kudos

1,585 Views
MichalP
NXP Employee
NXP Employee

Hello William,

as far as I know the standalone 4.1.0 installer for TWR-K64F120M is ready for placing to the FSL web. You can expect to be there in couple of days, probably by the end of this week.

MichalP

0 Kudos

1,585 Views
williamely
Contributor IV

Just got it. Thanks.

0 Kudos

1,585 Views
williamely
Contributor IV

Thanks for the update Michal. I saw that 4.1 was released just after posting. I will work on something else until the K64 version is ready.

0 Kudos

1,585 Views
BlackNight
NXP Employee
NXP Employee

In case this is helpful:

there is an example project (attached) with Eclipse/Keppler for the K64F with FreeRTOS, see First Steps with the Freescale TWR-K64F120M | MCU on Eclipse

0 Kudos

1,585 Views
williamely
Contributor IV

Thanks Erich. Awesome site. I've been toying with the idea of going down the Eclipse route since I read your blog about it a month or so back. Maybe I'll give it a shot next weekend.

0 Kudos