RE: Basic question: how to flash omap system with ccs?

Olav Kongas
2005-11-28T15:18:48Z

Hi Steven,

On Mon, 28 Nov 2005, Kipisz, Steven wrote:

> CCS 3.1 supports ELF file formats, which is the same format as the
> u-boot executable. You should be able to use a CCS gel file to
> configure SDRAM, peripherals, etc. so that CCS can load u-boot into
> SDRAM and run it. Once u-boot is running, you download u-boot.bin and
> write it to flash. If anybody has a gel file for a 5912, he/she could
> probably send it to you. I've don't this with other OMAP platforms.

I did not know about ELF format support. Thanks. Knowing
that would have saved me a half day.

I'll look into the gel files to see, whether setting up the
EMIFS for my flash (if I need to do this at all) is easier
in gel files than in my flash programmer. Though, I really
prefer the situation, where just calling 'make' would build
me an image (COFF or ELF) that can be directly loaded also
by future versions of CCS without the need to hack gel
files.

> The SRAM option sounds interesting. You could probably build u-boot for
> SDRAM (the normal build) and save the binary file as something like
> u-boot-sdram.bin. Then build a SRAM version - look at
> u-boot/board/omap5912osk/config.mk. The TEXT_BASE value is where u-boot
> will load. Change this to a SRAM area, rebuild u-boot, and use CCS to
> download the ELF format u-boot. Once that is running in SRAM, download
> and flash the SDRAM version .bin file. I've never tried this, but it
> sounds like it might work, assuming the binary image and the executing
> image fit into the 250k SRAM.

I tried converting u-boot to run from SRAM. I managed to
change the relevant bits like TEXT_BASE, stack location,
heap size, etc. But when u-boot, already running in SRAM,
changed SoC's clocks then my jtag started to report "cannot
halt processor" or the like. Is my jtag connection fragile
or what, but I decided to minimize the dependence on it and
go with a dedicated, tiny, non-time-critical flash
programmer.

For omap5912, I don't see a reason of initializing sdram in
the flash burning phase at all. Even if one would burn with
an sram-specific u-boot (instead of a dedicated flash
programmer), both sram-specific and sdram-specific u-boot
images should fit simultaneously into the 250k of sram. For
SoC's with smaller srams it may be necessary, however.

Thanks a lot for the info,
Olav