• AVR Freaks

Hot!any simple way to see compiled asm output ?

Author
Brane2
Senior Member
  • Total Posts : 175
  • Reward points : 0
  • Joined: 2011/09/29 19:56:29
  • Location: Ljubljana, Slovenia
  • Status: offline
2018/11/01 08:54:27 (permalink)
0

any simple way to see compiled asm output ?

I opened a new empty project from PIC32MM0256GPM064 + xc32 and I wanted to see what exactly compiler does to fullfill configuration pragmas, so I could roll my own project in assembler if need be.
 
In order to do that I'd need to compile sources to generated assembly, without going the full way to ELF binaries and linking step.
 
I'm not that familiar with Windows that I am using at the moment, so I can't just flip into command line nor do I feel comfortable messing with project makefiles. Is there a simple way of doing this from an IDE itself ?
 
#1

3 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 6024
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: online
    Re: any simple way to see compiled asm output ? 2018/11/01 09:23:47 (permalink)
    4 (1)
    On my pc I see an assembly example to set the config bits "C:\Program Files (x86)\Microchip\xc32\v2.10\examples\assembly_examples\setup_configbits\src"
    #2
    Jim Nickerson
    User 452
    • Total Posts : 6024
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: online
    Re: any simple way to see compiled asm output ? 2018/11/01 09:46:53 (permalink)
    0
    To specifically answer your question add "-S" option to gcc
     

    Attached Image(s)

    #3
    Jim Nickerson
    User 452
    • Total Posts : 6024
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: online
    Re: any simple way to see compiled asm output ? 2018/11/01 09:51:19 (permalink)
    3 (1)
    I created a new project in MpLab X 5.05 , Microchip Embedded, Standalone project
    I opened Mcc to generate a default app
    I added "-S" to xc32-gcc additional options
    The build failed but the .o files were generated
    I looked at mcc.o

    # Microchip Technology PIC32 MCU configuration words
    # Configuration word @ 0xbfc017d8
     .section .config_BFC017D8, code, keep, address(0xBFC017D8)
     .type __config_BFC017D8, @object
     .size __config_BFC017D8, 4
    __config_BFC017D8:
     .word 0xFFFFFFFF
    # Configuration word @ 0xbfc017d4
     .section .config_BFC017D4, code, keep, address(0xBFC017D4)
     .type __config_BFC017D4, @object
     .size __config_BFC017D4, 4

     
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5