'New Project' function did not generate main.c if PE is used

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

'New Project' function did not generate main.c if PE is used

跳至解决方案
1,503 次查看
mkrug
Contributor II

Hello,

 

I just discovered a small, but strange, thing.

I am using CW10.2 for a K60 Tower System. If I setup a new project and include PE the 'wizard' did not generate a separate main.c file although I checked the appropriate box while setting up the new project.

The 'wizard' does if I select 'None' or 'Device Initialization' in the 'Rapid Application Development' dialog box.

 

First I thought I will get the main.c if I click again on 'Generate PE Code' - however it doesn't.

 

Simply renaming processorexpert.c (where main() is located) into main.c doesn't really work because anytime I call 'Generate PE Code' I got a new processorexpert.c which will than cause trouble during compiling and linking.

 

Anyone else have the same experience? Any idea how to solve that?

 

Markus

0 项奖励
回复
1 解答
1,310 次查看
jimtrudeau
Senior Contributor I

The solution is to get accustomed to the idea that the file named processorexpert.c is the equivalent to main.c. It's just a name after all. There is a relatively obscure thing you can do, which is to tell Processor Expert to NOT generate a main(). But that rather defeats at least part of the purpose of using Processor Expert in the first place.

 

So, my recommendation is to just get used to the idea that main() is in a file with an unusual name.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,311 次查看
jimtrudeau
Senior Contributor I

The solution is to get accustomed to the idea that the file named processorexpert.c is the equivalent to main.c. It's just a name after all. There is a relatively obscure thing you can do, which is to tell Processor Expert to NOT generate a main(). But that rather defeats at least part of the purpose of using Processor Expert in the first place.

 

So, my recommendation is to just get used to the idea that main() is in a file with an unusual name.

0 项奖励
回复
1,310 次查看
BlackNight
NXP Employee
NXP Employee

Hello,

The obscure thing is described at the bottom of http://mcuoneclipse.wordpress.com/2012/03/09/shared-files-maintained-by-processor-expert/.

But doing it that way means that you need to care about it yourself 100%.

 

But I agree: it is just a file name. So I recommend to stick with it. Maybe that name can be configured in the future.

 

Hope this helps,

BK

0 项奖励
回复