Discussion Forum

LX51 and Disassembly Output File

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
David Erbas-White
Posted
6-Jul-2002 02:22 GMT
Toolset
C51
New! LX51 and Disassembly Output File
I recently upgraded from DK51 to PK51, one of the big reasons was the new 'disassembly output file' option.

However, I can't for the life of me figure out how to get this to work when using ONLY assembler files.

I have a project (and I re-made it from scratch) containing my assembly source files. I have checked the 'pack' option in 'C' (I note that this doesn't relate to assembly files). I have enabled the generation of the '.cod' file. But no '.cod' file is generated!

It appears (I'm guessing) that only if the object file indicates that packing was done, is the '.cod' file made, but since there is no documentation, I don't know for sure.

How can one generate a '.cod' file from a project that is using only Assembly, not C?

Any help is appreciated.

David Erbas-White
Read-Only
Author
Andrew Neil
Posted
6-Jul-2002 19:54 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
See this article, http://www.keil.com/support/docs/148.htm, which Jon Ward cited in the previous Thread
http://www.keil.com/forum/docs/thread1657.asp
Read-Only
Author
David Erbas-White
Posted
6-Jul-2002 20:18 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
But that's exactly my point! I have followed the directions given in the article, and no '.cod' output is produced!

I have enabled the packing, and I have enabled the creation of the '.cod' file, and there IS NOT OUTPUT of a '.cod' file!

There is apparently some information that is given to the linker in order to create the file, but in an all assembly project, I can't figure out what it is!

Again, the option for enabling the packing apparently relates to '.C' files, but I have enabled it anyway (even though I'm not using C). I have also enabled the option to produce the '.cod' file. But it is not generated!

When a look at CSAMPLE file (which I can get to produce the .cod file), I don't see any additional parameters that are given to the LX51 linker, which makes me think that there is something in the .OBJ file which causes the .COD file to be generated.

I have also tried getting the CSAMPLE program to produce .SRC files, and then assemble those, but the compiler bombs when I do this.

Please, any further information on how the '.cod' file can be generated would be appreciated. The message referred to is just about the only documentation for this, and it isn't working!

David Erbas-White
Read-Only
Author
Jon Ward
Posted
7-Jul-2002 18:16 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
What device are you using?

Jon
Read-Only
Author
David Erbas-White
Posted
7-Jul-2002 18:41 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
This project is targeted for a Dallas 80C323. Does this make a difference for the disassembly generation? In other words, must it be one of the 'extended' variants in order for the disassembly listing to be output?

Again, thanks for comments.

David Erbas-White
Read-Only
Author
Jon Ward
Posted
8-Jul-2002 17:17 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
Hmmm.

I just tried a project using the DS323 and it generated the .COD file just fine.

Did you set a special folder for the listing files? If so, the .COD file will be stored there.

Jon
Read-Only
Author
Peter Dean
Posted
8-Jul-2002 08:18 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
David
It seems almost certain to me that you have already guessed the right answer.

"It appears (I'm guessing) that only if the object file indicates that packing was done, is the '.cod' file made, but since there is no documentation, I don't know for sure."

See the following reply Keil support provided me with on the problem of the fact that linker code packing only works for c source files.

"The Linker Code Packing optimization requires the OBJECTADVANCED format
that is currently only available with the C51 Compiler.
Details are explained under: http://www.keil.com/support/docs/2297.htm.

Refer also to the Cx51 User's Guide, Chapter 2, OBJECTADVANCED."

The user manual information on objectadvanced is revealing. Objectadvanced instructions the compiler to include information in the object file for linker-level program optimization.
Read-Only
Author
Jon Ward
Posted
8-Jul-2002 17:14 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
Note that in the original knowledgebase article...

In C51 Version 6.23 and higher, the LX51 Linker can create a .COD file which contains the complete program source/assembly listing. All addresses are listed and fixed-up. You may enable this listing file from in uVision2 from Project Options - Listing - Linker Code Listing. Note that the Linker Code Packing optimization must be enabled for the Linker Code Listing option to be available.

Jon
Read-Only
Author
David Erbas-White
Posted
8-Jul-2002 17:49 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
Yes, I have done that, but as my project is all assembly files, this appears to have absolutely no effect.

Let me re-word the question: how can I turn on the OPTIMIZEADVANCED for the Assembler? This appears to be the only way for the object files generated by the Assembler to be recognized by the linker as needing to generate the disassembly output file.

David Erbas-White
Read-Only
Author
Mathias Neuhaus
Posted
10-Jul-2002 11:44 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
Hi David,

try to include a dummy "C" source-file.
(This trick used to help for code / data overlay optimizations by the linker; may be it works for other linker optimizations as well.)


bis die Tage...
  Mathias
Read-Only
Author
Peter Dean
Posted
11-Jul-2002 08:46 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
Let me re-word the question: how can I turn on the OPTIMIZEADVANCED for the Assembler? This appears to be the only way for the object files generated by the Assembler to be recognized by the linker as needing to generate the disassembly output file.

Let me repeat the reply I obtained from Keil support.

The Linker Code Packing optimization requires the OBJECTADVANCED format
that is currently only available with the C51 Compiler.

Only C51 means not AX51 or A51.

try to include a dummy "C" source-file

From my experience (experiments with the Keil Measure example) this will give linker code packing (& I presume disassembler listing) of the C portions of the code but not the assembler portions. Logically since objectadvance cannot be set in the assembler.

Perhaps also obviously this thread is I guess being followed by those who would like these features in the assembler.
Read-Only
Author
Andrew Neil
Posted
11-Jul-2002 09:06 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
"...obviously this thread is I guess being followed by those who would like these features..."

And this Thread:
http://www.keil.com/forum/docs/thread1657.asp

I can't really see why the disassembler output should depend on any linker, assembler or compiler options; after all, the debugger manages it.
All we want is a proper source+assembler listing - "LPP that works"
Just making the debugger's disassembler available and printable would do it!
Read-Only
Author
Keil Support Intl.
Posted
18-Jul-2002 09:19 GMT
Toolset
C51
New! RE: LX51 and Disassembly Output File
uVision2 V2.31 (part of C51 V7.01, C251 V3.51 and C166 V4.23) supports now finally copy and paste in the disassembly window for large portions. In this way you can copy the content to an editor window and print it.

Next Thread | Thread List | Previous Thread Start a Thread | Settings