Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6244793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:23:23+00:00 2026-05-24T12:23:23+00:00

I have a linker script which starts INCLUDE 18f14K50_g.lkr I want my interrupt service

  • 0

I have a linker script which starts

    INCLUDE 18f14K50_g.lkr

I want my interrupt service variables to go into the ACCESS bank. (My program’s so small at the moment the whole lot can, but maybe in future…). So

    SECTION     NAME=VarsModemISR   RAM=accessram

which results in:

MPLINK 4.39, Linker
Device Database Version 1.1
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - section 'VarsModemISR' has a memory 'accessram' which is not defined in the linker command file.
Errors    : 1

Examining the included file I believe it is. Either that or I’m working in extended mode and “gpre” is. I can use an #IFDEF to check, which I tried. The result, it was trying to use “accessram” not “gpre”.

Maybe if I try defining the access bank explicitly by copying the line from the include file:

ACCESSBANK NAME=accessram  START=0x0               END=0x5F
SECTION     NAME=VarsModemISR   RAM=accessram

This results in the error

MPLINK 4.39, Linker
Device Database Version 1.1
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - duplicate definition of memory 'accessram' 
Errors    : 1

Which has me confused. According to the Assembler/Linker documentation I use SECTION with the RAM option, where RAM has previously been declared using ACCESSBANK, SHAREBANK or DATABANK. It should work.

Thanks
– Richard

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:23:24+00:00Added an answer on May 24, 2026 at 12:23 pm

    There is really no need to change linker script, use default one!

    Accessed file registers are available at any moment under PIC18 MCPUs.
    Just declare variables in appropriate memory databank named ACCESSBANK which start at 0x00 and end at 0x60 address.

    If you are using MPLAB than declare:

    _Shared        udata_acs        0        ;Shared memory file registers
    IntReg1        res              1
    IntReg2        res              1
    ;...
    
    _UpperBank0    udata            060h     ;Banked file memory registers
    RegA           res              1
    ;...
    
    _Bank1         udata            0100h    ;Banked file memory registers
    N              res              1
    ;...
    

    Linker should automatically set the ‘a’ bit in code instruction for file register addresses, which are declared in ACCESSBANK.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Greasemonkey script which operates on a search results page at a
I have a PDF file which I want to verify whether the links in
In a particular script I'm writing, I have a number of objects which are
I have a linker command file that assigns the top address of the stack
C++ projects have a linker option to embed manifest to require UAC elevation (/MANIFESTUAC:level)
I have a link error where the linker complains that my concrete class's destructor
I have a linked list that I want to sort part of, eg: std::sort(someIterator,
I have a linked list, which stores groups of settings for my application: typedef
I have a workspace with a project which links with the static libraries in
Thank you in advance for any help. I have a website which has OpenGraph

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.