Create identical executable with command line and IDE

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

Create identical executable with command line and IDE

436 Views
mikeberggren
Contributor I

I'm trying to create an identical executable using both the CodeWarrior IDE 5.9 and command line for MPC5554. I've been using this guide to help: http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/CWMCURS08CMPREF.pdf?fsrch=1.

 

I'm using the checksum as given by the s19 file as the standard for comparison. As far as I can tell I have all the corresponding command-line and IDE compile/link options the same, but the checksum doesn't come out the same. There may very well be some hidden option that I'm missing. But before I dig too much deeper, does anyone know if this is even possible? It appears to me that the IDE doesn't use the same compiler or linker executable that you use from the command line, so I'm a bit skeptical.

 

Alternately, if anyone knows where I can find the object code that is produced by the IDE, that could be useful as well assuming I can grab it and link it via command line. I've searched all over for it, but they've hidden it pretty well.

 

If you're wondering why I care that they're exactly identical, it's because it's a safety-critical application and I'm required to get full object code coverage on each object file. To do this I need to link a test script to each object file to give it the proper input vectors to meet coverage.

 

Thanks!

 

Mike

Labels (1)
0 Kudos
2 Replies

254 Views
trytohelp
NXP Employee
NXP Employee

Hi,

In the past I've worked on a sample project.

The rule was to generate the same application/code with IDE and command line tool.

In the \CW for MPC55xx and MPC56xx 2.10\Help\PDF\AN4094.Build Tools Settings - IDE vs Cmd Line.pdf, you will find more information.

Attached you win find an example.

Under \test\ there is the test.mcp file.

Edit the Test.bat file and change it according to your installation path.

This example has been created according to the AN4094.Build Tools Settings - IDE vs Cmd Line.pdf doc.

Hope this will help you.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

254 Views
mikeberggren
Contributor I

Answering my own question.

I've continued experimenting and I've gotten a solution to work, at least for my code.

I had to fix 3 things to make it work.

  • Made sure all the equivalent compiler and linker options were used via the guide linked in the original post.
  • Made sure both command line and IDE were using the same linker command file
  • Made sure the object files were linked in the same order for both IDE and command line. I'm not sure how the IDE decides the order to link in. But I figured it out by looking at the MAP file output during the build process. Then I order the object file arguments to the command line in the same way.
0 Kudos