This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cross compilation problem

I have a project in uVision4 and I want to be able to use Microsoft Visual Studio to build the same project(cross compilation). So I need both projects to generate the same hex file and almost the same map file(the size of ROM and RAM must match).
What could be the reason that i get different hex files? When using uVision4 the size of the code (according to the map file) is smaller than the code generated when using Visual Studio.
Btw I'm compiling for ARM7.
It looks to me that I have the same parameters passed to the compiler and linker as it is in the uVision project, but the output file is still larger when using Visual Studio(and using command-line options). What is the difference when using uVision, what am I missing?

Parents Reply Children
  • The top of the listing line shows the complete set of options used.

    Start by checking those!

    You could also check the preprocessor listings - to make sure that you're not getting different inlcudes, or suchlike.

    Also check that uVision isn't doing some kind of iterative optimisation/rebuild that you're omitting with VS...

  • You are right, Andy.
    I've just found that uVision uses feedback file. When I tried using it in VS, it gave me the bigger code section and I removed it again. But now I read that the second build will actually use the feedback file, the first time I built it, it just generated the file.
    So now it is ok.
    Thank you all