I’m using FreeRTOS on a dsPIC33 MCU. When compiling a demo project I’m getting the following error in heap_1.c
../../FreeRTOS/FreeRTOSV8.2.3/FreeRTOS/Source/portable/MemMang/heap_1.c: In function 'pvPortMalloc': ../../FreeRTOS/FreeRTOSV8.2.3/FreeRTOS/Source/portable/MemMang/heap_1.c:124:30: warning: cast to pointer from integer of different size
The code in question is the following
pucAlignedHeap = ( uint8_t * ) ( ( ( portPOINTER_SIZE_TYPE ) &ucHeap[ portBYTE_ALIGNMENT ] ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
When I look at the definition of portPOINTER_SIZE_TYPE, it is uint32_t; however, the pointer size on the dsPIC33 is actually 16-bits, for both data (16 bits) or program memory (24 bits, it puts handles to functions if they aren’t in the first 16-bit addreesable 64k).
Is this intentional? If so, what is the purpose of defining portPOINTER_SIZE_TYPE that way?