⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example2.lkr

📁 初始化程序
💻 LKR
字号:
// This file was originally 18f452i.lkr as distributed with MPLAB C18.
// Modified as follows:
// - combine banks 4 and 5 into PROTECTED DATABANK "largebank"
// - moved stack to gpr3
// - Assign the "bigdata" SECTION into the new "largebank" region

LIBPATH .

FILES c018i.o
FILES clib.lib
FILES p18f452.lib

CODEPAGE   NAME=vectors    START=0x0            END=0x29           PROTECTED
CODEPAGE   NAME=page       START=0x2A           END=0x7DBF
CODEPAGE   NAME=debug      START=0x7DC0         END=0x7FFF         PROTECTED
CODEPAGE   NAME=idlocs     START=0x200000       END=0x200007       PROTECTED
CODEPAGE   NAME=config     START=0x300000       END=0x30000D       PROTECTED
CODEPAGE   NAME=devid      START=0x3FFFFE       END=0x3FFFFF       PROTECTED
CODEPAGE   NAME=eedata     START=0xF00000       END=0xF000FF       PROTECTED

ACCESSBANK NAME=accessram  START=0x0            END=0x7F
DATABANK   NAME=gpr0       START=0x80           END=0xFF
DATABANK   NAME=gpr1       START=0x100          END=0x1FF
DATABANK   NAME=gpr2       START=0x200          END=0x2FF
DATABANK   NAME=gpr3       START=0x300          END=0x3FF
// Step #3  Create a new region in the linker script
// This is the databank that will contain the large memory object
DATABANK   NAME=largebank  START=0x400          END=0x5F3          PROTECTED
DATABANK   NAME=dbgspr     START=0x5F4          END=0x5FF          PROTECTED
ACCESSBANK NAME=accesssfr  START=0xF80          END=0xFFF          PROTECTED

SECTION    NAME=CONFIG     ROM=config

// Step #4 - Assign the large memory object's section into the new region
SECTION    NAME=bigdata    RAM=largebank

STACK SIZE=0x100 RAM=gpr3

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -