This is turning into an endless debate and I am not sure what are we trying to achieve. The idea of my previous posts is simple: there is no obvious compiler bug there for you to worry about.
>>You say: "but this is not entirely wrong", so is it a little wrong?
As far as I see PE needs to run some initialization prior to the standard startup code, namely some register initialization, which have to happen at startup time (for instance the MMCTL settings). They probably chose this solution in order not to patch the startup code itself, I can only speculate.
>>I know is kind of hacking but it has to be limited.
I'm not arguing this. I'm only saying that there are times when you need to.
>>Processor Expert should provide full Hardware Abstract Layer, where is place for hacking here
I can't think of any other way of executing code before the main function call other than customizing the startup code or having it replaced altogether.
>>I think is misunderstood each other if you encourage people to hacking.
I don't encourage hacking. However, there are situations when you have to go and customize your startup code, and then it is a good thing you can actually do that. Freescale provides libraries with all the source code precisely for this purpose. You can customize the startup code and even the library if you need to, for instance compile it with different compiler options.
>>I am buying tools to do for me all "hacking job", I want to write Ansi C code. That's all my needs.
You don't have to write anything else but ANSI code yourself. If you are questioning the quality of the PE-generated code, I am not an expert here. The only comment I can make is that I find it understandable that they do not support any permutation of the compiler options. This would be a huge (not even sure ever possible) validation overhead.
Also, if you have your mind set on saying these tools are no good, there is litte I can do about that other than what I already said. There are compiler bugs, there is no question about that, some of which documented as known bugs in the release notes. But none seems to directly affect your work. Just my My .02c.