I too am trying to get the assembler to produce a listing file.
I went to the Edit->YourProjectNameHere Settings and using the GUI, I select Target Settings Panel->ColdFire Assembler but the Generate Listing File checkbox is grayed out!
Is this a limitation of the special edition version of CodeWarrior for ColdFire V6.3 build 14 or simply a bug?
Hello
For CodeWarrior for Coldfire to get a listing file for a specific source file:
- Select the source file in the .mcp window
- Click on it with the right mouse button
- Select Disassemble from the drop down menu.
A new editor window should show up showing the disassembly listing.
You can adjust the content of the listing file using the "ELF Disassembler" panel.
I hope this help.
CrasyCat
hmmm...
I've looked at the disassembly function but it doesn't produce a standard assembly listing file.
Is there any way to invoke the assembler from a command line and, if so, are there other options available?
Scott
Code:
Assembly Source File Fragment_INIT_MBUS:;_READ_TEMPERATURE: CLR.B MBSR(A5) ;CLEAR STATUS REGISTER MOVEQ #$13,D0 ;DIVIDE 40MHz BY 480 = 83K33 ;DIVIDE 54MHz BY 480 = 112K5 MOVE.B D0,MFDR(A5) CLR.B MBCR(A5) ;RESET AND DISABLED MOVEQ #$80,D0 MOVE.B D0,MBCR(A5) ;ENABLE M-BUS MOVEQ #$A5,D0 ;ARBITRARY MASTER ADDRESS MOVE.B D0,MADR(A5) ;SET ADDRESS BSR.W _TX_A_W ;TRANSMIT ADDRESS:WRITE BNE.W NO_ACK ;ERROR 'Standard' Assembly Listing File 00000000 03 51 _INIT_MBUS: 00000000 03 52 ;_READ_TEMPERATURE: 00000000 03 422d 01ec 53 CLR.B MBSR(A5) ;CLEAR STATUS REGISTER 00000004 03 7013 54 MOVEQ #$13,D0 ;DIVIDE 40MHz BY 480 = 83K33 00000006 03 55 ;DIVIDE 54MHz BY 480 = 112K5 00000006 03 1b40 01e4 56 MOVE.B D0,MFDR(A5) 0000000a 03 422d 01e8 57 CLR.B MBCR(A5) ;RESET AND DISABLED 0000000e 03 7080 58 MOVEQ #$80,D0 00000010 03 1b40 01e8 59 MOVE.B D0,MBCR(A5) ;ENABLE M-BUS 00000014 03 70a5 60 MOVEQ #$A5,D0 ;ARBITRARY MASTER ADDRESS 00000016 03 1b40 01e0 61 MOVE.B D0,MADR(A5) ;SET ADDRESS 0000001a 03 6100 00ca 62 BSR.W _TX_A_W ;TRANSMIT ADDRESS:WRITE 0000001e 03 6600 00b6 63 BNE.W NO_ACK ;ERROR CodeWarrior's Dis-assembly FileAddress ObjectCode Label Opcode Operands Comment0x00000000 _INIT_MBUS:; INIT_MBUS:0x00000000 __start:; _start:0x00000000 _start:; start:0x00000000 0x422D01EC clr.b 492(a5)0x00000004 0x7013 moveq #19,d00x00000006 0x1B4001E4 move.b d0,484(a5)0x0000000A 0x422D01E8 clr.b 488(a5)0x0000000E 0x7080 moveq #-128,d00x00000010 0x1B4001E8 move.b d0,488(a5)0x00000014 0x70A5 moveq #-91,d00x00000016 0x1B4001E0 move.b d0,480(a5)0x0000001A 0x610000CA bsr.w *+204 ; 0x000000e60x0000001E 0x660000B6 bne.w *+184 ; 0x000000d6
The above is an example of assembly code, listing file and disassembly. Note that the disassembly loses the source comments and operand labeling, making it less than useful.
I gather that not too many of your users have as much legacy code written in assembler as I have. I need to carry this old code up into an environment supporting the c, c++, ethernet stacks, etc. I'm sure I'll be porting this legacy code over time as needed, but for now, if it ain't broke....
Thanks anyways,
Scott
Hello
You will not get exactly the output you are use to.
But if in the ELF disassembler panel you make sure "Show Source Code" and "Show Comments" are checked you get something as follows, which at least provides you with the comments and labels from the original source file.
Code:
; 105: asm_startmeup: ; 106: _asm_startmeup: ; 107: ; 108: move.w #0x2700,SR ;0x00000000 _asm_startmeup:; asm_startmeup:0x00000000 asm_startmeup:0x00000000 0x46FC2700 move #9984,sr;; 109: move.l #VECTOR_TABLE,d0 ;0x00000004 0x203C00000000 move.l #VECTOR_TABLE,d0;; 110: movec d0,VBR ; 111: ; 112: /* ; 113: * At power-on reset, the initial PC must be between 0-4K so that ; 114: * CS0 will assert for accesses to Flash. At this point, we need to ; 115: * clear the CS0 address mask and change the PC to the real Flash ; 116: * location of 0xFFE00000. This must be done before any branch or ; 117: * jump instruction is executed! ; 118: */ ; 119: ; 120: /* This is a ROM target, so we are always running in ROM ; 121: tst.l #___Running_in_ROM ; 122: beq new_addr ; 123: */ ;0x0000000A 0x4E7B0801 movec d,vbr;; 124: bra new_addr ;0x0000000E 0x60000024 bra.w *+38 ; 0x00000034;; 125: move.l #IMMaddr+1,d ;0x00000012 0x203C10000001 move.l #268435457,d0 ; '....';; 126: myopic d,MBAR ;0x00000018 0x4E7B0C0F movec d,mbar;; 127: move.l #IMMaddr,a0 ;0x0000001C 0x207C10000000 movea.l #268435456,a0 ; '....';; 128: move.l #0x20,d ;0x00000022 0x203C00000020 move.l #32,d0 ; '... ';; 129: move.l d,$44(a0) ;0x00000028 0x21400044 move.l d,68(a0);; 130: nop ;0x0000002C 0x4E71 nop ;; 131: jmp new_addr ; 132: ; 133: new_addr: ;0x0000002E 0x4EF900000034 jmp .text+104
Note that I get that with CodeWarrior Coldfire V6.x. I am not sure CodeWarrior for Coldfire V5.x has the same options available in the ELF Disassembler panel.
CrasyCat