Stop generate ProcessorExpert.c file

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

Stop generate ProcessorExpert.c file

1,533 次查看
rabbit
Contributor III

I am using Processor Expert to automatic generate my hardware drivers.

It generate ProcessorExpert.c every time when I do compile, but I would like the main file with my own project file name rather than ProcessorExpert.c,

how to achieve that?

0 项奖励
回复
5 回复数

1,200 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Rabbit:

Please give a look at the next links from MCU on Eclipse blog. There are detailed instructions in there to achieve what you are asking for:

Shared Files maintained by Processor Expert | MCU on Eclipse

http://mcuoneclipse.com/2012/03/23/disable-my-code-generation/

Hope this is useful!

Regards!

Jorge_Gonzalez

0 项奖励
回复

1,200 次查看
vfilip
NXP Employee
NXP Employee

Hello,

in next version of ProcessorExpert will be available option to change name of the main module and the default name would be main.c

However there exists workaround for that:

1 - right click on ProcessorExpert.pe node and select Open With -> Text Editor

2 - find the <Name>ProcessorExpert</Name> tags within <Header> section

3 - modify it to your name, e.g. main

4 - close and open the project

5 - start code generation to appear the main with your name

Best regards

Vojtech Filip

Processor Expert Support Team

0 项奖励
回复

1,200 次查看
rabbit
Contributor III

It doesn't work.

When I finish step 4 -->Close and open the project. It seems nothing in the PE components after I open the project. My CodeWarrior is version CW10.4.

Did you make it work in your PC?

0 项奖励
回复

1,200 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

I tried Filip instructions and it worked ok for me :smileycheck: (just with a warning about the use of "main" word, but I guess that is normal).

Did you save the file after editing?

If you do not see the components, from the CodeWarrior projects view right click on the respective ProcessorExpert.pe and select Open With -> Processor Expert.

:smileyalert: IMPORTANT: Once you follow the steps and generate code, you have two files:

- main.c: This is the newly generated file, but does not contain any custom application code, you need to copy your own code from "ProcessorExpert.c"

- Processor Expert.c : This is the original file, which contains any code you had previously added. Copy the code to "main.c" and delete this file, or you will get a multiple main function definition error.

Hope this helps!

/Jorge Gonzalez

0 项奖励
回复

1,200 次查看
rabbit
Contributor III

Thanks.

It works, I can get main.c now.

I put my project name instead of main.

0 项奖励
回复