Rename the file in MCUXpresso IDE

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

Rename the file in MCUXpresso IDE

跳至解决方案
980 次查看
Devaharsha
Contributor III

Hi,

I want to replace and rename the main file in MCUXpresso IDE. Can anyone help me in figuring out the changes required for the above?

 

For example, I have used Hello_world SDK example on imxrt 1176. It's working. Now, I want to rename the hello_world.c file. (which contains main function). When I renamed it, the IDE threw an error saying "File has been modified and it can't find main."

Can anyone help me in figuring out the changes required for the above?

0 项奖励
1 解答
945 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I tried on my own, but I could not find a form to make this. But I do not if this way works for your project. You can try to add a new folder with a new name then inside the file main.c. I tried this way and works.

Best regards,
Pavel

在原帖中查看解决方案

0 项奖励
3 回复数
970 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I suggest reviewing your example, I reproduced it as you mentioned but the issue does not appear, I recommend downloading the last version of the SDK and IDE.

Best regards,
Pavel

0 项奖励
965 次查看
Devaharsha
Contributor III

Thanks @Pavel_Hernandez . TRenaming working fine. Maybe the mistake was on my side.

 

Though I find problems in the following:

I want to rename the main file and keep it outside the source file. But when I tried I am getting the following error saying "undefined reference to main."   (I have attached the file structure I have modified. EntryPoint.c is the main program.) 

I have added the path in the settings. Where else in the settings do I have to modify regarding this? My actual query is that from where the program knows that the main is in the source folder?

 

0 项奖励
946 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

I tried on my own, but I could not find a form to make this. But I do not if this way works for your project. You can try to add a new folder with a new name then inside the file main.c. I tried this way and works.

Best regards,
Pavel

0 项奖励