Page 1 of 1

PIC24 Function Pointers Not Large Enough

PostPosted: Sun Jun 14, 2009 6:49 am
by jmag99
I am using Salvo for C30. I am doing a source code build and have noticed that the function pointer size should be set to 4 bytes. However, in the watch window, U3->tFP is only 16-bits and the task scheduler is going to the incorrect area in my program since it is missing the MSB of it's function address. Any idea what I could be doing wrong?

Re: PIC24 Function Pointers Not Large Enough

PostPosted: Mon Jun 15, 2009 8:30 am
by aek
It sounds like you are using a memory model that we don't yet support -- can you confirm which memory model you're using?

Separately, can you email support a minimal project that demonstrates the issue -- one that runs in MPLAB-SIM? We may be able to do a "quickie" fix to the sourec code of the context switcher to accommodate you this way ...

------------------


Re: PIC24 Function Pointers Not Large Enough

PostPosted: Tue Jun 16, 2009 4:01 am
by jmag99
I am using the large code model. Somewhere in the MCC30 port file it mentions using 4-byte function pointers. 16-bit function pointers would only cover about 1/2 the parts that C30 works with. Is this the problem?