Logic Loader Restore

From Buici

Jump to: navigation, search

Overview

You can download the logic loader, BOLO, and LOLO files from the LPD web site. The official method for restoring the firmware is to use the RAM files and a bootstrap. For those of us with JTAG emulators, we can short-cut the process.

These instructions explicitly reference the 7a404 versions of the files. On this board and in the most recent release, the firmware comes as a single program. Previous releases were divided into a boot loader (BOLO) and the Logic Loader (LOLO). The procedure to program those is similar, but the flash programming address for LOLO is the start of the first erase block following BOLO.

Converting ELF files to Binaries

The LPD files are distributed as ELF (Execution Load Format) files. This is convenient for them, but we cannot be sure that the JTAG emulator will write the file as we want it to be written.

If your system has a multi-binary version of binutils, you can use the version of objcopy in the path. If not, you'll have to find a version capable of reading ARM ELF files.

objcopy -O binary -R .note -R .comment -R .bss 1003195_lolo.elf 1003195_lolo.bin

The -R switches prevent those sections from being copied to the binary. The resulting file is ready to be written directly to flash. The first instruction of the loader is the first word of the file.

Writing the Loader to Flash

There are usually two things that must be in place before you can write to flash. First, the VPEN line of the flash memory must be pulled high (or low?) according to the manufacture's datasheet. On the Logic PD CardEngines, the CPLD has a register to drive this line. Second, the memory access mode must be correct.

For the LPD7a404, the BDI2000 startup configuration has these entries.

[INIT]
WM32    0x80002000 0x200041c0   ; Controller settings for Flash: Bank 0, 32bit
WM32    0x8000201c 0x1000b2c2   ; 16 bit access to CPLD
WM8     0x71000000 0x01      ; Flash programing enable, VPEN

Of course, these settings are specific to the this CardEngine and the BDI2000.

Once the board is prepared for programming, the final steps look as follows.

Core#0> unlock 0 0x40000 2
Core#0> erase 0 0x40000 2
Erasing flash at 0x00000000
Erasing flash passed
Core#0> prog 0 1003195_lolo.bin bin
Programming 1003195_lolo.bin , please wait ....
Programming flash passed

Keep in mind, too, that the 0x40000 from above is the block size of the flash memory. Even though the chips on this board have 64KiB erase blocks, the board layout puts one on the high 16 data bits and one on the low 16 data bits. The result is that an erase block is one block from each chip.

Reset the board and look for the LOLO prompt on the console.

--Elf 14:53, 6 April 2006 (PDT)

Personal tools