Pumpkin, Inc.

Pumpkin User Forums

PIC24 Function Pointers Not Large Enough

For issues specific to the PIC24 MCU and dsPIC DSC line of microcontrollers from Microchip, including compiler (e.g. MCC 30) and IDE (e.g. MPLAB) issues.

PIC24 Function Pointers Not Large Enough

Postby jmag99 » Sun Jun 14, 2009 6:49 am

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?
jmag99
 
Posts: 4
Joined: Sat Jun 13, 2009 11:00 pm
Location: Providence, RI USA

Re: PIC24 Function Pointers Not Large Enough

Postby aek » Mon Jun 15, 2009 8:30 am

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 ...

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: PIC24 Function Pointers Not Large Enough

Postby jmag99 » Tue Jun 16, 2009 4:01 am

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?
jmag99
 
Posts: 4
Joined: Sat Jun 13, 2009 11:00 pm
Location: Providence, RI USA


Return to PIC24 & dsPIC

Who is online

Users browsing this forum: No registered users and 2 guests

cron