none
FLSNAND/SAMPLEHOOK/STUBHOOK RRS feed

  • Question

  • Hi,

    I am using a SPI based NOR Flash. I wanted to export it as a Storage Device. I am in the process of doing the same.

    I am planning to use FAL+FMD model. So for this I have included FAL.lib in my sources file.

    It gives error while building for FMDHOOK_HookInterface function.

    I observed that this is available in the above libraries. Just curious with which library do I need to link?

    On SPI NOR Flash I am not stoding anything else as of now related to Processor (Such as either bootloader or OSImage NK.bin).

    I may use it for storing Hive Registry.

    Thank You for reading.

    Regards,

    Sudheer

    Friday, March 25, 2011 7:23 AM

Answers

  • you have to link $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib  in your driver sources file under TARGETLIBS entry

    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    • Marked as answer by GSRid Friday, March 25, 2011 9:06 AM
    Friday, March 25, 2011 8:10 AM
  • This is a working sources file i used in custom BSP, hope it helps:

     

    TARGETNAME=MSFlash
    
    TARGETTYPE=DYNLINK
    RELEASETYPE=PLATFORM
    SYNCHRONIZE_DRAIN=1
    
    CDEFINES=$(CDEFINES) -DREAD_FROM_REGISTRY
    
    DLLENTRY=_DllEntryCRTStartup
    
    DEFFILE=MSFlash.def
    
    SOURCELIBS=$(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\fal.lib
    
    
    TARGETLIBS=\
      $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
      $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib \
      $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib
    
    SOURCES=msflash.cpp

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by GSRid Friday, March 25, 2011 9:06 AM
    Friday, March 25, 2011 8:11 AM

All replies

  • you have to link $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib  in your driver sources file under TARGETLIBS entry

    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    • Marked as answer by GSRid Friday, March 25, 2011 9:06 AM
    Friday, March 25, 2011 8:10 AM
  • This is a working sources file i used in custom BSP, hope it helps:

     

    TARGETNAME=MSFlash
    
    TARGETTYPE=DYNLINK
    RELEASETYPE=PLATFORM
    SYNCHRONIZE_DRAIN=1
    
    CDEFINES=$(CDEFINES) -DREAD_FROM_REGISTRY
    
    DLLENTRY=_DllEntryCRTStartup
    
    DEFFILE=MSFlash.def
    
    SOURCELIBS=$(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\fal.lib
    
    
    TARGETLIBS=\
      $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
      $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib \
      $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib
    
    SOURCES=msflash.cpp

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by GSRid Friday, March 25, 2011 9:06 AM
    Friday, March 25, 2011 8:11 AM
  • Hi,

    Thank You all for replying.

    Just curious to know when we need to link with flsnandlib.lib? Is it when we use actual NAND Flash?

    Regards,

    GSR

    Friday, March 25, 2011 9:06 AM
  • I have shown the comment given in the source code of \WINCE600\PUBLIC\COMMON\OAK\DRIVERS\BLOCK\MSFLASHFMD\HOOK\FLSNAND\flsnand.cpp file. it will give clear explanation about the purpose

    Module Name:    FSLNAND.CPP

    Abstract:       FLASH Media Driver Interface Hook for Windows CE
     
    Notes:          The following module defines the FMD Hook interface
                    used to intercept and filter calls made by the FAL in
                    to the FMD. This layer handles "Flash Layout Sector"
                    (FLS) for Image Update builds. It manages flash regions
                    and reserve regions for NAND flash parts. Provides
                    GetInfoEx functionality. Supports IOCTLs for reading
                    and writing reserved regions. Supports IOCTL for writing
                    raw blocks.

    Environment:    This lib is likned as a "shim" layer between the FAL
                    and FMD libs.

    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com

    Friday, March 25, 2011 9:20 AM
  • Hi,

    Thank You for the reply.

    Regards,

    GSR

    Friday, March 25, 2011 1:51 PM