I have tryed to create a project for usb hid (keyboard as host) for k66 ,using processor expert .I have configured the stack and Heap size to 4k each ,while building the project it generates elf error and at default setting (stack / Heap size ) it gets build ...
usb_khci_host_state_struct_t* usb_host_ptr = (usb_khci_host_state_struct_t*) OS_Mem_alloc_zero(sizeof(usb_khci_host_state_struct_t));
OS_Mem_alloc_zero( ) returns a null to usb_host_ptr, so what can be the issue ,if its the issue with stack / Heap size ,what should be its size .
please, try to set heap and stack on higher value, because default values are really low.
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x400;
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0800;
You set these values for heap and stack at MK66FN2M0xxx18_flash.ld
Please see bellow:
In case of any issue, please let me know.