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?
Hello Rabbit:
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
http://mcuoneclipse.com/2012/03/23/disable-my-code-generation/
Hope this is useful!
Regards!
Jorge_Gonzalez
Hello,
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
Best regards
Vojtech Filip
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?
Hello:
I tried Filip instructions and it worked ok for me :smileycheck: (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.
:smileyalert: 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!
/Jorge Gonzalez