FSL_TICS_Fiona 发表于 2014-6-27 17:30
如果你使用方法(2),但是目标文件中没有生成数据,是因为数组没有被有效访问到。你可以在Link command ...
MEMORY
{
.p_interrupts_flash_ROM (RX) : ORIGIN = 0x0000, LENGTH = 0x00A4 # reserved for 5682x interrupts
.p_flash_ROM (RX) : ORIGIN = 0x00A4, LENGTH = 0x3F5C # pROM is 16K words total
# p_flash_ROM_data mirrors x_internal_RAM, mapping to origin and length
# the "X" flag in "RX" tells the debugger flash p-memory.
# the p-memory flash is directed to the address determined by AT
# in the data_in_p_flash_ROM section definition
.p_flash_ROM_data (RX) : ORIGIN = 0x0001, LENGTH = 0x0FFF # internal xRAM mirror
# .p_reserved_1 : ORIGIN = 0x4000, LENGTH = 0x1C000
.p_boot_flash_ROM (RX) : ORIGIN = 0x20000, LENGTH = 0x1000 # 4K words
# .p_reserved_2 : ORIGIN = 0x21000, LENGTH = 0xE800 # 58K words
.p_internal_RAM (RWX) : ORIGIN = 0x2F800, LENGTH = 0x0800 # 2K words
# .p_reserved_3 : ORIGIN = 0x30000, LENGTH = 0x0000
.x_internal_RAM (RW) : ORIGIN = 0x0001, LENGTH = 0x0FFF # 4K x 16
.x_flash_ROM (R) : ORIGIN = 0x1000, LENGTH = 0x1000 # 4K x 16
# .x_reserved_1 : ORIGIN = 0x2000, LENGTH = 0xD000
.x_onchip_peripherals (RW) : ORIGIN = 0xF000, LENGTH = 0x1000 # n/a w/SDM
# .x_reserved_2 : ORIGIN = 0x010000, LENGTH = 0xFEFF00 # n/a
.x_EOnCE (RW) : ORIGIN = 0xFFFF00, LENGTH = 0x0000 # n/a w/SDM
}
==========================================================================
在没有有效访问的情况下 要在.x_flash_ROM 空间内存放数据
$0001,$0002,$0003,$0004,$0005,$0006,$0007,
怎么用 FORCE_ACTIVE 具体实现。。。。。
FORCE_ACTIVE
The FORCE_ACTIVE directive allows you to specify symbols that you do not want the
linker to deadstrip. You must specify the symbol(s) you want to keep before you use the
SECTIONS keyword.
Prototype
FORCE_ACTIVE{ symbol[, symbol] }
============================================
FORCE_ACTIVE{ symbol[, symbol] }
|