Can I put my code inside an auto generated fils from PE

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

Can I put my code inside an auto generated fils from PE

跳至解决方案
1,182 次查看
om
Contributor III

Hello

I started to use PE and suddenly I realize that it might not be the right tool to use, cause when I generate files, the tool step over code that I inserted in those files.

Two examples:

1 if I have UART driver and I need extra functionality, then I have to add it somewhere.

   If I add it in the AS1.c, AS2.c, …, next time I will build the PE project and compile the files with my compiler (IAR) then it will be stepped over.

  1. I want to do a lot of things in the main function, but it let me put a code only before the RTOS start.

    What if I want to put a code after that ?

Thanks a lot

  OM


1 解答
1,091 次查看
BlackNight
NXP Employee
NXP Employee

Hi OM,

Application.h and APP_Run() is my own code I have added.

I usually make only minimal changes in ProcessorExpert.c, and kick off my application in Application.c.

You might have a look at the examples on mcuoneclipse/Examples at master · ErichStyger/mcuoneclipse · GitHub

BTW, GitHub has the functionality to download an archive of the repository, so you do not need to download file by file:

5045_5045.png

Go to the root of the repository, and then you find this button on the right hand side.

I hope this helps.

在原帖中查看解决方案

3 回复数
1,091 次查看
BlackNight
NXP Employee
NXP Employee

Hi OM,

if you want to change the generated code and keep your changes, you can disable code generation.

See Disable my Code Generation | MCU on Eclipse

For how adding your own changes to main: see the yellow areas below:

5043_5043.png

I hope this helps.

1,091 次查看
om
Contributor III

Thanks a lot.

This solve a lot of things :-)

One issue:

In the "hello World" example that I based on, there is no APP_Run(); or #include "Application.h"

Is it something you manyally added, or you use different version of PE then I do ?

(Mine is Version: 10.2.0)


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

Hi OM,

Application.h and APP_Run() is my own code I have added.

I usually make only minimal changes in ProcessorExpert.c, and kick off my application in Application.c.

You might have a look at the examples on mcuoneclipse/Examples at master · ErichStyger/mcuoneclipse · GitHub

BTW, GitHub has the functionality to download an archive of the repository, so you do not need to download file by file:

5045_5045.png

Go to the root of the repository, and then you find this button on the right hand side.

I hope this helps.