Getting value from a Pmem location

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

Getting value from a Pmem location

1,870件の閲覧回数
NeedHelp
Contributor I
Greetings people!
Question: How do I see what is in pmem location P:0xABCD?

I tried doing:
unsigned int ucMfrFileLen = *(__pmem unsigned int *)0xABCD;
but it doesnt compile. Im using  the CodeWarriro DSP C Compiler.
 
It should be something pretty simple but im just a beginner n pretty lost.
Thanks for your help guys!
 
I can do it the long way but was wondering if you had a better way:
 __pmem unsigned int * pCode;
unsigned int ucMfrTail;
 pCode = (__pmem unsigned int *)CVECT_PGM_TAIL;
 ucMfrTail = *pCode;


Message Edited by NeedHelp on 2008-06-23 09:27 PM
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

617件の閲覧回数
trytohelp
NXP Employee
NXP Employee
Hi,
 
I performed several tests but I don't think we can write this declaration on 1 line.
I will check with the compiler team.
 
according to my test you can write the following:
 
unsigned int __pmem toto : 0xABCD;

int main(void)
{
... 
 unsigned int *ucMfrFileLen = (unsigned int *)&toto; /* working */
 
Regards
Pascal
0 件の賞賛
返信