Follow-up Comment #2, bug #28921 (project avr-libc): Wow, I am humbled. The option that Joerg suggested has been in my Make file for years now but I have insisted that all function pointer targets must reside in flash < 128KiB. After recompiling without my little hack to force function pointer targets to < 128K (and verified in the map that more than a few targets are indeed above the 128K boundary), my application appears to be working fine.
Now, just one more little request: When I pass the pointer to a task function to the FreeRTOS task creation routine, gcc passes a 16-bit pointer, as I expect. Unfortunately, there is not a direct "function pointer" reference to the task function, so the linker has no need to put the task into the trampoline (or, more to the point, it has no need to keep it there). Example: typedef void (*pdTASK_CODE)( void * ); portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, const char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pvCreatedTask ); /* The focus servo task. */ void vFocusTask( void* pvParameters ); void vStartFocus( uint8_t uxPriority ) { . . . xTaskCreate( vFocusTask, (signed portCHAR*) taskName , FOCUS_STACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); . . . Is there some way to force the linker to keep some names in the trampoline even though the -Wl,--relax is specified in LDFLAGS? For now, I will leave my "put the function in lower 128K" hack in place for the task functions. Stu Bell _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?28921> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev