This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
可执行代码:0020 C000 – 0020 FFFF Sector K
表格:0021 0000 – 0021 FFFF Sector J
具体怎么操作?
FLASH1 (RX) : origin = 0x00204000, length = 0x1C000
可以将CMD文件中MEMORY的FLASH1(RX) 按SECTOR拆分为多部分,例如:
FLASHA : origin = 0x0027C000, length = 0x4000
FLASHB : origin = 0xxxxxxx, length = 0xxxxxxx
.
FLASHK : origin = 0x0020C000, length = 0x4000
FLASHJ : origin = 0x00210000, length = 0x10000
然后就可以在SECTION中通过下面的方法实现,其中.text为代码段,.const为表格段。
.text : >> FLASHK
.const : >> FLASHJ
我建了个table.asm,内容如下:
.const ;这个编译不过去
F0_ROM
,short 0x100,0x100
,short 0x100,0x100
F1_ROM
.short 0x100,0x100
,short 0x100,0x100
F2_ROM
.short 0x100,0x100
,short 0x100,0x100
F3_ROM
.short 0x100,0x100
,short 0x100,0x100
F4_ROM
.short 0x100,0x100
,short 0x100,0x100
.align 4
我现在想把这个表格放在我希望的区域,默认的情况下表格和可执行代码都是放.text段的,没有固定的段
楼主可以用C实现,
const unsigned int abctable[5]={
0x11,
0x22,
0x33,
0x44,
0x55
};
用汇编的话如下:
.sect ".const"
.align 2
F0_ROM:
.int 0x100,0x100