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 18 Jul 2007 10:27 PM by  ftiernan
One more question about YAFFS
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ftiernan
New Member
New Member
Posts:


--
26 Apr 2007 10:10 PM
    I have YAFFS working in Debug mode - run from ram mode (PB 4.2 CE 5.0) but the release version (relocate from flash mode) hangs on startup. That is, it does not start. I have built two workspaces in PB one with YAFFS and one without. The one without work fine in both Debug version (ram mode) and Release version - relocate from flash mode (applications launches automatically on power up). The one with YAFFS only works in debug version - ram mode. The same H/W is used in each case. LH7A400-10 with 32MB of nor FLASH. Any suggestions? thanks.

    One more thing.. here is the .reg file showing where i am placing the YAFFS files
    Quote:
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\lpd_yaffsbd\YAFFS_PARTDRV\PART00]
    "StartAddr"=dword:01dc0000
    "EndAddr"=dword:01fc0000
    "Name"="YaffsPart1"
    "PartType"="0"
    "ReadOnly"=dword:0


    Further input a few days later....

    In trying to narrow down the problem I took out all calls in my application to the YAFFS functions. Then tried running the Release version first directly from RAM. It worked. Here's the entries from Tera Term:
    Quote:

    image launch addr: 0xc0201000

    Verifying checksums: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>
    Checksums good.
    BOOTME: loaded
    BOOTME: Got jump command

    losh> exec


    But when I changed the Platform Settings to have the program "Relocate from Flash" it would not start. Here's the entries from Tera Term:
    Quote:

    image launch addr: 0x00101000

    Verifying checksums: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>
    Checksums good.
    BOOTME: loaded
    BOOTME: Got jump command

    losh> burn
    burning 5750968 bytes from c0200000 to /dev/flash0
    unlocking flash blocks
    erasing flash: 100%
    burning flash: 100%
    burn good (5750968 bytes)
    losh> exec 0x00101000
    kernel cmdline: '0x00101000:ip_addr:192.168.1.2' at c005bfd8


    Then I removed the YAFFS driver from the platform and repeated the two methods of launching the program as described above. In this case it worked both times. I.e. it ran successfully as either directly from RAM and as Relocate from Flash. So it seems that simply adding the YAFFS driver to my platform causes it not to work in the "Relocate from Flash" mode.

    Just for further reference I am using:
    "lpd_yaffs_cfi_a40x_50_1_1_0.dll"

    and

    Logic Loader version
    Version 2.0.5p1-LLH7a400_10 0001

    Again, thanks for any help you can provide.

    Frank T.
    ftiernan
    New Member
    New Member
    Posts:


    --
    18 Jul 2007 10:27 PM
    I ended up going through Logic Support to get an answer on this which I will briefly summarize here for others that may be wondering about this. Baiscally Logic recommended not using the "Relocate for Flash" setting in PB when building the platform. After building the release version as a "run from ram" type I then used the cp logic loader command to copy the nk.bin file into one of the yaffs partitions. One complication I ran into here was that I needed to do this over ethernet connection as I did not have a CF card as part of my platform. To do the copy over the ethernet connection required loading a tftp driver on my pc since windows XP does not come with one. I used one from "winagents". Once that was installed I could use the cp command with the following syntax:


    Quote:
    cp /tftp/<pc's ip address>.nk.bin /boot/nk.bin


    where /boot is the name of one of the yaffs partitions set up. In order to store program data a second yaffs partition is created such as /data and that is the partition accessed programaticly.

    To load the nk.bin on start up a config script is created and loaded using the
    Quote:
    config S <size of script in bytes>
    command. The config script contains text which both adds and mounts the yaffs partions (using the add-yaffs and mount yaffs commands) and loads the nk.boot file from the /boot partition using the command
    Quote:
    load bin /boot/nk.bin


    Hope this helps. - FT
    You are not authorized to post a reply.