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 04 Oct 2004 10:27 PM by  patricegagnon@patricegagn
Problems using RAM version of BoLo to flash elf or srecs
 11 Replies
Sort:
You are not authorized to post a reply.
Author Messages
derek_snow@mentor.com
New Member
New Member
Posts:


--
23 Mar 2004 11:18 AM
    I recently tried flashing the flash version of bolo (LH7A400-10_BoLo_Flash_ver_1_2_5) from the LogicPD website both in its elf format and converting to an srec using FROMELF with the -32 agrument and did not have success with either. The actual output from the terminal when trying the elf and srecs are pasted below.

    losh> load elf
    loading from stdin:
    0xc00d2bf8 7f 45 4c 46 61 28 34 64 f8 34 20 28 54 e4 f7 e4 .ELFa(4d.4 (T...
    0xc00d2c08 f7 ea f0 9f e5 f0 9f e5 f0 9f e5 f0 9f e5 a0 e1 ................
    0xc00d2c18 f0 9f e5 f0 9f e5 c0 c0 c0 c0 c0 c0 a0 e1 a0 e1 ................
    0xc00d2c28 68 9f e5 a0 h...
    ELF file must be: ARM, and elf-current:
    load failed

    elf file type : 0xeaf7
    machine type: 9ff0 version: -442502939
    prog start addr : 0xf0e59ff0
    num prog headers: 57760
    num sect headers: 40808
    offset : 0xc00d2f5c disk length: 0xc00c9720 mem len: 0x00000000
    phyaddr: 0xc00c9528 vaddr : 0xc00d2b4c dl addr: 0x00000000
    elf load failed.
    ignoring rest of file... 44453 bytes. done

    losh> load srec
    loading from stdin:
    download of '' complete:
    bytes: 1495271949 records: 3968 start: 00000000
    extent: 0x00000000-0x59200a0d


    I am using the RAM version of BoLO to do the flashing that is also posted on the Logic site after running the bs_7400_dbg.elf for a few secs. Should I be able to accomplish the above without any problems? Please let me know of any steps that I may not be taking. I had no problems performing these tasks with the LH7A404.

    Thanks,
    Derek
    derek_snow@mentor.com
    New Member
    New Member
    Posts:


    --
    24 Mar 2004 10:10 AM
    Can anyone verify the above issues with a LH7A400 using the Zoom starter kit? The Part # is 80000126-0033 and revision A01. I am using the bs_7400_dbg.elf to perform the boot strap initialization (run for a few secs), the bolo_LLH7a400_10_LCE_strip_RAM to run BOLO from RAM, and LH7a400-10_BoLo_Flash_ver_1_2_2 and LH7a400-10_BoLo_Flash_ver_1_2_5 to try and flash BoLo back on the board using the load elf command. I am not sucessful with either elf image and receive the output as provided above. Multi-ICE is the debug connection being used. Any help on this issue would be greatly appreciated.

    Thanks,
    Derek
    picman@uk2.net
    New Member
    New Member
    Posts:


    --
    24 Mar 2004 02:04 PM
    Where did you get the boostrap file from?
    When i find it i will test it..
    derek_snow@mentor.com
    New Member
    New Member
    Posts:


    --
    24 Mar 2004 02:54 PM
    If you go to the downloads section (where the RAM and Flash versions of BoLo can be found) for the LH7A400 on the LogicPD support site and click on Archive files at the top it will take you to a another list of files and it is the first file under logic loader / boot loader section. Could you also let me know what revision of the board you are using and the steps that you are taking if sucessful.

    Thanks!
    Derek
    picman@uk2.net
    New Member
    New Member
    Posts:


    --
    24 Mar 2004 09:08 PM
    Ok,
    Part # is 80000126-0033 and revision A04
    I have version 1.2.0 of lolo on the board and version 1.2.2 of bolo..
    If i load LH7a400-10_BoLo_Flash_ver_1_2_5 this is the response.

    ok first i boot into bolo (holding q down and reset the board)


    losh> load elf
    loading from stdin:
    F.
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0x00000000
    num prog headers: 1
    num sect headers: 7
    offset : 0x00000054 disk length: 0x0000f7e4 mem len: 0x0000f7e4
    phyaddr: 0x00000000 vaddr : 0x00000000 dl addr: 0xc00c0000
    ignoring rest of file... 0 bytes. done
    running md5sum on the _loaded_ portion of the file:
    a40e30f80bcee2e29e501fef784cc3be - addr: c00c0000 len: 0000f7e4

    losh> burn


    *****************************************************************
    *****************************************************************

    Warning

    You are about to overwrite flash block zero.

    Flash block zero is the default boot sector for this device.
    If programming fails for any reason (power loss, bad image, etc.)
    your system may no longer boot.

    Even if programming completes successfully, if the new image
    does not boot properly your system may become useless.

    Confirmation is required before continuing

    *****************************************************************
    *****************************************************************

    Do you wish to continue? (y/n)
    Please type "confirm" to overwrite flash block zero: confirm

    Overwriting flash block zero.
    burning image to '/dev/flash0' at flash offset 0x00000000:
    burning 63460 bytes from c00c0000
    verifying burn.. burn good (63460 bytes)



    (reboot)

    ok now we will try flashing lolo in lolo

    Let lolo load up

    losh> CPLD_CE_REG_REVISION: 0x28 (rev: a)
    CPLD_CE_REG_MODE : 0x0e

    *****************************************************************
    Logic Block Zero Loader (BOLO)
    (c) Copyright 2002-2003, Logic Product Development, Inc.
    All Rights Reserved.
    Version BRA_release_1-2-pre1.2.5
    You have entered BOLO either because you specifically invoked it,
    or because no other program was found in the system's boot flash.

    TO EXIT, reset the system or use the 'jump' command
    *****************************************************************

    Available commands:
    load - download a binary image of type 'elf', or 'srec'
    burn - burns the already-loaded image into flash device 'device'
    erase - erases 'device' from start_address for length bytes
    jump - jump to a loaded image, or [address]
    exec - disable cache & ints, then jump to a loaded OS, or to [addr]
    w - write memory [of specified width] at addr
    x - examine memory with [width][format] at an addr for a [len]
    info - print information about: version, arch, mem, net, cpu
    help - print help for a single command or a group of commands.
    losh> info
    Version : BRA_release_1-2-pre1.2.5



    Now trying lolo

    losh> load elf
    loading from stdin:
    F..
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0x00040000
    num prog headers: 1
    num sect headers: 7
    offset : 0x00000054 disk length: 0x0002d1bc mem len: 0x0002d1bc
    phyaddr: 0x00040000 vaddr : 0x00040000 dl addr: 0xc00c0000
    ignoring rest of file... 87 bytes. done
    running md5sum on the _loaded_ portion of the file:
    c4249a93d0a5d8881bace6f38e7705cf - addr: c00c0000 len: 0002d1bc

    losh> burn
    burning image to '/dev/flash0' at flash offset 0x00040000:
    burning 184764 bytes from c00c0000
    verifying burn.. burn good (184764 bytes)
    losh>


    (reboot)


    *****************************************************************
    LogicLoader

    (c) Copyright 2002-2003, Logic Product Development, Inc.
    All Rights Reserved.
    Version BRA_release_1-2-pre1.2.5
    *****************************************************************

    Available commands:
    load - download a binary image of type 'elf', or 'srec'
    burn - burns the already-loaded image into flash device 'device'
    erase - erases 'device' from start_address for length bytes
    jump - jump to a loaded image, or [address]
    exec - disable cache & ints, then jump to a loaded OS, or to [addr]
    source - execute a series of losh commands stored in <filename>
    w - write memory [of specified width] at addr
    x - examine memory with [width][format] at an addr for a [len]
    date - display the number of seconds since boot
    info - print information about: version, arch, mem, net, cpu
    help - print help for a single command or a group of commands.
    losh>


    Seems to work....

    I have not converted the files at all, just downloaded them and burned them...

    From what i can tell the boot loader will just get the board to a init state, but when i download it i just get..

    llosh> load elf
    loading from stdin:
    R.
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0xb0000000
    num prog headers: 1
    num sect headers: 10
    offset : 0x00008000 disk length: 0x00000224 mem len: 0x00000224
    phyaddr: 0xb0000000 vaddr : 0xb0000000 dl addr: 0xb0000000
    ignoring rest of file... 3566 bytes. done
    running md5sum on the _loaded_ portion of the file:
    ee635544a74fa1a9b1bab75595fa895d - addr: b0000000 len: 00000224

    losh> jump
    jumping to: b0000000...

    and it hangs....

    or

    losh> load elf
    loading from stdin:
    R.
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0xb0000000
    num prog headers: 1
    num sect headers: 10
    offset : 0x00008000 disk length: 0x00000224 mem len: 0x00000224
    phyaddr: 0xb0000000 vaddr : 0xb0000000 dl addr: 0xb0000000
    ignoring rest of file... 3569 bytes. done
    running md5sum on the _loaded_ portion of the file:
    ee635544a74fa1a9b1bab75595fa895d - addr: b0000000 len: 00000224
    losh> exec 0xb0000000
    kernel cmdline: '0xb0000000' at c00c0100
    disabling mmu.

    and it hangs...?


    Why are you using the bootloader?
    I'm not quite sure what you are trying to do..

    Is your board totally dead?
    If so how are you getting the board up to load bolo_LLH7a400_10_LCE_strip_RAM?

    What does the bs_7400_dbg.elf do on your board?(cus it does nothing here!)

    As far as i can see,(correct me if i am wrong) but a totally dead board (flash erased) is gonna be difficult to get back to life without removing the flash and reprogramming it?
    My flash has 2 marks of white paint on one flash and one on the other, this tells me that LOGIC program the flash before it gets mounted on the board, (but i could be wrong) if this is the case, why don't they program it on the board? Because its loads of hasstle by the look of it??

    I am trying to get an external flash to boot, and all know bootloaders for the LH7A400 does not seem to work.

    There is just not enough info or support for this board unless you want to pay loads of money...
    I really don't understand companies that produce nice cheap dev boards but want to charge you $5000 for the source code for the boot loader thats on the board, i haven't even asked the price of the source for the CPLD.....

    Why don't they give you some simple boot code (and the source) so ppl can get on and develop stuff with it.. (i know there is some boot code in the sharp bsp but i can't get that to boot either), after all the hardest part about writing stuff for embedded SOCs is getting the CPU up and running...

    Ok, i have had my moan now..

    It does seem to load both lolo and bolo new firmware fine...

    And another thing in all the docs i have seen it says it has 32 or 64MB sdram, but how can you tell, the chips on my board are 16MB devices, but all the source code i have seen seems to think there is 64MB as standard , again not enough info...

    Has anyone managed to get some boot code (other than lolo or bolo) working on this board?
    If so what, where, how?????


    Looks like there are more questions than answers...

    I have mailed LOGIC with the boot problem, but no reply, also sharp, same????

    I'm sure if i could get the board init, porting angel or some other simple boot loader would be much better, After all no one will release a project with LOGIC PD stamped on the boot loader.. will they???

    And i still can't see the point of the CPLD!
    I think its only there so you have to buy the code to it to make use of the board....

    Lets face it if you are going to develop a board using an ARM9, you must be serious about it, so you will prob have a jtag of some discription, how many times are you going to compile code the download it via the serial port????

    So LOGIC some simple boot code with the source would go a long way to making this board useable...


    Ok i'll shut up now...
    Anonymous
    Posts:


    --
    25 Mar 2004 10:41 AM
    Hello Picman and dSnow,

    First of all thanks for helping out dSnow to verify the LogicLoader bootloader.

    Logic has recently updated the LH7A400-10 card engine from revA to revB. PCN_195, available on the website, covers the hardware changes. Unfortunately the document doesn't cover Lolo changes. Lolo thru 1.2.4 covers revA, 1.2.5 covers revB. Past versions of lolo are available in the archive section of the downloads area. Use bolo and lolo rev 1.2.4 to bring up the kit. You are correct, this should have been documented better. We apologize and will work to resolve for any similar situations in the future.

    To address your questions.

    1. bootstrap and bolo_ram bootloader:
    bootstrap: for use with jtag emulator to initialize the board
    bolo_ram: after bootstrap has brought board up

    These files are used for a board with corrupted flash. If the flash isn't corrupted, then they're really not necessary. The two-level design was to allow developers to keep Bolo in block0 and replace block1 with their application. If the application doesn't work, etc, then the bootloader is still on the board.

    2. Do I have to remove the flash to reprogram the dead board?
    No, this isn't necessary. Use the bootstrap and bolo_ram files with a JTAG debugger (verified with Multi-ICE) to initialize the board and bring up a bolo_ram image in tera-term. Once bolo_ram is running use 'File | Send File' to load a valid 'Bolo_Flash' and 'Lolo_Flash' image.

    3. 32 or 64MB SDRAM?
    The BOM will include this information. The BOM is available on the Zoom Starter CD included with the kit or from the downloads section of the website.

    4. Availability of bootloader and sourcecode: Sharp does provide bootloader source code, available from http://able.sharpsma.com. Select the LH7A400-10 section and download the asp, csp, and bsp packages. They are responsible for supporting the bootloader and have helped out a number of people to get things going. I would try to contact them to get things working for you.

    Regards,
    Andrew Wawra
    Logic Product Development
    derek_snow@mentor.com
    New Member
    New Member
    Posts:


    --
    25 Mar 2004 10:58 AM
    What I am trying to do is flash the ARM vector table (for running our RTOS from RAM) or just our RTOS (when running from flash). In order to accomplish this you obviously need to have a RAM version of BoLo and some sort of Bootstrap program, bs_7400_dbg.elf, (this runs from SRAM so no initialization is needed) to initialize the SDRAM memory to run the RAM version of BoLo. I was taking a step back to just see if I could follow the steps provided by Andreww 8/8/2003 under the topic Recover from erased flash to see if I could flash BoLo back onto the board once it had been erased. I have not been successful in doing so and I was looking for any type of help on this issue. I will paste Andreww's instructions below if you would like to try.... The only difference for me is that I am not using the LH79520 and I am using a Multi-ICE with our deubbger. I was succesful doing these steps with the LH7A404 and do not understand why it would not work with the LH7A400.

    Andreww instructions:
    Quote:
    Below are instructions for reburning Flash using OCDCommander. OCDCommander is available for free download through http://www.macraigor.com. The instructions were sent to Logic from a customer and have been modified to work through Tera-term.

    OCD Commander instructions to reinstall the bootloader to flash:
    1. Open OCD Commander and connect to your board via the
    CONNection dialog.
    2. Halt the system by pressing <Halt> button.
    3. Download bs_79520_dbg.elf
    4. Press <Go> button to run the bootstrap code just loaded.
    Give it a couple seconds.
    5. Halt the system again.
    6. Download bolo_LLH79520_10_LCE_strip_RAM // load RAM version of bolo
    7. a. open up a tera-term window
    b. Press <Go> button. You should see the Bolo header and
    losh prompt on tera-term.

    Through a tera-term window:

    8. losh> load elf
    9. from 'file' menu, select 'send file'. select the most current bolo flash file available for download from http://www.logicpd.com
    10. losh> burn
    11. Enter 'y' and 'confirm' when asked if you really want to
    do this.
    12. losh> load elf
    13. from 'file' menu, select 'send file'. select the most current lolo flash file available for download from http://www.logicpd.com
    14. losh> burn

    If you reset the board now, you should see the Lolo header and
    losh prompt.
    picman@uk2.net
    New Member
    New Member
    Posts:


    --
    25 Mar 2004 09:41 PM
    Ahha...

    Sorry i got the wrong end of the stick!!!

    Ok, i will try it today, and post results...
    derek_snow@mentor.com
    New Member
    New Member
    Posts:


    --
    26 Mar 2004 07:52 AM
    Picman:

    I did verify that I was missing a key step to flash the elf version of bolo as a binary through the terminal. Andrew has mentioned this in an email but I missed it at the time. What is strange is that I am able use the flash version of bolo (copies itself into RAM) to burn an srec into block zero of flash, but I am unable to use the ram version in a reliable fashion. The ram version usually chokes but ocassionally it appears that bolo resets and I am then able to flash the s-record. I am curious if they have separate code in the RAM and ROM versions of bolo for handling s-records.

    Derek
    picman@uk2.net
    New Member
    New Member
    Posts:


    --
    26 Mar 2004 08:28 AM
    I have tried the steps with the bootloader and bolo_LLH7a400_10_LCE_strip_RAM and then loading LH7a400-10_BoLo_Flash_ver_1_2_5 and it flashed ok with no problems first time..

    I will convert to srec, and try it agin....


    PS is the source avaliable for the bs_7400_debug.elf?
    mikee@logicpd.com
    New Member
    New Member
    Posts:


    --
    06 Apr 2004 02:28 PM
    Gentlemen,

    I'm not sure I followed your entire problems but I will take a stab at answering one of your questions.

    It seems like the question on the table is why can you burn an SREC file using the version of LoLo that starts in Flash and then copies itself out to SDRAM and executes from there, when you can't seem to do the same with the RAM version of LoLo?

    If you look in the LogicLoader's user manual, the addendum should lay out the entire memory map which describes LoLo's execution environment. Also, if you type "info mem" at the LOSH prompt, LoLo will print out the end of it's memory area. Basically, LoLo will copy itself out of Flash and occupy SDRAM from

    0xc0000000 to 0xc000c000.

    Anything above that is used for program storage, and specifically as a cache buffer to save files destined for Flash. You see, it takes awhile to program flash, therefore, to avoid missing bytes on the serial port, LoLo will initially store a program destined for flash in SDRAM. The place where it gets stored is just above LoLo's execution environment.

    When you use LoLo to download the RAM version of it, the RAM version has to be downloaded to and then execute from the area above the original LoLo. Otherwise, the first LoLo would be overwritting itself.

    So, what is probably happening, is that your SREC file is overwriting a portion of the RAM-LoLo's execution space.

    As to your question about different code in the Flash and RAM versions of LoLo, they are the exact same.

    Regards,
    --mikee
    patricegagnon@patricegagn
    New Member
    New Member
    Posts:


    --
    04 Oct 2004 10:27 PM
    I have few questions related to this thread.
    Could you tell me what file are you using to load LOLO only? The only elf files I see on Logic's download page are:
    bolo_1.4.4_LLH7a400_10_LCE_0033_R_strip.elf
    lolo_bolo_1.4.4_LLH7a400_10_LCE_0033.elf
    bs_7400_dbg.elf

    I would like to confirm that if I replace LOLO with something else (while keeping the blob), I can burn it back. How does the prog start addr gets set? Above picman managed to load and elf at the 0x00040000:

    losh> load elf
    loading from stdin:
    F..
    elf file type : 0x0002
    machine type: 0028 version: 1
    prog start addr : 0x00040000

    How do we get this result? I don't have a JTAG for now.

    Thanks much

    You are not authorized to post a reply.