Getting value from a Pmem location

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting value from a Pmem location

1,453 Views
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
Labels (1)
Tags (1)
0 Kudos
1 Reply

200 Views
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 Kudos