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

📄 program.lk

📁 《OSEK/VDX汽车电子嵌入式软件编程技术》中光盘的资料
💻 LK
字号:
/*********************************************************************
 *
 *	$Copyright    2001 Joseph J. Lemieux  ALL RIGHTS RESERVED. $
 *
 *	$Filename: C:\OSEKBook\src\CH02\bld\program.lk $
 *
 * 
 * PROGRAM.LK: This file contains the fragment of the final linker
 * file that contains the mapping of the board specific memory. This 
 * file maps the Axiom board FLASH as the executable memory space.
 *********************************************************************/
MEMORY
{
memreset  : org = 0x100,    len = 0x100   /* reset exception vector      */
memmach   : org = 0x200,    len = 0x100   /* Machine Check Exception Vector */
memvectab : org = 0x500,    len = 0x100   /* external interrupt vector   */
memalgn   : org = 0x600,    len = 0x100   /* Machine Check Exception Vector */
memprog   : org = 0x700,    len = 0x100   /* Machine Check Exception Vector */
memfpu    : org = 0x800,    len = 0x100   /* Machine Check Exception Vector */
memdecr   : org = 0x900,    len = 0x100   /* decrementer exception vector*/
memsys    : org = 0xC00,    len = 0x100   /* Machine Check Exception Vector */
memtr     : org = 0xD00,    len = 0x100   /* Machine Check Exception Vector */
memfpa    : org = 0xE00,    len = 0x100   /* Machine Check Exception Vector */
memise    : org = 0x1000,    len = 0x100   /* Machine Check Exception Vector */
memipe    : org = 0x1300,    len = 0x100   /* Machine Check Exception Vector */
memide    : org = 0x1400,    len = 0x100   /* Machine Check Exception Vector */
memdbk    : org = 0x1C00,    len = 0x100   /* Machine Check Exception Vector */
memibk    : org = 0x1D00,    len = 0x100   /* Machine Check Exception Vector */
memimebk  : org = 0x1E00,    len = 0x100   /* Machine Check Exception Vector */
meminmebk : org = 0x1F00,    len = 0x100   /* Machine Check Exception Vector */
rom		: org = 0x2000,   len = 0x6e000 /* ROM memory location */
ram		: org = 0x79800,  len = 0x6700  /* RAM memory location */
stack	: org = 0x7FF00,  len = 0x100   /* stack for main only */
usiuregs	: org = 0xAFC000, len = 0x400   /* Location of USIU registers */

}


SECTIONS
{

    /******************************************************
     * Install the reset vector and start of OS.
     ******************************************************/
    reset : {} > memreset
    mach : {} > memmach
    /******************************************************
     * Install the dispatcher for external interrupts.
     ******************************************************/
    vectab : {} > memvectab

    algn : {} > memalgn
    prog : {} > memprog
    fpu : {} > memfpu 

    /******************************************************
     * Install the vector for the on-chip "Decrementer".
     * The decrementer is used as timer for this board.
     ******************************************************/
    decr : {} > memdecr

    sys : {} > memsys
    tr : {} > memtr 
    fpa : {} > memfpa
    ise : {} > memise
    ipe : {} > memipe
    ide : {} > memide
    dbk : {} > memdbk
    ibk : {} > memibk
    imebk : {} > memimebk
    inmebk : {} > meminmebk
    /******************************************************
     * Specify the address at which the executable image
     * will be linked to execute.  The executable image can
     * execute in the internal static RAM on the MPC555 or
     * external RAM. The internal static RAM is at offset 
     * 0x3f9800 from the start of the MPC555 internal address space.
     * The address of the internal address space is determined
     * during board initialization.
     *
     * The following link command uses the external RAM of
     * 1MB starting at 0x0000. The executable image is located
     * at 0x2000 so that it does not overwrite the exception
     * vector address regions.
     *
     * Note that the four sections (excluding the vector table)
     * which are linked together are standard sections defined 
     * by the DIAB tools and are described in the DIAB 
     * documentation.
     ******************************************************/
    GROUP 0x2000 : {
        .sdata2      : {}
        .text        : {}
        .prof_time_data  : {}
        .prof_bcnt_data  : {}
        .init            : {}
        .fini            : {}
        .eini            : {}
        .chksum_len      : {}
        .external_500vector_table : {}
        .rodata      : {}
		__DATA_ROM = .;
    }

    /******************************************************
     * The following statements link the .sdata,, .sbss and
     * .bss sections together following the .data.  The
     * DIAB linker requires these sections be linked in
     * a separate "GROUP".  Note the .sbss section is 
     * aligned on an 8 byte boundary.  This ensures that 
     * all stacks are properly aligned as required by the
     * PowerPC architecture.
     * 
     * Note the three sections which are linked together
     * are standard sections defined by the DIAB tools and
     * are described the DIAB documentation.
     ******************************************************/
    GROUP : {
		__DATA_RAM = .;
        .data LOAD (__DATA_ROM)       : {}
        .sdata (DATA)
		LOAD (ADDR (.sdata) - ADDR (.data) + __DATA_ROM)        : {}
		__DATA_END = .;
        .sbss ALIGN(8) : {}
        .bss           : {}
    } > ram
}

__SP_INIT      = ADDR(stack ) + SIZEOF(stack );
__SP_END       = ADDR(stack );
_RAM_BEGIN	= ADDR(ram);
_RAM_END		= ADDR(ram) + SIZEOF (ram);
usiuReg		= ADDR(usiuregs);

_MEMORY_BASE_ADDR = 0xAFC100;

	/******************************************************
	*
	*	List the files that are to be linked into the
	*	application.
	*
	******************************************************/

..\obj\startup.o  
..\obj\oil.o
..\obj\main.o  
..\obj\init.o  
..\obj\cinit.o  
..\obj\initspr.o  

⌨️ 快捷键说明

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