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,158件の閲覧回数
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,067件の閲覧回数
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,067件の閲覧回数
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,067件の閲覧回数
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,068件の閲覧回数
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.