none
Wince 2013 FSD manager debug breakpoint (assert) always tripping on boot up RRS feed

  • Question

  • Hello,

    We have a platform using a NAND FSD.  On boot up while we are debugging we are always hitting a this assert break point on boot up.

    BOOL StoreDisk_t::GetStoreInfo ( STOREINFO *pInfo ){

        ASSERT ( !IsDetached(  ) );

    __try{

            pInfo->dwAttributes = m_si.dwAttributes;

            pInfo->snBiggestPartCreatable = m_si.snBiggestPartCreatable;

            pInfo->dwBytesPerSector = m_si.dwBytesPerSector;

            pInfo->snFreeSectors = m_si.snFreeSectors;

            pInfo->snNumSectors = m_si.snNumSectors;

            pInfo->dwPartitionCount = m_dwPartCount;

            pInfo->dwMountCount = m_dwMountCount;

            pInfo->dwDeviceClass = m_sdi.dwDeviceClass;

            pInfo->dwDeviceFlags = m_sdi.dwDeviceFlags;

            pInfo->dwDeviceType = m_sdi.dwDeviceType;

            VERIFY ( GetShortDeviceName ( m_szDeviceName, pInfo->szDeviceName, DEVICENAMESIZE ) );

            VERIFY ( SUCCEEDED ( StringCchCopy ( pInfo->szStoreName, STORENAMESIZE, m_szStoreName ) ) );

            memcpy ( &pInfo->ftCreated, &m_si.ftCreated,

    sizeof( FILETIME ) );

            memcpy ( &pInfo->ftLastModified, &m_si.ftLastModified,

    sizeof( FILETIME ) );

            memcpy ( &pInfo->sdi, &m_sdi,

    sizeof( STORAGEDEVICEINFO ) );

        }

    __except( EXCEPTION_EXECUTE_HANDLER ) {

           

    returnFALSE;

        }

    returnTRUE;

    }

    It is in regards that it is saying the disk is detached.  As this is a permanently attached disk (NAND chip), how is this possible.  Have we got a registry setting missing or something?

    If we press the run button, the disk works correctly etc, but we are hitting an annoying break point which to me indicates we aren't doing something right.

    Help would be much appreciated.

    Regards

    Andrew

    Monday, January 25, 2016 2:04 AM

Answers

  • Michel, 

    Thanks for you help, I have now solved the issue.  For some reason with the Hive Registry I need to keep the AutoLoad key.  But the actual problem was the "CheckForFormat" key

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\FATFS]
     "FormatTFat"=dword:1
     "DisableAutoScan"=dword:1
     "NonatomicSector"=dword:1
     "CheckForFormat"=dword:1
     "LazyWriterThreadPrio256"=dword:FB 

    Once I removed this key value, the assert error solved itself

    Regards

    Andrew


    Andrew Meek

    • Marked as answer by Andrew Meek Thursday, February 18, 2016 7:32 PM
    Thursday, February 18, 2016 7:32 PM

All replies

  • Did you set "MountAsPermanent"=dword:1 for this storage profile?

    See https://msdn.microsoft.com/en-us/library/ee490773.aspx


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Monday, January 25, 2016 3:11 AM
    Moderator
  • Michel,

    Thanks for your reply.  I have tried the MountAsPermanent in the registry, but it didn't work. 

    Below is my registry settings.

    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\Drivers\BlockDevice\IFLASH]
     "Dll"="am3xx_fmd_nand.dll"
     "FriendlyName"="Flash disk Driver (Eaglestore)"
     "IClass"=multi_sz:"{0AE2066F-89A2-4D70-8FC2-29AEFA68413C}",
       "{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
     "Ioctl"=dword:4
     "Order"=dword:0
     "Prefix"="DSK"
     "Profile"="IFLASH"
     "Index"=dword:1
     "Flags"=dword:1000
     "CompactionPrio256"=dword:00FB

    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\IFLASH]
     "DriverPath"="Drivers\\BlockDevice\\IFLASH"
     "LoadFlags"=dword:1
     "BootPhase"=dword:0
    ; "MountFlags"=dword:11
     "MountHidden"=dword:1
     "MountPermanent"=dword:1
     "Flags"=dword:1000

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH]
     "Name"="Internal Flash Hard Disk"
     "AutoPart"=dword:1
     "DefaultFileSystem"="FATFS"
     "AutoMount"=dword:1
     "AutoFormat"=dword:1
     "MountPermanent"=dword:1


    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\Part00]
     "Name"="Kernel File System"
     "MountHidden"=dword:1
     "Folder"="NK"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\Part01]
     "Folder"="Program Files"
     "Name"="Program Files (Flash)"
     "AutoFormat"=dword:1
     "AutoMount"=dword:1
     "MountPermanent"=dword:1


    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\Part02]
     "Folder"="Registry"
     "Name"="Registry (Flash)"
     "AutoFormat"=dword:1
     "AutoMount"=dword:1
    ; "MountFlags"=dword:3
     "MountHidden"=dword:1
     "MountAsBootable"=dword:1
     "MountPermanent"=dword:1
    ; MountFlags 3 means it contains the Hive registry (2) and is hidden (1)

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\Part03]
     "Folder"="Data"
     "Name"="Data (Flash)"
     "AutoFormat"=dword:1
     "AutoMount"=dword:1
     "MountPermanent"=dword:1

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\FATFS]
     "FormatTFat"=dword:1
     "DisableAutoScan"=dword:1
     "NonatomicSector"=dword:1
     "CheckForFormat"=dword:1
     "LazyWriterThreadPrio256"=dword:FB


    [HKEY_LOCAL_MACHINE\System\StorageManager\FATFS]
     "FormatExFat"=dword:1
     "DisableAutoFormat"=dword:0

    [HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\FATFS\Filters\CacheFilt]
     "FileCacheWriteBackPriority256"=dword:00FB
     "FileCacheWriteBackTimeout"=dword:3E8

    [HKEY_LOCAL_MACHINE\init\BootVars]
     "SystemHive"="Registry\\Documents and Settings\\system.hv"
     "ProfileDir"="Registry\\Documents and Settings"
        "Flags"=dword:3
        "DefaultUser"="default"
        "RegistryFlags"=dword:1
        "Start DevMgr"=dword:1

    [HKEY_LOCAL_MACHINE\System\StorageManager\RAMIMAGE]
     "Dll"="bootfs.dll"
     "Folder"="NK"
     "FriendlyName"="Kernel File System"
     "MountHidden"=dword:1

    ; END HIVE BOOT SECTION

    Any further ideas?


    Andrew Meek

    Tuesday, January 26, 2016 1:12 AM
  • Yes, remove the autoload key. You are now loading the flash driver twice; once in bootphase 1 (due to Flags set to 1000) and once in bootphase 2 (due to autoload). Hence the debugbreak.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Tuesday, January 26, 2016 1:42 AM
    Moderator
  • Michel,

    Once again thank you for your help.  I assume what you meant was remove all this:

    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\IFLASH]
     "DriverPath"="Drivers\\BlockDevice\\IFLASH"
     "LoadFlags"=dword:1
     "BootPhase"=dword:0
    ; "MountFlags"=dword:11
     "MountHidden"=dword:1
     "MountPermanent"=dword:1
     "Flags"=dword:1000

    I tried that and now the disk don't load at all. 

    I also tried just removing the "Flags" out of both [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\IFLASH] and [HKEY_LOCAL_MACHINE\Drivers\BlockDevice\IFLASH] each individually and it still hit the breakpoint.

    Regards

    Andrew


    Andrew Meek

    Wednesday, January 27, 2016 7:49 PM
  • Ok, I'm not sure what is wrong then. All i know is that you should definitely not need the Autoload key. That's only for non-block devices (like RelFsd).

    Remove the autoload key and check the debug output and see why it doesn't load. Maybe start with a RAM-based registry setup (remove the Flags) and work your way up.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Wednesday, January 27, 2016 8:16 PM
    Moderator
  • Michel, 

    Thanks for you help, I have now solved the issue.  For some reason with the Hive Registry I need to keep the AutoLoad key.  But the actual problem was the "CheckForFormat" key

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\IFLASH\FATFS]
     "FormatTFat"=dword:1
     "DisableAutoScan"=dword:1
     "NonatomicSector"=dword:1
     "CheckForFormat"=dword:1
     "LazyWriterThreadPrio256"=dword:FB 

    Once I removed this key value, the assert error solved itself

    Regards

    Andrew


    Andrew Meek

    • Marked as answer by Andrew Meek Thursday, February 18, 2016 7:32 PM
    Thursday, February 18, 2016 7:32 PM