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

📄 sram.lcf

📁 摩托罗拉MMC2107在ucosII的移植代码
💻 LCF
字号:
#
#   linker.lcf  -   linker command file for Motorola MCore 2107 series
#

MEMORY
{
  TEXT    (RX) : ORIGIN = 0x8100C000,       LENGTH = 0x00000000
  //TEXT    (RX) : ORIGIN = 0x80020000,       LENGTH = 0x00000000
  VECTORS (R)  : ORIGIN = AFTER(TEXT),      LENGTH = 0x00000000
  ROMDATA (R)  : ORIGIN = AFTER(VECTORS),   LENGTH = 0x00000000
  //VECTORS (R)  : ORIGIN = 0x80020000,       LENGTH = 0x00000200
  
  DATA    (RW) : ORIGIN = 0x800000,         LENGTH = 0x00000000
  BSS     (RW) : ORIGIN = AFTER(DATA),      LENGTH = 0x00000000
}

SECTIONS
{
  .main_application :               // Application Code
  {
    startup.c       (.text)         // reset startup code
    main.c          (.text)         // main program
    os_cpu_a.s      (.text)  
    *               (.text)  
  } > TEXT                          // Map to TEXT section (0x200+)
                
  .main_vector_data :               // Vector table
  {
    . = ALIGN(0x400);               // Align table on 1024-byte boundary per
    vector_table.c  (.rodata)       // File containing vector table
  } > VECTORS                       // Map to TEXT section (0x200+)
                
  .main_application_data :          // Data Section
  {                                 // Initialized variable data copied to RAM
    . = ALIGN(0x1);
    __data_ROM_begin = .;           // Sets start location used in rom_copy
    *               (.data)         // Just include data in all modules for now
    __data_ROM_end = .;             // Sets end location used in rom_copy
    *               (.vtables)
    *               (.exception)
    *               (.rodata)       // (Constant) data to be kept in ROM
  } > ROMDATA
      
  .main_app_data :
  {
    __data_begin = .;               // Initialized data will be copied here.
    __data_size = __data_ROM_end - __data_ROM_begin; // With the same size as it takes in ROM.
    . = __data_begin + __data_size; // Move memory pointer to the end of data.
  } > DATA
  
  .main_app_bss :                   // Uninitialized data, zeroed in startup.c
  {
    __bss_begin = .;
    *               (.bss)          // All variables initialized to 0
    __bss_end =.;   
  } > BSS

// Calculations and assignments of section sizes
  __heap_addr   = .;
  __heap_end    = __heap_addr + 0x0400;
  __heap_size   = __heap_end - __heap_addr;

  __stack_begin = 0x802000;
  __stack_end   = __stack_begin - 0x0800;
  
  __alt_stack_begin = __stack_end;
  __alt_stack_end = __alt_stack_begin - 0x0200;

}
 

⌨️ 快捷键说明

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