• AVR Freaks

Hot!Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x000000

Page: 12 > Showing page 1 of 2
Author
CptClinac
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2020/10/24 17:20:50
  • Location: 0
  • Status: offline
2020/10/27 00:54:55 (permalink)
0

Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x000000

Hi guys,
Linker error as above causing problems.
I'm new to forum but been microchipping for years.
Existing project that runs well. Just did a tiny mod. (Changed 1 variable) and rebuilt et voila.
.LST file shows programme assembled properly (just inside x7ff limit.
Source files very long so reluctant to attach to post.
Old_School = .TRUE.  -- code written absolute not relocatable.
Written in assembler.
No linker scripts.
No .org_3 directive.
 
Puzzled.
 
Since previous assembly had to reinstall windows (and reinstall and update IDE).
 
Any thoughts???
Thanks
Dave
#1

23 Replies Related Threads

    mbrowning
    USNA79
    • Total Posts : 1822
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 08:59:22 (permalink)
    +1 (3)
    Sorry, my telepathy isn't strong enough to determine which of thousands of part numbers in ~10 different processor families you think fits best in the "MPLAB X IDE" forum or which compiler/assembler and version you are using.
    #2
    ric
    Super Member
    • Total Posts : 28941
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 12:10:58 (permalink)
    +1 (1)
    The "x7ff" limit comment makes me think this is a PIC16F device.
    I agree, actually naming the device, and exactly which IDE is being used, would be helpful.
    It can't be the latest IDE, as that no longer includes MPASM, which is presumably the assembler in question.
     

    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
    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 12:22:18 (permalink)
    +1 (1)
    CptClinac
    Old_School = .TRUE.  -- code written absolute not relocatable.
    Written in assembler.
    No linker scripts.
    No .org_3 directive.
     
    Puzzled.
     
    Since previous assembly had to reinstall windows (and reinstall and update IDE).
     
    Any thoughts???

    MPLAB X defaults to relocatable mode. Go to Project Properties and select "build in absolute mode".
     
    #4
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 12:24:16 (permalink)
    +1 (1)
    Sorry guys, My bad.
    I posted in wrong forum. MPLAB IDE v8 not the X rated version.
    But for completeness 6F684 processor.
     
    Thanks for putting me on the straight and narrow again.
    Dave
    #5
    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 12:32:57 (permalink)
    0
    CptClinac
    I posted in wrong forum. MPLAB IDE v8 not the X rated version.
    But for completeness 6F684 processor.
     
    Thanks for putting me on the straight and narrow again.

    I take that it was set to relocatable mode, because that error message is of relocatable mode. ;)
    #6
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 12:55:59 (permalink)
    0
    Ahhh,  No it was set to absolute.
     
    And a typo too 16f684 not 6f684 (Never come across a 6 bit architecture ;)
     
    Project is under maintenance only so not keen on learning new environment.
    Thanks for your thoughts.
    Dave
     
     
    #7
    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 13:23:59 (permalink)
    +1 (1)
    CptClinac
    Ahhh,  No it was set to absolute.

    I don't think so. You said your code is written in absolute mode.  But your "Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x000000" __IS__ a relocatable mode error message, which can only occur when MPLAB is set to relocatable mode.
     
    CptClinac
    And a typo too 16f684 not 6f684 (Never come across a 6 bit architecture ;)

    16F684 is neither a 16-bit architecture. ;)
     
    post edited by 1and0 - 2020/10/27 13:29:38
    #8
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 15:56:45 (permalink)
    +1 (1)
    Agreed with both statements. 16/8 is not 16bit architecture and the error IS relocatable.
    But IDE IS set to absolute mode. Why does the linker think it is not in absolute mode?
    Assembler did build project in absolute mode. LST file shows all stuff is OK.
     
    PS ;)  please be kind, I didn't really claim 16F was 16bit. I joked about a 6F being 6bit architecture. Here's a curly one for you to think about. Is (was) the PDP8s true 12 bit architecture. It had a serial bus inside - so is it 1 bit or 12 bit??
    My thoughts with this one are "if you can legitimately claim that doing 32bits in 4x8 bits sequentially is 8 bit then doing 12bits serially can be claimed to be only 1 bit architecture".
    Those were the days. PDP8serial  nicknamed PDP8slow. 4k core memory. Try writing anything that fits into 4k.
    Sorry, I'm showing my grey hairs.   :)
    Dave
    post edited by CptClinac - 2020/10/27 16:01:53
    #9
    ric
    Super Member
    • Total Posts : 28941
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 16:12:33 (permalink)
    0
    As I recall, the linker doesn't get called at all for absolute projects.
    Can you confirm that only a single ASM file appears under "Source files" in the Project window?
     

    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!
    #10
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 16:18:05 (permalink)
    0
    Yes, only one .ASM  There are several .INCs which also contain code segments but there is only one ASM
    Thanks
    Dave
    #11
    ric
    Super Member
    • Total Posts : 28941
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 16:23:31 (permalink)
    0
    And what about under:
    Project | Build options... | Project | MPASM/C17/C18 Suite
    Which radio button is selected in the "Single File Assembly Projects" box?
     

    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!
    #12
    dan1138
    Super Member
    • Total Posts : 3990
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 16:37:11 (permalink)
    0
    ric
    As I recall, the linker doesn't get called at all for absolute projects.
    Can you confirm that only a single ASM file appears under "Source files" in the Project window?

    The latest versions of MPASM will invoke the linker for an absolute mode build.
    I seem to recall that MPASM v5.22 was the last version that did not.
    #13
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 16:38:31 (permalink)
    0
    "Generate absolute code"
     
    #14
    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 19:08:34 (permalink)
    +1 (1)
    CptClinac
    Source files very long so reluctant to attach to post.

    Your relocatable error message means there are three ORG directives located _before_ the ORG 0x0000 line. If you can post a minimal source code (like the first portion up to a few lines after ORG 0x0000) that generates this error message, we'll be able to get to the bottom of thing.
    #15
    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 19:28:19 (permalink)
    0
    This
            list p=16f684
            org    0x100
            org    0x200
     
            org     0
            nop
     
            org     0
            goto    $
            end

    generates this

      Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00000000, length=0x00000002

    in relocatable mode, and it generates this

      Error[118] 9 : Overwriting previous address contents (0000)

    in absolute mode.
    #16
    PStechPaul
    Super Member
    • Total Posts : 2973
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 19:39:23 (permalink)
    -1 (1)
    Why do you have two "org 0" statements with different code?

     
    #17
    1and0
    Access is Denied
    • Total Posts : 11501
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 19:54:11 (permalink)
    +1 (1)
    PStechPaul
    Why do you have two "org 0" statements with different code?

    To generate the same assembly error message that OP got. ;)  They can be the same code too.
     
    #18
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/27 21:31:23 (permalink)
    0
    ARGH!
    Found an .org in a include file (all the text stuff) and moved it to the end and lo and behold the .org_3 changed to .org_2
    This is promising.
    Will dig further.
     
    Thanks
    Dave
    #19
    CptClinac
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2020/10/24 17:20:50
    • Location: 0
    • Status: offline
    Re: Error - section '.org_3' can not fit the absolute section. Section '.org_3' start=0x00 2020/10/28 00:26:06 (permalink)
    0
    Managed to drop the .org_count to 1 by commenting out the p16f684.inc line. Moved definitions to end of file.
    There is an .org (or similar) for the config byte
    But
    ;
    ;
    .org 0
    nop
    .org 4
    nop     ; just a whole lot of wasted space
    …        ; right through the available memory
    nop     ; up to x5ff is OK
    NOP    ; BUT put an extra nop at x600 and you get the linker error.
    END
    bombs out when 5ff memory exceeded. chip is good for 7ff
     
    Dave
     
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5