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 23 Nov 2004 10:59 AM by  mikee@logicpd.com
flash program won't boot
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ylin
New Member
New Member
Posts:


--
19 Nov 2004 01:30 PM
    My program in Flash memory is located where LOLO used to be...at address 0x00040000 I believe.

    On power up, Bolo executes, and it jumps straight to the program at Flash address 0x00040000.

    However, when I reset the evaluation board or power it down then power it up while my program was running, I get the BOLO welcome screen instead of the program located at 0x00040000.

    If my program ends properly, that is, return from main, then on the boot-up next time, i won't get BOLO welcome screen and it will jump to my program.

    My main() function is suppose to consist of an inifinite while loop, so in the application, I can't end the program before powering off the board.

    I'm not sure what is causing the BOLO screen to launch rather than my program.

    thanks,

    Yujie
    ylin
    New Member
    New Member
    Posts:


    --
    22 Nov 2004 01:00 PM
    I suspect it's because a RAM cookie gets set when BOLO executes the first time before jumping to my program in Flash, but the RAM cookie is not cleared before BOLO executes again next time on power up. What is a RAM cookie and how do I clear it in my software?

    thank you,

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


    --
    23 Nov 2004 10:59 AM
    ylin,

    You are correct that the likely culprit is the RAM cookie.

    For a discussion about why this cookie is used, see Figure 3.1 BoLo/LoLo Interaction and Boot Sequence in the LogicLoader user's manual.

    The location of the cookie varies from release to release of the LogicLoader because it is assigned at link-time. Therefore, to erase it, you should be able to just erase the entire BoLo run-time execution section of RAM.

    Using PN_70000085_Rev_C.pdf I can see that BoLo executes from 0xC0000000 to 0xC00C0000. So, to blow this entire thing away, I would do something like this:


    my_app_main.c

    main()
    {
    /* Erase Logic's BoLo bootloader. */
    unsigned int *ptr;

    ptr = (unsigned int *)0xC0000000;

    while ( ptr < 0xC00C0000 )
    {
    *ptr = 0;
    ptr++;
    }

    /* Now I can do whatever else my application does. */
    }


    Now, erasing the entire BoLo space is a bit overkill, as the cookie will exist somewhere up in BoLo's heap space. So, you could play around and optimize that loop (say only erasing the top 1K) if you wanted to. However, you may want to reclaim that RAM space for your own application. If that is the case, zero-ing the entire area out is probably for the best anyway.

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