Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Logic PD support staff and engineers participate, Logic PD does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Logic PD engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Logic PD product download, please subscribe to the TDG Forum of interest.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 30 Sep 2006 06:16 PM by  ftiernan
Programmatic access to Flash
 10 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ftiernan
New Member
New Member
Posts:


--
31 Aug 2006 10:51 PM
    I would like to have programmatic access to about 1k of flash to dynamically story user setup data so that when the use restarts his device prior settings can be restored. I do not plan to have a CF so I would like to use some of the Card Engine's resident flash. I will ultimmately of course have my application itself stored there so I need to avoid using that particular space. I see various references to configuration blocks and YAFFS in the Logic Loader documentation but am not sure they are suitable for this requirement. In any event, any help or suggestions would be appreciated. TIA - Frank T.
    Anonymous
    Posts:


    --
    05 Sep 2006 04:10 PM
    What kind of information are you wanting to store? The config block should be able to do this for you.
    ftiernan
    New Member
    New Member
    Posts:


    --
    08 Sep 2006 06:45 PM
    just simple items like a 16 bit ints. When i tried to write directly to one of the addresses in the config. block by getting a physical address and then writing to that address and then reading it back it did not work so I suppose it is more complicated than that. I see a reference in the logic loader User manual p. 17 that says "The structure and field definition header files are available from Logic" and also references to initializing the block but from just that it is not clear to me how to make this work. Is there another more detailed reference? Thanks -
    Frank
    ftiernan
    New Member
    New Member
    Posts:


    --
    10 Sep 2006 01:34 PM
    I found the Logic Application Note 339 which talks about Configuration Block Usage. In Section 5 it lists some steps for "Sharing the Configuration Block with an Operating System" which sounds like what I want to do. BTW, just to be clear, what I want to do is capture something (say an integer value) that corresponds to some piece of user data that may change from time to time, store that data in flash so that after the system is turned off and then back on again that data may be recalled by the application. Anyway, getting back to the app note. In section 5 step 4 it says "Erase the block of flash the configuration block resides in" - my question is, in my application (.cpp file built in Platform Builder 5.0) what do i need to do to: "erase the block of flash the configuration block resides in". TIA - Frank T.
    ftiernan
    New Member
    New Member
    Posts:


    --
    16 Sep 2006 02:05 PM
    Still cannot seem to get access to the flash from my program. I can see that I have erased a location in the config block free space 0x00050000 (via logic loader) because when I read the value from my program I can see that it changed to -1 from an earlier garbage value 0f -481099760 but when I try to change the value using the logic loader w command nothing happens even though the return value of the w command is 0x0. Thought I might try a different route with lpd_MSFLASHFMD driver but after changing .reg values to the following virtual values as suggested in the app note.
    Quote:
    IF LOCE_LHA400_10
    "MemBase"=dword:B1F80000
    "MemLen"=dword:00040000
    "ScratchReg"=dword:C0000000
    "FlashReg"=dword:71000000


    got the following errors when booting:

    Quote:
    Loaded 'lpd_msflashfmd_a40x_50_0_1_0.dl', no matching symbolic information found.
    4294769668 PID:65fe43da TID:65fe43b6 0x85fe4174: ERROR: InitializeFlash: invalid manufacturing code.
    4294769668 PID:65fe43da TID:65fe43b6 0x85fe4174: ERROR: FMD_Init: Failed to initialize flash.
    4294769669 PID:65fe43da TID:65fe43b6 0x85fe4174: FLASHDRV.DLL:Unable to initialize FLASH Media Driver (FMD).
    4294769669 PID:65fe43da TID:65fe43b6 0x85fe4174: Invalid handle: Set=1 Method=2
    4294769670 PID:65fe43da TID:65fe43b6 0x85fe4174: FLASHDRV.DLL:CP_StopCompactor() - Unable to suspend compactor thread!!!
    4294769670 PID:65fe43da TID:65fe43b6 0x85fe4174: FLASHDRV.DLL:CP_DeinitCompactor() - Unable to stop compactor, CP_StopCompactor() failed
    4294769670 PID:65fe43da TID:65fe43b6 0x85fe4174: Deleting an uninitialized critical section, ignored!
    4294769671 PID:65fe43da TID:65fe43b6 0x85fe4174: Deleting an uninitialized critical section, ignored!
    4294769693 PID:65fe43da TID:65fe43b6 0x85fe4174: >>> Loading module mspart.dll at address 0x03CE0000-0x03CEE000 (RW data at 0x01FDF000-0x01FDF4AC)


    So I'm still stuck. Any suggestions??
    ftiernan
    New Member
    New Member
    Posts:


    --
    16 Sep 2006 07:00 PM
    I addition the the approach tried in the earlier post thouoght I'd try one more angle so I removed the lpd_MSFLASHFMD componend and installed the YAFSS component and did the erase, add, mount lolo commands as shown below
    Quote:
    losh> erase 0x00f00000 0x00100000
    unlocking flash blocks
    erasing flash: 100%
    locking flash blocks
    erased '/dev/flash0' start=0xf00000: len=0x100000 bytes
    losh> add-yaffs data nor 0x00f00000 0x00100000
    add-yaffs: inserted: start 0xf00000 - len 0x100000
    losh> mount yaffs /data
    Mounting a YAFFS partition.

    ---------------------------------------------------
    Starting YAFFS file system:
    Current YAFFS partition table:
    0: data 00000000 - 00000003 ( 0)
    1: <NULL>
    2: <NULL>
    3: <NULL>
    YAFFS initialized.
    ---------------------------------------------------


    on boot i got the following messages:

    Quote:
    4294769676 PID:e5fe43da TID:e5fe43b6 0x85fe4174: >>> Loading module lpd_yaffs_cfi_a40x_50_1_1_0.dll at address 0x033E0000-0x033EB000 (RW data at 0x01F52000-0x01F524D4)
    Loaded 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\LPD_YAFFS_CFI_A40X_50_1_1_0.DLL', no matching symbolic information found.
    4294769677 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS_CFI:+:DLL_PROCESS_ATTACH
    4294769699 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS_CFI:i:detected (2) CFI chip(s)
    4294769700 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS_CFI:i:b:0x46000000 l:2000000 bs:40000 eb:7F cpb:496
    4294769911 PID:e5fe43da TID:e5fe43b6 0x85fe4174: >>> Loading module lpd_yaffs_partdrv_a40x_50_1_1_0.dll at address 0x033D0000-0x033D8000 (RW data at 0x01F50000-0x01F5049C)
    Loaded 'lpd_yaffs_partdrv_a40x_50_1_1_0.exe', no matching symbolic information found.
    4294769912 PID:e5fe43da TID:e5fe43b6 0x85fe4174: Loading partition driver lpd_yaffs_partdrv_a40x_50_1_1_0.dll hModule=85FB2E18
    4294769913 PID:e5fe43da TID:e5fe43b6 0x85fe4174: Driver lpd_yaffs_partdrv_a40x_50_1_1_0.dll loaded
    4294769917 PID:e5fe43da TID:e5fe43b6 0x85fe4174: Opened the store hStore=000B1FD0
    4294769918 PID:e5fe43da TID:e5fe43b6 0x85fe4174: NumSec=63550 BytesPerSec=528 FreeSec=0 BiggestCreatable=0
    4294769918 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS_PARTDRV!PD_IsStoreFormatted ???
    4294769919 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS_PARTDRV!PD_IsStoreFormatted ???
    4294769919 PID:e5fe43da TID:e5fe43b6 0x85fe4174: Partition YaffsPart1 NumSectors=29760
    4294769943 PID:e5fe43da TID:e5fe43b6 0x85fe4174: >>> Loading module lpd_yaffs_a40x_50_1_1_0.dll at address 0x033F0000-0x0340C000 (RW data at 0x01F54000-0x01F56A9C)
    Loaded 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\LPD_YAFFS_A40X_50_1_1_0.DLL', no matching symbolic information found.
    4294769945 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS::DllMain(1)+
    4294769954 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS:+:YFSD_MountDisk(0x000B3130)
    4294769954 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS::InitialiseWinFiles
    4294769955 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS:+:YFSD_InitVolume(0x000B3130, 0x000B33A0)
    4294769956 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: volume name 'YaffsPart1'
    4294769956 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block size '262144'
    4294769957 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yrawcfi w/ 58 blocks
    4294769962 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 1 is bad
    4294769962 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 2 is bad
    4294769963 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 3 is bad
    4294769964 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 4 is bad
    4294769964 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 5 is bad
    4294769965 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 6 is bad
    4294769966 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 7 is bad
    4294769966 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 8 is bad
    4294769967 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 9 is bad
    4294769968 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 10 is bad
    4294769969 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 11 is bad
    4294769970 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 12 is bad
    4294769971 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 13 is bad
    4294769971 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 14 is bad
    4294769972 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 15 is bad
    4294769973 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 16 is bad
    4294769973 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 17 is bad
    4294769973 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 18 is bad
    4294769975 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 19 is bad
    4294769975 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 20 is bad
    4294769976 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 21 is bad
    4294769976 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 22 is bad
    4294769977 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 23 is bad
    4294769978 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 24 is bad
    4294769979 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 25 is bad
    4294769980 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 26 is bad
    4294769981 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 27 is bad
    4294769981 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 28 is bad
    4294769982 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 29 is bad
    4294769983 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 30 is bad
    4294769983 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 31 is bad
    4294769983 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 32 is bad
    4294769984 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 33 is bad
    4294769984 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 34 is bad
    4294769985 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 35 is bad
    4294769985 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 36 is bad
    4294769986 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 37 is bad
    4294769986 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 38 is bad
    4294769986 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 39 is bad
    4294769987 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 40 is bad
    4294769987 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 41 is bad
    4294769988 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 42 is bad
    4294769988 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 43 is bad
    4294769989 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 44 is bad
    4294769989 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 45 is bad
    4294769998 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 46 is bad
    4294770006 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 47 is bad
    4294770008 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 48 is bad
    4294770009 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 49 is bad
    4294770010 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 50 is bad
    4294770010 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 51 is bad
    4294770011 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 52 is bad
    4294770012 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 53 is bad
    4294770013 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 54 is bad
    4294770013 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 55 is bad
    4294770015 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 56 is bad
    4294770015 PID:e5fe43da TID:e5fe43b6 0x85fe4174: yaffs:: block 57 is bad
    4294770017 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS::Done yaffs_GutsInitialise
    4294770017 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS::Blocks start 0 end 58 Group size 1 bits 0
    4294770018 PID:e5fe43da TID:e5fe43b6 0x85fe4174: FS: Registering file system YaffsPart1, index 4, flags 0x00000000
    4294770020 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS:-:YFSD_InitVolume() = TRUE
    4294770020 PID:e5fe43da TID:e5fe43b6 0x85fe4174: YAFFS:-:YFSD_MountDisk() = TRUE
    4294770021 PID:e5fe43da TID:e5fe43b6 0x85fe4174: FS: Mount complete (YaffsPart1, index 4, flags 0x00000000)
    4294770038 PID:e5fe43da TID:e5fe43b6 0x85fe4174: >>> Loading module relfsd.dll at address 0x03E40000-0x03E4B000 (RW data at 0x01FEB000-0x01FEBADC)


    I can see the YaffsPart1 icon on the "My Device" screen of system.

    In my application i tried to create a file using the following
    Quote:

    hFlashFile = CreateFile(TEXT ("YaffsPart1"),GENERIC_WRITE|GENERIC_READ,
    FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,
    FILE_ATTRIBUTE_NORMAL,NULL);


    when executed debug gave the following:

    Quote:

    2680708 PID:e5fe43da TID:a5d95f06 0x85df78bc: YAFFS::YFSD_CreateFileW unable to get parent node (b5600,
    2680709 PID:a5e46242 TID:a5d95f06 0x85df78bc: Invalid handle: Set=7 Method=3


    So... looks like I still need some help here. Thanks -- Frank
    Anonymous
    Posts:


    --
    18 Sep 2006 11:34 AM
    Frank,

    From the sound of it you're using the flashfmd driver and then trying to access the data via YAFFS in LogicLoader. While I can't specifically solve your issues for you I can offer the following information that should be kept in mind:

    http://www.logicpd.com/do...fs_a40x_50_1_1_0.zip

    - FlashFMD is not a recommended driver because of its instability at time, this is due to it being Microsoft's code.

    - FLashFMD is a FAT format file system, LogicLoader does not use FAT it uses a YAFFS partition. Therefore corruption will occur because you're probably trying to use two different formats in the same block of flash.

    - The yaffs driver for Windows CE can be used to share data between Logicloader and Windows CE because they both use the YAFFS file system format.

    - Your yaffs partition in Windows CE and in LogicLoader need to be the same size and at the same start and end address in flash memory otherwise corruption is going to occur.

    Hopefully this will help you move forward.

    Thanks,
    ftiernan
    New Member
    New Member
    Posts:


    --
    25 Sep 2006 11:47 PM
    Thanks for the help Aaron. I think I am almost there just need one more bit of help.

    I loaded the yaffs component and latest version of logic loader and set up storagemanager and set up the partition via logic loader. It boots cleanly and I and can find and open the store and partition from my application. I know this works because I get valid handles to both and can read elements of the STOREINFO and PARTINFO structures into my debug here is a section of the code that does this:
    Quote:
    hFlashStore = FindFirstStore(&MyStore);
    NKDbgPrintfW(TEXT("Store info = %s \r\n"), MyStore.szDeviceName);

    hDevice = OpenStore(MyStore.szDeviceName);


    DismountStore(hDevice);
    FormatStore(hDevice);
    FindFirstPartition(hDevice, &MyPartition);

    hPartition = OpenPartition(hDevice,MyPartition.szPartitionName);

    FormatPartition(hPartition);
    MountPartition(hPartition);


    NKDbgPrintfW(TEXT("Partition name = %s \r\n"), MyPartition.szPartitionName);
    NKDbgPrintfW(TEXT("Partition volume name = %s \r\n"), MyPartition.szVolumeName);



    and here is the relevent debug output
    Quote:
    815800 PID:5e1824e TID:5da5fc6 0x85d7c740: Store info = lpd_yaf
    2815803 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS:+:YFSD_UnmountDisk(0x000B3490)
    2815804 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS:-:YFSD_UnmountDisk() = TRUE
    2815806 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS::DllMain(0)-
    2815807 PID:45fe43da TID:5da5fc6 0x85d7c740: <<< Unloading module lpd_yaffs_a40x_50_1_1_0.dll at address 0x033F0000-0x0340C000 (RW data at 0x01F54000-0x01F56A9C)
    Unloaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\LPD_YAFFS_A40X_50_1_1_0.DLL'
    2815809 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS_PARTDRV!PD_FormatStore ???
    2858095 PID:45fe43da TID:5da5fc6 0x85d7c740: >>> Loading module lpd_yaffs_a40x_50_1_1_0.dll at address 0x033F0000-0x0340C000 (RW data at 0x01F54000-0x01F56A9C)
    Loaded 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\LPD_YAFFS_A40X_50_1_1_0.DLL', no matching symbolic information found.
    2858165 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS::DllMain(1)+
    2858174 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS:+:YFSD_MountDisk(0x000B34C0)
    2858175 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS::InitialiseWinFiles
    2858175 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS:+:YFSD_InitVolume(0x000B34C0, 0x000B3730)
    2858176 PID:45fe43da TID:5da5fc6 0x85d7c740: yaffs:: volume name 'YaffsPart1'
    2858177 PID:45fe43da TID:5da5fc6 0x85d7c740: yaffs:: block size '262144'
    2858177 PID:45fe43da TID:5da5fc6 0x85d7c740: yrawcfi w/ 58 blocks
    2858203 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS::Done yaffs_GutsInitialise
    2858203 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS::Blocks start 0 end 58 Group size 1 bits 0
    2858205 PID:45fe43da TID:5da5fc6 0x85d7c740: FS: Registering file system YaffsPart1, index 4, flags 0x00000000
    2858207 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS:-:YFSD_InitVolume() = TRUE
    2858207 PID:45fe43da TID:5da5fc6 0x85d7c740: YAFFS:-:YFSD_MountDisk() = TRUE
    2858208 PID:45fe43da TID:5da5fc6 0x85d7c740: FS: Mount complete (YaffsPart1, index 4, flags 0x00000000)
    2858212 PID:5e1824e TID:5da5fc6 0x85d7c740: Partition name = YaffsPart1
    2858213 PID:5e1824e TID:5da5fc6 0x85d7c740: Partition volume name =
    My problem is that I can never get a valid handle when I try to then use CreateFile function. I believe my problem is with the lpFileName argument. I have tried various variations on the following line of code
    Quote:
    hFlashFile = CreateFile(TEXT("DSK1:"),GENERIC_READ|GENERIC_WRITE,
    FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,
    0,NULL);

    including "DSK1", "DSK0:", "DSK0", "/dev/flash0", "YaffsPart1", "YaffsPart1:" but nothing seems to work. Any suggestions? TIA. - Frank
    Anonymous
    Posts:


    --
    26 Sep 2006 12:03 PM
    Hi Frank,

    Have you had a chance to go through the YAFFS driver doc?
    http://www.logicpd.com/do...25/1003778_Rev_B.pdf

    Thanks,
    ftiernan
    New Member
    New Member
    Posts:


    --
    27 Sep 2006 10:18 PM
    Hi Aaron,

    I went back and carefully read the referenced document. I did have an error in my lpd_yaffs_a40x_50_1_1_0.reg so I removed both the yaffs and storage manager component from my workspace, did a sysgen and checked that my app worked properly which it did. I then modified the lpd_yaffs_a40x_50_1_1_0.reg file and then added both the yaffs component and the storage manager component back into my workspace, did a sysgen and then followed the steps for adding YAFFA Type Partition in the LogicLoader User Manual (erase 0x00f00000 0x00100000, add-yaffs data nor 0x00f00000 0x00100000, mount yaffs /data) and tried to reboot which failed with the following debug output (sorry for the length)
    Quote:
    The Kernel Debugger is waiting to connect with target.
    0 PID:0 TID:0 Booting Windows CE version 5.00 for (ARM)
    0 PID:0 TID:0 &pTOC = 800e180c, pTOC = 8065d0d8, pTOC->ulRamFree = 81074000, MemForPT = 00000000
    0 PID:0 TID:0
    Old or invalid version stamp in kernel structures - starting clean!
    0 PID:0 TID:0 Configuring: Primary pages: 2954, Secondary pages: 8190, Filesystem pages = 5572
    0 PID:0 TID:0
    Booting kernel with clean memory configuration:
    0 PID:0 TID:0 Memory Sections:
    0 PID:0 TID:0 [0] : start: 81075000, extension: 00001000, length: 00b8a000
    0 PID:0 TID:0 [1] : start: 84000000, extension: 00002000, length: 01ffe000
    0 PID:0 TID:0 Sp=ffffc7cc
    1 PID:0 TID:0 Windows CE KernelInit
    4294767296 PID:5fff002 TID:5fff266 Updated eptr->e32_vsize to = 000b4000
    4294767298 PID:5fff002 TID:5fff266 Scheduling the first thread.
    4294767299 PID:5fff002 TID:5fff266 0x85fff024: KernelInit2: pCurThread=85fff024 hCurThread=05fff266 hCurProc=05fff002, KernelInit = 8011b474
    4294767300 PID:5fff002 TID:5fff266 0x85fff024: Detecting VFP...
    4294767301 PID:5fff002 TID:5fff266 0x85fff024: VFP Not Found!
    4294767302 PID:5fff002 TID:5fff266 0x85fff024: Updated eptr->e32_vsize to = 00006000
    4294767303 PID:5fff002 TID:5fff266 0x85fff024: Hdstub loaded
    4294767303 PID:5fff002 TID:5fff266 0x85fff024: Updated eptr->e32_vsize to = 00029000
    4294767305 PID:5fff002 TID:5fff266 0x85fff024: OsaxsT0 loaded
    4294767306 PID:5fff002 TID:5fff266 0x85fff024: Updated eptr->e32_vsize to = 00009000
    4294767307 PID:5fff002 TID:5fff266 0x85fff024: OsAxsT1 loaded
    4294767308 PID:5fff002 TID:5fff266 0x85fff024: Updated eptr->e32_vsize to = 00022000
    4294767309 PID:5fff002 TID:5fff266 0x85fff024: Debugger 'kd.dll' loaded
    4294767310 PID:5fff002 TID:5fff266 0x85fff024: Entering ConnectDebugger
    4294767310 PID:5fff002 TID:5fff266 0x85fff024: Starting kernel debugger software probe (KdStub) - KD API version 18
    4294767315 PID:5fff002 TID:5fff266 0x85fff024: >>> Loading module NK.EXE at address 0x800E0000-0x80194000 (RW data at 0x81006000-0x810563FF)
    Kernel debugger connected.
    The Kernel Debugger connection has been established (Target CPU is ARM).
    Target name: CE Device
    Probe name: KdStub
    Binary Image should be loaded at 0x800e0000 / Data relocated at 0x81006000
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\NK.EXE'
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\KD.DLL'
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\OSAXST1.DLL'
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\OSAXST0.DLL'
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\HD.DLL'
    4294767325 PID:5fff002 TID:5fff266 0x85fff024: first = 01f50000, last = 02000000, SharedDllBase = 03480000
    4294767389 PID:5fff002 TID:5fff266 0x85fff024: >>> Loading module coredll.dll at address 0x03F40000-0x03FF3000 (RW data at 0x01FFE000-0x01FFF145)
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\COREDLL.DLL'
    4294767473 PID:45fe43da TID:45fe43b6 0x85fe4174: >>> Loading module coredll.dll at address 0x03F40000-0x03FF3000 (RW data at 0x01FFE000-0x01FFF145)
    4294767476 PID:45fe43da TID:45fe43b6 0x85fe4174: >>> Loading module filesys.exe at address 0x04010000-0x0409C000
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\FILESYS.EXE'
    4294767479 PID:45fe43da TID:45fe43b6 0x85fe4174: CertMod.dll not found, using old OEM Trust Model
    4294767495 PID:45fe43da TID:45fe43b6 0x85fe4174: FileSystem Starting - starting with clean file system
    4294767498 PID:45fe43da TID:45fe43b6 0x85fe4174: FS: initializing ROM/RAM file system
    4294767499 PID:45fe43da TID:45fe43b6 0x85fe4174: SC_CreateAPIHandle: pvData == NULL
    4294767500 PID:45fe43da TID:45fe43b6 0x85fe4174: FS: Registering file system ROM, index 2, flags 0x00000031
    4294767500 PID:45fe43da TID:45fe43b6 0x85fe4174: FS: Mount complete (ROM, index 2, flags 0x00000031)
    4294768049 PID:45fe43da TID:45fe43b6 0x85fe4174: Succeeded on CheckFile
    4294768050 PID:45fe43da TID:45fe43b6 0x85fe4174: RestoreFile(0xc5fc9dd2) called fDelete = TRUE
    4294769582 PID:45fe43da TID:45fe43b6 0x85fe4174: >>> Loading module fsdmgr.dll at address 0x03D50000-0x03D7E000 (RW data at 0x01FE8000-0x01FE8808)
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\FSDMGR.DLL'
    4294769584 PID:45fe43da TID:45fe43b6 0x85fe4174: FS: Registering file system StoreMgr, index 3, flags 0x00000001
    4294769608 PID:45fe43da TID:45fe43b6 0x85fe4174: >>> Loading module ceddk.dll at address 0x03D40000-0x03D49000 (RW data at 0x01FE6000-0x01FE60FC)
    Loaded symbols for 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\CEDDK.DLL'
    4294769611 PID:45fe43da TID:45fe43b6 0x85fe4174: >>> Loading module lpd_yaffs_cfi_a40x_50_1_1_0.dll at address 0x03490000-0x0349B000 (RW data at 0x01F61000-0x01F614D4)
    Loaded 'C:\WINCE500\PBWORKSPACES\FRANK_Q_VGA\RELDIR\LOCE_ARMV4I_DEBUG\LPD_YAFFS_CFI_A40X_50_1_1_0.DLL', no matching symbolic information found.
    4294769612 PID:45fe43da TID:45fe43b6 0x85fe4174: YAFFS_CFI:+:DLL_PROCESS_ATTACH
    4294769626 PID:45fe43da TID:45fe43b6 0x85fe4174: YAFFS_CFI:i:detected (2) CFI chip(s)
    4294769626 PID:45fe43da TID:45fe43b6 0x85fe4174: YAFFS_CFI:i:b:0x46000000 l:1000000 bs:40000 eb:3F cpb:496
    4294769816 PID:45fe43da TID:45fe43b6 0x85fe4174: >>> Loading module lpd_yaffs_partdrv_a40x_50_1_1_0.dll at address 0x03480000-0x03488000 (RW data at 0x01F5F000-0x01F5F49C)
    Loaded 'lpd_yaffs_partdrv_a40x_50_1_1_0.exe', no matching symbolic information found.
    4294769817 PID:45fe43da TID:45fe43b6 0x85fe4174: Loading partition driver lpd_yaffs_partdrv_a40x_50_1_1_0.dll hModule=85FB7E08
    4294769818 PID:45fe43da TID:45fe43b6 0x85fe4174: Driver lpd_yaffs_partdrv_a40x_50_1_1_0.dll loaded
    4294769821 PID:45fe43da TID:45fe43b6 0x85fe4174: YAFFS_PARTDRV!PD_OpenStore Part 0 range error
    4294769822 PID:45fe43da TID:45fe43b6 0x85fe4174: YAFFS_PARTDRV!PD_OpenStore ???
    4294769823 PID:45fe43da TID:45fe43b6 0x85fe4174: CStore Destructor(000B0DD0)
    4294769824 PID:45fe43da TID:45fe43b6 0x85fe4174: <<< Unloading module lpd_yaffs_partdrv_a40x_50_1_1_0.dll at address 0x03480000-0x03488000 (RW data at 0x01F5F000-0x01F5F49C)
    Unloaded symbols for 'lpd_yaffs_partdrv_a40x_50_1_1_0.exe'
    4294769826 PID:45fe43da TID:45fe43b6 0x85fe4174: KPROCSTKSIZE = 00010000 (tls = 040aff00, tlsNonSec = 040aff00)
    4294769826 PID:45fe43da TID:45fe43b6 0x85fe4174: dwAddr = 0x40ae000, dwLen = 0x0, dwStkBeg = 0x40a0000, dwStkEnd = 0x40b0000
    4294769827 PID:45fe43da TID:45fe43b6 0x85fe4174: NK Kernel: DEBUGCHK failed in file c:\macallan\private\winceos\coreos\nk\kernel\virtmem.c at line 181


    The entries I made in lpd_yaffs_a40x_50_1_1_0.reg are
    Quote:
    IF LOCE_LHA400_10
    "FlashReg"=dword:71000000
    "FlashRegFPENbit"=dword:0
    "MemBase"=dword:00000000
    "MemLen"=dword:01000000
    "ScratchReg"=dword:C0000000
    ENDIF
    and
    Quote:
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\lpd_yaffsbd\YAFFS_PARTDRV\PART00]
    "StartAddr"=dword:00f00000
    "EndAddr"=dword:00100000
    "Name"="YaffsPart1"
    "PartType"="0"
    "ReadOnly"=dword:0
    I am wondering if I may have a hardware incompatability. I am using SDK-LH7A400-10-6416 which I purchased from Digikey a couple of years ago. Also I see a references in PB Help to adding an envirnomental variable to use with Storage Manager (SYSGEN_STOREMGR environment variable)(which I did not do since it was not mentioned in your reference document). Anyway, sorry this is taking so much of your time. Thanks for any further suggestions you may have.

    Frank
    ftiernan
    New Member
    New Member
    Posts:


    --
    30 Sep 2006 06:16 PM
    Hello Aaron,

    Just a little follow up on this. The storage manager build envirnomental variable is not the issue as I learned that this was added automatically. In going back over the whole process one thing that looks strange is my logic loader output when setting up the yaffs partition. The output is:
    Quote:
    *****************************************************************

    LogicLoader

    (c) Copyright 2002-2005, Logic Product Development, Inc.
    All Rights Reserved.
    Version 2.0.6-LLH7a400_10 0001
    *****************************************************************

    losh>
    losh> ifconfig sm0 dhcp
    Starting DHCP on sm0
    losh> erase 0xF00000 0x100000
    unlocking flash blocks
    erasing flash: 100%
    erased '/dev/flash0' start=0xf00000: len=0x100000 bytes
    losh> add-yaffs data nor 0xf00000 0x100000
    add-yaffs: inserted: start 0xf00000 - len 0x100000
    losh> mount yaffs /data
    Mounting a YAFFS partition.

    ---------------------------------------------------
    Starting YAFFS file system:
    Current YAFFS partition table:
    0: data 00000000 - 00000003 ( 0)
    1: <NULL>
    2: <NULL>
    3: <NULL>
    YAFFS initialized.
    ---------------------------------------------------

    losh>


    the line:
    Quote:
    0: data 00000000 - 00000003 ( 0)

    looks strange to me. Shouldn't that show the start and stop address i entered i.e. "0: data 0x00f00000 - 0x00ffffff " ?
    Thanks again. - Frank
    You are not authorized to post a reply.