Hello All,
Thanks for the info from everyone. I think I resolved it and the solution was from Bigmac. I unknowingly turned on a feature in the GUI lib that uses malloc() which caused the heap to be allocated.
I am still a little confused about the role that libdefs.h plays. According to the Compler_HC08.pdf
Memory Management - malloc(), free(),
calloc(), realloc(); alloc.c, and heap.c
File alloc.c provides a full implementation of these functions. You must specify heap
location, heap size, and heap overrun processes.
Address all of these points in the heap.c file. View the heap as a large array with a
default error handling function. Feel free to modify this function or the size of the heap to
suit the needs of the application. Define the heap size in libdefs.h,
LIBDEF_HEAPSIZE.
I understand what Daniel is saying but the documentation tells something different.
So I tried the first method and I do get a warning "L1919: Duplicate defination of _heap_. Ignoring defination from heap.c.o(ansiis.lib), using definition from heap.c.o" Other than this warning it seems to fix the allocation issue.
Anyways I will disable the GUI function that usues malloc() until I understand better how much _heap_ space I need to allocate.