Hi,

Right now, looking at the file nx_start.c, all calls to  up_allocate_heap are 
being done when one of these flags are defined:

#if defined(MM_KERNEL_USRHEAP_INIT) || defined(CONFIG_MM_KERNEL_HEAP) || \
    defined(CONFIG_MM_PGALLOC)

I was just left without stack when re-basing to the latest master, using 
CONFIG_BUILD_FLAT. I wonder what is the proper way to call up_allocate_heap in 
this case?

I initially made this in include/nuttx/mm/mm.h:
-#if !defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__)
+#if (!defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__)) || 
defined(CONFIG_BUILD_FLAT)
#  define MM_KERNEL_USRHEAP_INIT 1
#endif

This gives me the proper heap initialization from nx_start.c, but I wonder if 
this is the right way to do? I have probably missed something here...

Thanks,
Jukka

Reply via email to