• AVR Freaks

Hot!PIC184550 deleting bootloader part from a project

Author
bindella
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/12/18 09:22:33
  • Location: 0
  • Status: offline
2020/09/24 06:51:11 (permalink)
0

PIC184550 deleting bootloader part from a project

Hi,in c18 compiler of pic18f44550 project I need to delete a bootloader part from a project just to flash the entire project directly.
The old project has a boot part from 0x0 to 0x7FF and interrupts were located from 0x800 istead of 0x000.
In order to do that I just changed two different scripts, the Linker script and the main.c where the interrupts were remapped.
This is the change in the linker script:
(p18f4550.lkr changes)
New linker script:
CODEPAGE   NAME=vectors    START=0x0             END=0x29      PROTECTED
CODEPAGE   NAME=page       START=0x2A             END=0x7FFF
This is the old linker script:
CODEPAGE   NAME=boot       START=0x0               END=0x7FF        PROTECTED
CODEPAGE   NAME=vectors    START=0x800             END=0x829      PROTECTED
CODEPAGE   NAME=page       START=0x82A             END=0x3FFF


I just commented the old remapping of interrupts in the main and shifted the starting location to the standard location:
(main.c changes)
/*
#define REMAPPED_RESET_VECTOR_ADDRESS 0x800
#define REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS 0x808
#define REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS 0x818
*/
#define REMAPPED_RESET_VECTOR_ADDRESS 0x000
#define REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS 0x08
#define REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS 0x018

#pragma code REMAPPED_RESET_VECTOR = REMAPPED_RESET_VECTOR_ADDRESS

extern void _startup( void );        // See c018i.c in your C18 compiler dir
void _reset( void )
{
    _asm goto _startup _endasm

}
 
When I try to compile the new project this is the error i get:
Error - section '_entry_scn' can not fit the absolute section. Section '_entry_scn' start=0x00000000, length=0x00000006
Errors    : 1


It seems that the reset doesn't fit in the new location but it should (is the same size as before).
What I'm doing wrong?
#1

2 Replies Related Threads

    Danno
    Super Member
    • Total Posts : 289
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: PIC184550 deleting bootloader part from a project 2020/09/29 13:50:57 (permalink)
    0
    The linker script mods look correct.  Did you also remove the bootloader code?
    #2
    bindella
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2019/12/18 09:22:33
    • Location: 0
    • Status: offline
    Re: PIC184550 deleting bootloader part from a project 2020/09/30 10:01:15 (permalink)
    0
    The project is divided in two part: Boot firmware and User firmware. I'm now trying to change only the user project in order to be standalone and directly write the pic.
    There is no file or section i can find that refers to a bootloader code in user firmware. It should be?
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5