Exact match. Not showing close matches.
PICList
Thread
'[PIC]: MPLINK memory error'
2002\07\30@191313
by
Richard Mellina
I am working on a project that has two object files that I need to link.
When I try MPLINK gives me an error:
section '.org_0' can not fit the absolute section. Section
'.org_0' start = 0x00000004, length = 0x000000e6.
The code is for the 16F628. so there are no pages. I know that the code is
much smaller than the 2K memory available on the 16F628. This is my first
project that uses MPLINK so its probably something simple. Thanks!
--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuT
mitvma.mit.edu
2002\07\31@113211
by
Richard Mellina
I still am having trouble! I removed all of the PROTECTED attributes from
the program memory section of the Linker Script File. I don't know what else
to do. Help!
{Original Message removed}
2002\07\31@115036
by
Jennifer L. Gatza
> I still am having trouble! I removed all of the
> PROTECTED attributes from
> the program memory section of the Linker Script File. I don't
> know what else
> to do. Help!
There are only 4 addresses between your reset vector and your interrupt
vector. Your code won't fit there. There is just enough room for you to
insert a GOTO statement.
Then, before starting your made code section, be sure to insert another CODE
directive so that the assembler inserts your code in the correct block
(i.e., not in the interrupt location)
When using MPLINK, use CODE instead of ORG
Try something like this:
RESET_VEC CODE 0x000000
GOTO START
INT_VEC CODE 0x000004
GOTO ISR
CODE ;make sure you put this in!
START ;your code here
Hope this helps!
Jen
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2002\07\31@115709
by
Jennifer L. Gatza
> Then, before starting your made code section,
^^^^
"main" code oops
It always pays to read your post *before* sending it :)
Jen
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2002\07\31@131725
by
Richard Mellina
Thanks for the response. This is how the code looks now:
reset code 0x00000
goto start
isr code 0x000004
.
.
retfie
prog code
start
.
.
goto main
end
When I build MPLINK gives me the error:
section 'isr' can not fit the absolute section. Section 'isr' start =
0x00000004 length = 0x00000012.
I don't understand this because the 'prog' section is relocatable. Any help
would be greatly appreciated. Thanks!
{Original Message removed}
2002\07\31@134121
by
Jennifer L. Gatza
Try this
isr code 0x000004
goto isr_handler ;create a separate label for isr
prog code ;then continue as usual
.
.
isr_handler ;place isr_handler with program code
Again, the ISR section will not fit within the allocated code block. Enter
a goto instruction, and put isr_handler in the program code section.
> isr code 0x000004
> .
> .
> retfie
> section 'isr' can not fit the absolute section.
> Section 'isr' start =
> 0x00000004 length = 0x00000012.
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2002\07\31@142725
by
Richard Mellina
Thanks! That did the trick. I realize now that you suggested that in your
first email. Sorry I missed it.
{Original Message removed}
2002\07\31@162659
by
Olin Lathrop
> reset code 0x00000
> goto start
> isr code 0x000004
> .
> .
> retfie
>
> prog code
> start
> .
> .
> goto main
> end
I didn't see the beginning of this thread (was on vacation), but that looks
fine to me.
> When I build MPLINK gives me the error:
>
> section 'isr' can not fit the absolute section. Section 'isr'
start =
> 0x00000004 length = 0x00000012.
>
> I don't understand this because the 'prog' section is relocatable. Any
help
> would be greatly appreciated. Thanks!
This looks like a problem with the linker control file. Here is the linker
control file I use for the 16F628:
// Linker control file for the PIC 16F628 processor.
//
CODEPAGE NAME=config START=0x2007 END=0x2007 //special processor config word
CODEPAGE NAME=code0 START=0 END=0x7FF //code page 0
DATABANK NAME=bank0 START=0x20 END=0x6F //register bank 0
DATABANK NAME=bank1 START=0xA0 END=0xEF //register bank 1
DATABANK NAME=bank2 START=0x120 END=0x14F //register bank 2
SHAREBANK NAME=globalram START=0x70 END=0x7F PROTECTED //global regs, bank
0
SHAREBANK NAME=globalram START=0xF0 END=0xFF PROTECTED //global regs, bank
1
SHAREBANK NAME=globalram START=0x170 END=0x17F PROTECTED //global regs, bank
2
SECTION NAME=.udata_shr RAM=globalram //global memory mapped to all pages
SECTION NAME=.BANK0 RAM=bank0 //for registers explicitly in bank 0
SECTION NAME=.BANK1 RAM=bank1 //for registers explicitly in bank 1
SECTION NAME=.BANK2 RAM=bank2 //for registers explicitly in bank 2
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
More... (looser matching)
- Last day of these posts
- In 2002
, 2003 only
- Today
- New search...