Search

Technical Discussion Group Forum

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

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

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

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06 May 2004 01:32 PM by  mikee@logicpd.com
How to Relocate from Flash to SRAM
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
dchermak
New Member
New Member
Posts:10


--
05 May 2004 11:37 AM
    Greetings.

    I remember from the training class that it is possible to relocate the image from Flash to SRAM to help speed things up execution-wise, and the particular application I am working on needs all the speed it can get. So I was wondering how this was done. Looking around I noticed people discussing the use of the C flag in BIB files, but they seem to be talking about induvidual applications, not the whole image.

    Thanks,

    Dale
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    06 May 2004 11:50 AM
    Hi Dale,

    Excellent question. You can build an image that relocates itself from Flash to RAM by setting the environment variable "RELOCATE_FROM_FLASH".

    To do this, go to your Wince420\Platform\LoCE_A400_xxx_xxx\LoCE_A400_xxx_xxx.bat file. On or around line 73 you will see this environment variable. Set it equal to 1.

    Note, you should have the environment variable "IMGFLASH" set to zero when you do this. Also, if you are building from the IDE, clear the "enable image for flash" checkbox in the Paltform Settings dialog.

    Once you make these changes, you'll have to completely re-build you platform.

    Please let me know if you have any other questions.

    Best regards,
    --mikee
    dchermak
    New Member
    New Member
    Posts:10


    --
    06 May 2004 01:00 PM
    Couple more questions:

    Since I primarily use the PB IDE, can I just set the "RELOCATE_FROM_FLASH" and "IMGFLASH" environment variables there? In one of the Settings dialogs for example.

    Since I clear the "enable image for flash" checkbox, do I still "burn" the image to flash as usual from the LOLO shell? Or is there another procedure? At the moment I download from PB using LOLO bootme, use burn to get it from RAM to flash, then exec.

    Lastly, I am using the hive registry, and I know it is "touchy" when it comes to boot changes. Just want to make sure all this relo stuff happens, like I assume it would, before the registry comes along so as not to cause any problems in this area.

    Thanks again,

    Dale
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    06 May 2004 01:32 PM
    Dale.

    There is no "RELOCATE_FROM_FLASH" checkbox in the IDE. That is a LogicPD special Basically, Microsoft doesn't really support programmatically relocating an image from Flash to RAM. We've just had lots of customers need to do it, so our BSP supports it. Therefore, you'll need to use the batch file in this instance.

    This environment variable builds an image meant to execute out of SDRAM. However, we do a little trickery with the bin file so the LogicLoader will see it as an image that belongs in Flash. Therefore, you will still need to execute the "burn" command after downloading the image from Platform Builder.

    Lastly, I believe everything should be fine with your hive registry. Please post back if something goes wrong.

    Good luck,
    --mikee
    You are not authorized to post a reply.