I am taking a look at issue #246 in nuttx-apps: Illegal calls to romdisk_register(). In order to view how nuttx works I enabled the Memory Manager(MM) debug features including the error, warning and informational output using ‘make menuconfig’ .
I then typed ‘make’ and ran the simulator. This caused the simulator to exit without going to the nsh prompt due to an assertion failing as described below: When I run the simulator I see : mm_initialize: Heap: start=0x101ecc000 size=67108864 mm_addregion: Region 1: base=0x101ecc000 size=67108864 mm_malloc: Allocated 0x101ecc010, size 64 mm_malloc: Allocated 0x101ecc050, size 64 mm_malloc: Allocated 0x101ecc090, size 256 mm_malloc: Allocated 0x101ecc190, size 480 mm_malloc: Allocated 0x101ecc370, size 192 mm_malloc: Allocated 0x101ecc430, size 352 mm_malloc: Allocated 0x101ecc590, size 224 mm_malloc: Allocated 0x101ecc670, size 416 mm_malloc: Allocated 0x101ecc810, size 64 mm_malloc: Allocated 0x101ecc850, size 64 mm_malloc: Allocated 0x101ecc890, size 64 mm_malloc: Allocated 0x101ecc8d0, size 64 mm_malloc: Allocated 0x101ecc910, size 64 mm_malloc: Allocated 0x101ecc950, size 1048608 mm_malloc: Allocated 0x101fcc970, size 32 mm_malloc: Allocated 0x101fcc990, size 64 mm_malloc: Allocated 0x101fcc9d0, size 1312 mm_malloc: Allocated 0x101fccef0, size 32 mm_malloc: Allocated 0x101fccf10, size 352 mm_malloc: Allocated 0x101fcd070, size 1312 mm_malloc: Allocated 0x101fcd590, size 32 mm_malloc: Allocated 0x101fcd5b0, size 4160 mm_malloc: Allocated 0x101fce5f0, size 32 mm_malloc: Allocated 0x101fce610, size 64 mm_malloc: Allocated 0x101fce650, size 64 mm_malloc: Allocated 0x101fce690, size 64 mm_malloc: Allocated 0x101fce6d0, size 64 mm_malloc: Allocated 0x101fce710, size 64 mm_malloc: Allocated 0x101fce750, size 64 mm_malloc: Allocated 0x101fce790, size 128 mm_malloc: Allocated 0x101fce810, size 64 mm_malloc: Allocated 0x101fce850, size 1312 mm_malloc: Allocated 0x101fced70, size 32 mm_malloc: Allocated 0x101fced90, size 64 mm_malloc: Allocated 0x101fcedd0, size 160 mm_malloc: Allocated 0x101fcee70, size 128 mm_malloc: Allocated 0x101fceef0, size 32 mm_malloc: Allocated 0x101fcef10, size 32 mm_free: Freeing 0x101fcef10 mm_free: Freeing 0x101fceef0 mm_free: Freeing 0x101fcee70 mm_malloc: Allocated 0x101fcee70, size 524320 mm_malloc: Allocated 0x10204ee90, size 32 mm_malloc: Allocated 0x10204eeb0, size 64 mm_malloc: Allocated 0x10204eef0, size 128 mm_malloc: Allocated 0x10204ef70, size 32 mm_malloc: Allocated 0x10204ef90, size 32 mm_free: Freeing 0x10204ef90 mm_free: Freeing 0x10204ef70 mm_free: Freeing 0x10204eef0 mm_malloc: Allocated 0x10204eef0, size 32 mm_malloc: Allocated 0x10204ef10, size 32 mm_malloc: Allocated 0x10204ef30, size 64 mm_malloc: Allocated 0x10204ef70, size 544 mm_malloc: Allocated 0x10204f190, size 96 mm_free: Freeing 0x10204ef10 mm_malloc: Allocated 0x10204f1f0, size 544 mm_free: Freeing 0x10204ef70 mm_free: Freeing 0x10204ef30 mm_free: Freeing 0x10204f190 mm_free: Freeing 0x10204f1f0 mm_free: Freeing 0x10204eef0 mm_malloc: Allocated 0x10204eef0, size 128 mm_free: Freeing 0x10204eef0 mm_malloc: Allocated 0x10204eef0, size 32 mm_malloc: Allocated 0x10204ef10, size 32 mm_malloc: Allocated 0x10204ef30, size 64 mm_malloc: Allocated 0x10204ef70, size 96 mm_malloc: Allocated 0x10204efd0, size 544 mm_free: Freeing 0x10204eef0 mm_free: Freeing 0x10204ef10 mm_free: Freeing 0x101fced90 mm_free: Freeing 0x101fcedd0 mm_free: Freeing 0x101fced70 login: mm_free: Freeing 0x101fccef0 Assertion failed at file:mm_heap/mm_checkcorruption.c line: 101 Line 101 in mm_checkcorruption.c is: assert(node->size >= SIZEOF_MM_FREENODE); Running the simulator without the mm debug features enabled will not cause the above problem. The simulator works fine and comes to the nsh prompt and I am able to run the hello world app and also the examples/bastest app at the nsh prompt. My question is: Am I missing something as the assertion is failing on enabling the mm debug features and not otherwise? I got the master branch version of nuttx and nuttx apps a few days ago and I am using the nsh:sim configuration. Thanks, Tanushree