Where's the Object Code?

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

Where's the Object Code?

2,989 Views
BitGen
Contributor I
I'm using CW SE for Coldfire. I created my project from an empty project (not from the stationary). The project_DATA directory was automatically created, as were the \target subdirectory and the \Object Code sub-subdirectory. But the compiler is not putting anything in there. I am getting the executable in the \bin directory, as I have specified, so the compiler is creating the necessary data.
 
How do I tell CW to generate and keep the object code files?
 
Also, I want the disassembly of each C file to be created as well. How do I tell it to do that?
 
TIA, John
Labels (1)
0 Kudos
Reply
6 Replies

1,006 Views
stanish
NXP Employee
NXP Employee

Hi BitGen,

 

There is a pragma that you can use to turn the object files generation on in IDE based projects (default it's off)

 

#pragma store_object_files on

 

You can place this pragma e.g. into "Prefix text" ( project settings Alt+F7 -> "Language Settings" -> "C/C++ Preprocessor" -> "Prefix Text")

 

Stanish

0 Kudos
Reply

1,006 Views
CrasyCat
Specialist III

Hello

When you are building from the IDE, the object files are not physically stored on the disk.
They are stored in the .tdt file within the _Data directory.

This behavior cannot be changed. If you wish to keep object files, then you have to build your application from batch using a make file or a batch file.

I hope this helps. 

CrasyCat

0 Kudos
Reply

1,006 Views
BitGen
Contributor I

It's an answer but I'd be hard pressed to say it "helps". :smileytongue:

The debugger/ICE we're using functions much better with *.o files at hand (as proven by using their IDE for some examples.) It's going to be a compromise to disassemble each file to view some of the details. I would assume that full and pro versions do make the object code available as the default project creates the directories to hold the compiler output.

We chose the CW SE IDE because of the tight integration with the processor and fully integrated build tools. I may have to bounce back and forth between the two IDEs to have the best of both worlds.

Thank you for the response, even though it's not the answer I wanted.

0 Kudos
Reply

1,006 Views
CrasyCat
Specialist III

Hello

Well if you need the actual object files for your debugging I would use the IDE provided by the emulator vendor and build the application from batch using a make file. This way you can get the object file located where ever you want and you do not have to bounce between the two IDE.

Just a side note from my side. Our build tools are generated standard ELF DWARF binary files. This standard file format has been designed to store all information needed for debugging in the executable file. You may want to ask your emulator vendor why he needs the object files :smileywink:.

The professional edition of the software will work in the same way and will not populate the object files when you build from the IDE. That is the way the IDE is working internally and we cannot change that :smileysad:.  

CrasyCat

0 Kudos
Reply

1,006 Views
BitGen
Contributor I

Thanks for the reply.

The object code isn't necessary as much as expected. Debugging is possible using just the executable. As you state, the created application does contain all that is necessary.

The IDE from the on-chip debugger vendor is "flexible" (their word) and crude (my word). I'm trying not to switch because the learning curve would be steep and long.

Previous versions of CW did create the object code and placed it within the {project}_Data\{trarget}\Object Code. The directory is still created in the current versions but it's not used. I suggest the next version eliminate the auto generation of this directory. It's misleading.

0 Kudos
Reply

1,006 Views
CrasyCat
Specialist III

I am afraid you are confusing two tool chains.

Object files are available when you build for HC08 or HC12 target processor. They are not (and have never been) available when building for Coldfire.

It is another technology and the tools work differently :smileysurprised:

CrasyCat

0 Kudos
Reply