• AVR Freaks

Hot!Confusing XC8 list file output

Author
crosland
Super Member
  • Total Posts : 1696
  • Reward points : 0
  • Joined: 2005/05/10 10:55:05
  • Location: Warks, UK
  • Status: online
2019/01/19 03:09:56 (permalink)
0

Confusing XC8 list file output

I noticed 2.05 include optimisation up to level 2 so decided it was finally time to start porting some of my C18 projects. These include a bootloader. Being a cynical type I do not trust myself or the tools so, for the first pass, i am checking things in the list output.
 
The instruction addresses are all hex but branch targets are all listed in decimal.
 
Is there a way to change to all hex (I prefer hex address to decimal)?
 
The list file never includes the code at the reset vector, but there seems to code in the .hex.
 
#1

3 Replies Related Threads

    NorthGuy
    Super Member
    • Total Posts : 5817
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Confusing XC8 list file output 2019/01/19 13:58:23 (permalink)
    0
    Life would be so much easier if humans had 16 fingers on their hands, not 10 :)
    #2
    du00000001
    Just Some Member
    • Total Posts : 3244
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: Confusing XC8 list file output 2019/01/19 14:51:30 (permalink)
    0
    Seems to be time to create a microcontroller working in dec instead of hex  :)

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #3
    mad_c
    Super Member
    • Total Posts : 1206
    • Reward points : 0
    • Joined: 2010/12/12 17:48:27
    • Location: Brisbane, Australia
    • Status: offline
    Re: Confusing XC8 list file output 2019/01/20 16:52:23 (permalink)
    +1 (1)
    crosland
    The instruction addresses are all hex but branch targets are all listed in decimal.
     
    Is there a way to change to all hex (I prefer hex address to decimal)?

    Not that I can recall, but the assembly prints symbolic operands to any control flow instructions. The only exception would be if there was branches (etc) with destinations specified as literal addresses. Is there any reason why they would be used?
     

    The list file never includes the code at the reset vector, but there seems to code in the .hex.

    It does, but you have to look in the right file. The compiler produce one list file for each assembly file, it's just that with the OCG compiler, all the C source, including library source, is compiled in the one step and so there will be just the one assembly output and just one list file. However, the runtime startup code is partly defined by an assembly source file, startup.as, so it will get its own list file. This file will contain the reset code, but the bulk of the runtime startup code can be found in the main listing, under the symbol cinit.
     
    Jeff.
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5