Hey guys, we will upgrade our Nuttx OS from version 7.31 to 10.1. and on compiling occurs an error with the heap memory allocation.
On the old Nuttx version 7.31 is the following precompiler setting in header file mm.h : #undef MM_KERNEL_USRHEAP_INIT #if defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__) # define MM_KERNEL_USRHEAP_INIT 1 #elif !defined(CONFIG_BUILD_KERNEL) # define MM_KERNEL_USRHEAP_INIT 1 #endif The compiler variables were both not setted => CONFIG_BUILD_PROTECTED = n && CONFIG_BUILD_KERNEL = n On #elif path defined variable MM_KERNEL_USRHEAP_INIT 1. In this case allocated the heap memory on startup of our application. On newer Nuttx version 10.1. is following precompiler setting in header file mm.h : #undef MM_KERNEL_USRHEAP_INIT #if !defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__) # define MM_KERNEL_USRHEAP_INIT 1 #endif In this case the compiler variable MM_KERNEL_USRHEAP_INIT is not setted and __KERNEL__ is not setted! The heap memory allocation sets an error on startup of our application. In the old Nuttx version were this macro changed to KDEFINE and hand over on compilation time. On my opinion is this macro __KERNEL__ not exist on the newer Nuttx version I didn't find any __KERNEL__ macro or KDEFINE variable on compilation output. Where is this macro? Please could you help me to define the macro __KERNEL__ on my environment. Many thanks for your support in advance. Best regards, Thomas Rolle [cid:image002.png@01D79A9F.776F2810] Thomas Rolle Senior Software Developer, R&D T +49 7071 9735-278 * F +49 7071 9735-55 278 * thomas.ro...@avat.de<mailto:thomas.ro...@avat.de> AVAT Automation GmbH * Derendinger Straße 40 * D-72072 Tuebingen * www.avat.de<http://www.avat.de/> Location: Tuebingen * General Manager: Dipl.-Ing. Frank Ganssloser * Commercial Register Entry: AG Stuttgart HRB 381463 ? E-Mail wurde verschlüsselt übertragen