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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
526 Views
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 Solution
435 Views
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.

View solution in original post

3 Replies
435 Views
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.

435 Views
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 Kudos
436 Views
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.