• AVR Freaks

Hot!16f1455, xc8 and strange idloc address

Author
_angelo_
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2018/10/29 07:23:07
  • Location: 0
  • Status: offline
2019/07/07 06:59:01 (permalink)
0

16f1455, xc8 and strange idloc address

Hi all,
have a quite small firmware app on this PIC, compiling with xc8, once programmed PIC all works.
 
 
But, in the final HEX, i see a strange "idloc" space of 8bytes from 0x10000 to 0x10007.
 
:020000040001F9
:080000000000000000000000F8
 

### HEXMate logfile and output summary ###
### Memory Usage ###
Unused memory ranges:
0h - 3FFh
406h - 407h
1000h - 102Bh
2034h - 2947h
32B4h - FFFFh
10008h - 1003Fh
 
bin/usbioc.hex ranges:
400h - 405h
408h - FFFh
102Ch - 2033h
2948h - 32B3h
10000h - 10007h   <----------------------------------
 

Linker command line:

-W1 --edf=/opt/microchip/xc8/v2.05/pic/dat/en_msgs.txt -cs \
  -h+bin/usbioc.sym --cmf=bin/usbioc.cmf -z -Q16F1455 -o/tmp/xcXw0e3gv \
  -Mbin/usbioc.map -E1 -ver=XC8 -ASTACK=021D0h-0226Fh -pstack=STACK \
  -ACODE=0200h-07FFh,0800h-0FFFhx2,01800h-01F7Eh -ASTRCODE=0200h-01F7Eh \
  -ASTRING=0200h-02FFhx29,01F00h-01F7Eh \
  -ACONST=0200h-02FFhx29,01F00h-01F7Eh -AENTRY=0200h-02FFhx29,01F00h-01F7Eh \
  -ACOMMON=070h-07Fh -ABANK0=020h-06Fh -ABANK1=0A0h-0EFh \
  -ABANK2=0120h-016Fh -ABANK3=01A0h-01EFh -ABANK4=0220h-026Fh \
  -ABANK5=02A0h-02EFh -ABANK6=0320h-036Fh -ABANK7=03A0h-03EFh \
  -ABANK8=0420h-046Fh -ABANK9=04A0h-04EFh -ABANK10=0520h-056Fh \
  -ABANK11=05A0h-05EFh -ABANK12=0620h-064Fh -ABIGRAM=02000h-023EFh \
  -ARAM=020h-06Fh,0A0h-0EFh,0120h-016Fh,01A0h-01EFh,0220h-026Fh,02A0h-02EFh,0320h-036Fh,03A0h-03EFh,0420h-046Fh,04A0h-04EFh,0520h$
  -AABS1=020h-07Fh,0A0h-0EFh,0120h-016Fh,01A0h-01EFh,0220h-026Fh,02A0h-02EFh,0320h-036Fh,03A0h-03EFh,0420h-046Fh,04A0h-04EFh,0520$
  -ASFR0=00h-01Fh -ASFR1=080h-09Fh -ASFR2=0100h-011Fh -ASFR3=0180h-019Fh \
  -ASFR4=0200h-021Fh -ASFR5=0280h-029Fh -ASFR6=0300h-031Fh \
  -ASFR7=0380h-039Fh -ASFR8=0400h-041Fh -ASFR9=0480h-049Fh \
  -ASFR10=0500h-051Fh -ASFR11=0580h-059Fh -ASFR12=0600h-061Fh \
  -ASFR13=0680h-06EFh -ASFR14=0700h-076Fh -ASFR15=0780h-07EFh \
  -ASFR16=0800h-086Fh -ASFR17=0880h-08EFh -ASFR18=0900h-096Fh \
  -ASFR19=0980h-09EFh -ASFR20=0A00h-0A6Fh -ASFR21=0A80h-0AEFh \
  -ASFR22=0B00h-0B6Fh -ASFR23=0B80h-0BEFh -ASFR24=0C00h-0C6Fh \
  -ASFR25=0C80h-0CEFh -ASFR26=0D00h-0D6Fh -ASFR27=0D80h-0DEFh \
  -ASFR28=0E00h-0E6Fh -ASFR29=0E80h-0EEFh -ASFR30=0F00h-0F6Fh \
  -ASFR31=0F80h-0FEFh -preset_vec=0200h,intentry=0204h,init,end_init \
  -ppowerup=CODE -pcinit=CODE -pfunctab=ENTRY -ACONFIG=08007h-08008h \
  -pconfig=CONFIG -DCONFIG=2 -AIDLOC=08000h-08003h -pidloc=IDLOC -DIDLOC=2 \
  -DCODE=2 -DSTRCODE=2 -DSTRING=2 -DCONST=2 -DENTRY=2 -k bin/startup.o \
  bin/usbioc.o
 
map file shows
  Name    Link     Load   Length Selector   Space Scale
idloc 008000 000004 008004 10000 0 IDLOC 2
 
__Hidloc                                  idloc                                  08004
 

 
IDLOC offsets for this mcu, from datasheet, are from 0x8005/0x8006 while 0x10000 in the memory map is not existing.
 
FW works anyway, so it does not harm.  
 
If any hint, welcome.
 
Regards
Angelo
 
 
#1

3 Replies Related Threads

    1and0
    Access is Denied
    • Total Posts : 9461
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: 16f1455, xc8 and strange idloc address 2019/07/07 10:33:37 (permalink)
    +2 (2)
    _angelo_
    But, in the final HEX, i see a strange "idloc" space of 8bytes from 0x10000 to 0x10007.
     
    :020000040001F9
    :080000000000000000000000F8
     
     
    ...
     IDLOC offsets for this mcu, from datasheet, are from 0x8005/0x8006 while 0x10000 in the memory map is not existing.

    Your PIC device has four User ID locations from 0x8000-0x8003.  Hex file is byte addressable; i.e. addresses in hex file are double that of PIC16 program memory word addresses.  In this case, byte-addresses are 0x10000 - 0x10007.
    post edited by 1and0 - 2019/07/07 10:36:16
    #2
    ric
    Super Member
    • Total Posts : 23160
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: 16f1455, xc8 and strange idloc address 2019/07/07 13:18:40 (permalink)
    +2 (2)
    As above.
    The step you missed is that PIC16F devices have 14 bit memory, so it takes two bytes in the hex file to store each 14 bit word, so all the addresses in the hex file are double what they are in the PIC.
    That's what 1and0 means by "hex file is byte addressable".
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    _angelo_
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2018/10/29 07:23:07
    • Location: 0
    • Status: offline
    Re: 16f1455, xc8 and strange idloc address 2019/07/08 07:42:06 (permalink)
    0
    Thanks for the help, very clear.
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5