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

📄 56807_flash-pxrom_int-xram_linker.cmd

📁 一个串口终端解释程序。用于单片机调试串口的超级终端应用。
💻 CMD
字号:



# ----------------------------------------------------

# Metrowerks, a company of Motorola
# sample code

# linker command file for DSP56807EVM
# using 
#        flash pROM
#        flash xROM
#     internal xRAM


# revision history
# 011020 R4.1 A.H. first version

# ----------------------------------------------------



# see end of file for additional notes
# additional reference: Motorola docs 
#   DSP56F801-7UM.pdf
#   DSP56F807EVMUM.pdf



# memory use for this LCF: 
# interrupt vectors --> flash pROM starting at zero
#      program code --> flash pROM
#         constants --> flash xROM
#      dynamic data --> int   xRAM 



# requirements: Mode 0A and EX=0
# reference Motorola document DSP56801-7UM.pdf
# note -- there is a mode OB but any Reset or COP Reset 
#         resets the memory map back to Mode 0A.



# DSP56807EVM eval board settings
#    ON --> jumper JG7 (mode 0 upon exit from reset)
#   OFF --> jumper JG8 (enable external board SRAM)

# note: with this LCF memory config, internal memory 
#       will be used regardless of JG8 setting;
#       however, you can turn SRAM off to validate
#       use of internal RAM.



# CodeWarrior debugger Target option settings
#    ON --> "Use Hardware Breakpoints" 
#   OFF --> "Debugger sets OMR at Launch" option

# note: since debugger doesn't set OMR, init code's setting is:
# OMR:
#     0 --> EX bit (stay in Debug processing state)
#     0 --> MA bit  
#     0 --> MB bit





# 56807
# mode 0A
# EX = 0

MEMORY 
{
  .p_boot_flash_1       (RX)  : ORIGIN = 0x0000, LENGTH = 0x0004 
  .p_interrupts_ROM     (RX)  : ORIGIN = 0x0004, LENGTH = 0x007C 
  .p_flash_ROM          (RX)  : ORIGIN = 0x0080, LENGTH = 0x7F80
  .p_flash_ROM_2        (RX)  : ORIGIN = 0x8000, LENGTH = 0x7000
  .p_internal_RAM       (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
  .p_boot_flash_2       (RX)  : ORIGIN = 0xF800, LENGTH = 0x0800 
  .x_compiler_regs_iRAM (RW)  : ORIGIN = 0x0030, LENGTH = 0x0010 	
  .x_internal_RAM       (RW)  : ORIGIN = 0x0040, LENGTH = 0x0FC0
  .x_peripherals        (RW)  : ORIGIN = 0x1000, LENGTH = 0x0800
  .x_reserved           (R)   : ORIGIN = 0x1800, LENGTH = 0x0800
  //.x_flash_ROM          (R)   : ORIGIN = 0x3500, LENGTH = 0x0500
  .x_flash_ROM          (R)   : ORIGIN = 0x2000, LENGTH = 0x2000
  .x_external_RAM       (RW)  : ORIGIN = 0x4000, LENGTH = 0xBF80
  .x_core_regs          (RW)  : ORIGIN = 0xFF80, LENGTH = 0x0080
}



# we ensure the interrupt vector sections are not deadstripped here

KEEP_SECTION{ interrupt_vectors.text, interrupt_vectors_mirror.text }
//KEEP_SECTION{ x_flash_ROM_data.data}


SECTIONS 
{
	.interrupt_vectors :
	{
	    # from 56807_vector_pROM.asm
	    * (interrupt_vectors.text)  
	   
	} > .p_interrupts_ROM



    # hawk mirrors these back to P memory boot_flash_1

	.interrupt_vectors_mirror :
	{
	    # from 56807_vector_pROM.asm
	    * (interrupt_vectors_mirror.text)  
	   
	} > .p_boot_flash_2



	.executing_code :
	{
		# .text sections
		
		* (.text)
		* (rtlib.text)
		* (fp_engine.text)
		* (user.text)	
	} > .p_flash_ROM
	
	
	
	.x_flash_ROM_data :
	{
	     *(.rodata)	 # initialized constants stay in flash xROM
		      
	} > .x_flash_ROM

	
		
	.data : 
	{
	    # data sections
	    
        * (.data)
	    * (fp_state.data)
		* (rtlib.data)

					
		
		# .bss sections
		
	  	* (rtlib.bss.lo)
	  	
	  	__bss_start = .;
	  	
		* (.bss)
		
		__bss_end   = .;
		__bss_size = __bss_end - __bss_start;



		# setup the heap address
		
		__heap_addr = .;
		__heap_size = 0x0100;
		__heap_end = __heap_addr + __heap_size; 
		
		. = __heap_end;



		# setup the stack address 
		
		_min_stack_size = 0x0200;
		__stack_addr = __heap_end;
		__stack_end  = __stack_addr + _min_stack_size;
		. = __stack_end;
		
		
		
		# set global vars now
		
		# MSL uses these globals:		
		F_heap_addr  = __heap_addr;
		F_heap_end   = __heap_end;
		F_stack_addr = __stack_addr;
		
		
		# stationery init code globals
		
		F_bss_size      = __bss_size;
		F_bss_addr      = __bss_start;

		# next not used in this LCF 
		# we define anyway so init code will link 
		# these can be removed with removal of rom-to-ram
		# copy code in init file
	
		F_data_size     = 0x0000;
		F_data_RAM_addr = 0x0000;
		F_data_ROM_addr = 0x0000;
		
        F_rom_to_ram    = 0x0000; # zero is no rom-to-ram copy
	
		
	} > .x_internal_RAM
	
}





# -------------------------------------------------------
# additional notes:


# about the reserved sections
# for this internal RAM and flash ROM LCF:

# p_interrupts_ROM -- reserved in pROM
# memory space reserved for interrupt vectors
# interrupt vectors must start at address zero
# interrupt vector space size is 0x80

# x_compiler_regs_iRAM -- reserved in internal xRAM
# The compiler uses page 0 address locations 0x30-0x40 
# as register variables. See the Target manual for more info.

# other memory sections are per chip




# notes:
# program memory (p memory)
# (RWX) read/write/execute for pRAM
# (RX) read/execute for flashed pROM

# data memory (X memory)
# (RW) read/write for xRAM
# (R)  read for data flashed xROM

# LENGTH = next start address - previous
# LENGTH = 0x0000 means use all remaing memory

⌨️ 快捷键说明

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