U-Boot BF512F - Boot from Internal Flash

Hi,

I need help with the U-boot loader. There is just too much information for me to put it all toghether and understand how it exactly works. Im sure someone could take me through the steps of what I require. The help will be much appreciated.

I have a BF512F custom board. I need to load U-boot into the internal SPI flash. This part is not that hard since I've already loaded my own code into flash and succesfully booted from internal SPI flash.

We have a board with an ARM and the Blackfin DSP on. The ARM will receive new FW (Firm Ware) which is saved to it's external storage (SD Card). The ARM will then initiate the bootloader on the DSP and load the new FW via the UART. THe bootloader will have to write the new FW to the internal SPI flash and do a CRC32 check thereafter to determine if the FW was written succesflly and whithout erros. So I'd say the normal bootloader stuff.

I've seen a u-boot .ldr created with the latest version of u-boot for the BF518F with a UART and SPI enabled.

My questions:

1. It seems like U-boot will work they way I want it to? Will it?

2. Do I have to create a BF512F U-boot .ldr for my custom board?

3. If so, how exactly do I do this? A step-by-step process would help a lot. Im working in a Windows environment and it seems like U-boot is just done from Linux? Folders and driectories are refered to that I cant find or just dont know where they are refering to. See below link ->http://docs.blackfin.uclinux.org/doku.php?id=toolchain:ldr-utils

bfin-elf-ldr - I dont seem to understand where this bfin_elf_loader can be found to generate the U-boot >ldr file for the BF512F?

4. Can I just use the BF518F-ezbrd.ldr file for U-boot on the BF512F without any issues? (I'm going to try this anyways but would feel better if I could generate a specific one for y custom board).

So it seems very basic, but I'm struggling to put all the information toghether and what exactly I need to do to accomplish this. PLease help me by just specifying basic steps that I can follow if possible.

Kind regards,

Quintin.

  • Hi,

    I've decided not to go with U-boot. I instead want to do a multi-boot application. But again this seems easy until I actually want to implement it. Is there an example project that I can look at that is simple enough to figure out?

    Ive read multiple documents and cant figure out exactly how I have to do it.

    I want to:

    Have two applications running at different addresses in the internal SPI flash.

    1. App1 will be my bootloader application that confirms (CRC32) that the current application (App2 - Main FW) is not corrupt and will then boot that application. During start-up of the boot application it will check a GPIO pin driven by the ARM to see if it wants to do a FW update. If the pin is in the update posistion the bootloader will commence with the update, if not, it will check the current FW and continue to run if it is intact.

    2. App2 (Main FW) will reside at loaction 0x00X in the flash. I want this seperated by quite a bit from the Bootloader to make sure that I dont accidently erase the bootloader itself.

    3. App2 currently has init code to initalise the SDRAM etc at startup and I also increased the SPI flash read speed to dramatically increase the boot time.

    4. App1 - Bootloader still have to be coded. But this is not a real problem.

    I dont know how the init_code should look to get the DSP to always start App1 and then whithin App1.....call App2 since they both live in SPI flash. How will App1 get the DSP to load/boot App2 from flash?

    Im a bit confused as Im sure you can see, please help me with either a simple example or step-by-step guide. Ive read a lot of the documentation and again I just cant put the information toghether.

    I have read the  EE-336 but this only helps. I still cant figure out exactly where in my project I should implement the boot management.

    Kind regards,

    Quintin.

  • 0
    •  Analog Employees 
    on Feb 20, 2013 7:43 AM

    I would suggest you compile your u-boot in a Linux environment, install a main stream Linux distribution like ubuntu, and install the Blackfin Linux toolchain as following:

    1)https://docs.blackfin.uclinux.org/doku.php?id=installing_linux

    2)https://docs.blackfin.uclinux.org/doku.php?id=toolchain:installing

    Then compile the u-boot:

    3)https://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:compiling

    Yes you may take the ADI implementation of BF518F as reference for your BF512F customer board, yet you may need to do some porting according to your own hardware, make changes in your own u-boot configure files, like include/configs/bf518f-ezbrd.h.

    After all this is done, communicate between your ARM and DSP is another story based on this, you may implement this piece of code by making  changes to the u-boot code as needed.

  • Hi Aaronwu,

    Thank you for the quick response. Sachin is helping me via processor
    support  (SR#: E13BS00920). I did get the DSP to boot my own application finally. Im am sorting out one last problem with Sachin regarding the booting time of my application and how to speed it up. I'm not going with uU-boot as it seems to comlicated and not exactly what we want. I can see that U-boot is usefull and can be used for many other things and will definately consider it when I have more time to play with it.

    Kind regards,

    Quintin.

  • 0
    •  Analog Employees 
    on Mar 26, 2013 12:00 PM

    With the BF518F EZ-BOARD V1.0 I'm able to access the internal Flash from the default u-boot (on a board of older version it does not work, no idea why yet)

    bfin> sf probe 4

    SF: Detected SST25WF040 with page size 4 KiB, total 512 KiB

    sf read write to this Flash also works fine. You may take the attached hardware schematic as reference for your product.

  • 0
    •  Analog Employees 
    on Aug 2, 2018 4:46 PM
    This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin