position of code in memory

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

position of code in memory

2,092件の閲覧回数
hdan
Contributor III
I use a DG256 with banked memory.
I want to place a special part of my program in a 2 banks.
(I need to save them after)

How to impose the memory position of a program part?

Thanks,
hdan.
ラベル(1)
0 件の賞賛
返信
4 返答(返信)

564件の閲覧回数
hdan
Contributor III
Thanks
i'll look carefully the result of the "SEGMENT" search

hdan,
0 件の賞賛
返信

564件の閲覧回数
hdan
Contributor III
(sorry for the previous message)

Well i look carefully... and it doesnt work.

I do :

in PRM file:
SEGMENTS
RAM = READ_WRITE 0x1000 TO 0x3FFF;
/* unbanked FLASH ROM */
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xFEFF;
/* banked FLASH ROM */
PAGE_30 = READ_ONLY 0x308000 TO 0x30BFFF;
...
PAGE_38 = READ_ONLY 0x388000 TO 0x38BFFF;
PAGE_39 = READ_ONLY 0x398000 TO 0x39BFFF;
...
END

PLACEMENT
_PRESTART, /* Used in HIWARE format:
...
PROG_USER INTO PAGE_38,PAGE_39;
END

in header:

#pragma DATA_SEG PROG_USER
extern const char* MessageDef [];
#pragma DATA_SEG DEFAULT


in source:
#pragma DATA_SEG PROG_USER

const char* MessageDef [tailleMessageDefaut]=
{
"", ....
};

#pragma DATA_SEG DEFAULT



in Compiler option :

-CpPPAGE=RUNTIME -D_HCS12

I use a S12DG256 with code warrior HC12 3.1 and a softec inDART


i have link error like this :

Link Error : L1112: The PROG_USER section has segment type READ_WRITE (illegal)

Link Error : L1934: ELF: Section 'PROG_USER' located in a segment with invalid qualifier.

can you help me ? .
0 件の賞賛
返信

564件の閲覧回数
hdan
Contributor III
Hi, I'm really near the solution, I use: #pragma CONST_SEG PPAGE CONS_USER my const #pragma CONST_SEG DEFAULT and it works but the compiler make an warning : Warning C3802:smileyfrustrated:egment pragma incorrect ( if i write #pragma CONST_SEG CONS_USER no warning but doesn't work) if someone can help me to clear this warning ...
0 件の賞賛
返信

564件の閲覧回数
J2MEJediMaster
Specialist I
This question occurs from time to time here. You can use the search facility (at the bottom left of this page) and try searching on "SEGMENT". Just to expedite things for you, here's a forum link with a discussion on the topic that's a wealth of information.
0 件の賞賛
返信