Hi,
I'm compiling a simple PICos18 tasks example but I'm facing pointers problems:
sdcc -I /usr/local/share/sdcc/include/pic16 -mpic16 -p18f4520 -o
"taskdesc.o" -c "taskdesc.c";
at 170: error 129: pointer types incompatible
make: *** [taskdesc.o] Error 1
This is referenced error line:
volatile rom unsigned int * taskdesc_addr = ((&descromarea)+1);
The "descromarea" variable is declared at just before the
"rom_desk_task" and the above code is just a trick to get the
rom_desk_task0 position at rom code:
#pragma romdata DESC_ROM
const rom unsigned int descromarea = 0;
/**********************************************************************
* ----------------------------- task 0 ------------------------------
**********************************************************************/
rom_desc_tsk rom_desc_task0 = {
TASK0_PRIO, /* prioinit from 0 to 15 */
stack0, /* stack address (16 bits) */
TASK0, /* start address (16 bits) */
READY, /* state at init phase */
TASK0_ID, /* id_tsk from 0 to 15 */
sizeof(stack0) /* stack size (16 bits) */
};
I make many tests and verified it works:
volatile rom unsigned int * taskdesc_addr = &descromarea;
and it also works:
volatile rom unsigned int * taskdesc_addr = (volatile rom unsigned int
*) (&descromarea);
But it don't works:
volatile rom unsigned int * taskdesc_addr = (volatile rom unsigned int
*) ((&descromarea) + 1);
Some idea to solve it?
Alan
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user