I am using Processor Expert to automatic generate my hardware drivers.
It generate ProcessorExpert.c every time when I do compile, but I would like the main file with my own project file name rather than ProcessorExpert.c,
how to achieve that?
Please give a look at the next links from MCU on Eclipse blog. There are detailed instructions in there to achieve what you are asking for:
Shared Files maintained by Processor Expert | MCU on Eclipse
Hope this is useful!
in next version of ProcessorExpert will be available option to change name of the main module and the default name would be main.c
However there exists workaround for that:
1 - right click on ProcessorExpert.pe node and select Open With -> Text Editor
2 - find the <Name>ProcessorExpert</Name> tags within <Header> section
3 - modify it to your name, e.g. main
4 - close and open the project
5 - start code generation to appear the main with your name
Processor Expert Support Team
It doesn't work.
When I finish step 4 -->Close and open the project. It seems nothing in the PE components after I open the project. My CodeWarrior is version CW10.4.
Did you make it work in your PC?
I tried Filip instructions and it worked ok for me (just with a warning about the use of "main" word, but I guess that is normal).
Did you save the file after editing?
If you do not see the components, from the CodeWarrior projects view right click on the respective ProcessorExpert.pe and select Open With -> Processor Expert.
IMPORTANT: Once you follow the steps and generate code, you have two files:
- main.c: This is the newly generated file, but does not contain any custom application code, you need to copy your own code from "ProcessorExpert.c"
- Processor Expert.c : This is the original file, which contains any code you had previously added. Copy the code to "main.c" and delete this file, or you will get a multiple main function definition error.
Hope this helps!
It works, I can get main.c now.
I put my project name instead of main.
Retrieving data ...